aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFu Jinhua <fu.jinhua@zte.com.cn>2017-09-04 03:24:23 +0000
committerGerrit Code Review <gerrit@onap.org>2017-09-04 03:24:23 +0000
commite3abb0664c6621bb8a672141671b45dc71cd5063 (patch)
tree866be7994146ba389e94eefa6835fe4aae9d05cd
parent5fbdfee507bbd4cfc231aca9ab71bc1f1d03338d (diff)
parent5a11cd61afc6df02aa9c6307352591a7104bc6a1 (diff)
Merge "Aligning ESR REST interface"
-rw-r--r--lcm/ns/sfcs/create_port_chain.py2
-rw-r--r--lcm/ns/tests/sfcs/test_create_flow_classifier.py2
-rw-r--r--lcm/ns/tests/sfcs/test_create_port_chain.py2
-rw-r--r--lcm/ns/tests/sfcs/test_create_port_pair_group.py2
-rw-r--r--lcm/ns/tests/vnfs/tests.py6
-rw-r--r--lcm/packages/tests/test_nf.py10
-rw-r--r--lcm/pub/msapi/extsys.py10
7 files changed, 17 insertions, 17 deletions
diff --git a/lcm/ns/sfcs/create_port_chain.py b/lcm/ns/sfcs/create_port_chain.py
index b7bd840a..3ea502a1 100644
--- a/lcm/ns/sfcs/create_port_chain.py
+++ b/lcm/ns/sfcs/create_port_chain.py
@@ -75,7 +75,7 @@ class CreatePortChain(object):
# try:
# logger.warn("query sdncontroller by id begins:")
#
- # url = "/api/extsys/v1/sdncontrollers/%s" % (self.sdnControllerId)
+ # url = "/api/aai-esr-server/v1/sdncontrollers/%s" % (self.sdnControllerId)
# ret = req_by_msb(url, "GET")
# if ret[0] > 0:
# logger.error('query sdncontroller failed.')
diff --git a/lcm/ns/tests/sfcs/test_create_flow_classifier.py b/lcm/ns/tests/sfcs/test_create_flow_classifier.py
index 275d0cb5..2c48c293 100644
--- a/lcm/ns/tests/sfcs/test_create_flow_classifier.py
+++ b/lcm/ns/tests/sfcs/test_create_flow_classifier.py
@@ -37,7 +37,7 @@
# "context": json.dumps(nsd_model)
# }
# mock_vals = {
-# "/api/extsys/v1/sdncontrollers/test":
+# "/api/aai-esr-server/v1/sdncontrollers/test":
# [0, json.JSONEncoder().encode({"url": "url_1"}), '200'],
# "/api/sdncdriver/v1.0/createflowclassfier":
# [0, json.JSONEncoder().encode({"id": "test_id_1"}), '200'],
diff --git a/lcm/ns/tests/sfcs/test_create_port_chain.py b/lcm/ns/tests/sfcs/test_create_port_chain.py
index e8844362..7391dac9 100644
--- a/lcm/ns/tests/sfcs/test_create_port_chain.py
+++ b/lcm/ns/tests/sfcs/test_create_port_chain.py
@@ -39,7 +39,7 @@
# "context": json.dumps(nsd_model)
# }
# mock_vals = {
-# "/api/extsys/v1/sdncontrollers/test_sdncontrollerid":
+# "/api/aai-esr-server/v1/sdncontrollers/test_sdncontrollerid":
# [0, json.JSONEncoder().encode({"url": "url_1"}), '200'],
# "/api/sdncdriver/v1.0/createportchain":
# [0, json.JSONEncoder().encode({"id": "test_id_1"}), '200'],
diff --git a/lcm/ns/tests/sfcs/test_create_port_pair_group.py b/lcm/ns/tests/sfcs/test_create_port_pair_group.py
index b7e73879..d8c03cf6 100644
--- a/lcm/ns/tests/sfcs/test_create_port_pair_group.py
+++ b/lcm/ns/tests/sfcs/test_create_port_pair_group.py
@@ -61,7 +61,7 @@
# "context": json.dumps(nsd_model)
# }
# mock_vals = {
-# "/api/extsys/v1/sdncontrollers/sdn_controller_1":
+# "/api/aai-esr-server/v1/sdncontrollers/sdn_controller_1":
# [0, json.JSONEncoder().encode({"url": "url_1"}), '200'],
# "/api/sdncdriver/v1.0/createportpair":
# [0, json.JSONEncoder().encode({"id": "createportpair_id"}), '200'],
diff --git a/lcm/ns/tests/vnfs/tests.py b/lcm/ns/tests/vnfs/tests.py
index 64559ff1..b71f75df 100644
--- a/lcm/ns/tests/vnfs/tests.py
+++ b/lcm/ns/tests/vnfs/tests.py
@@ -86,7 +86,7 @@ class TestCreateVnfViews(TestCase):
mock_vals = {
"/api/ztevmanagerdriver/v1/1/vnfs":
[0, json.JSONEncoder().encode({"jobId": self.job_id, "vnfInstanceId": 3}), '200'],
- "/api/extsys/v1/vnfms/1":
+ "/api/aai-esr-server/v1/vnfms/1":
[0, json.JSONEncoder().encode({"name": 'vnfm1'}), '200'],
"/api/resmgr/v1/vnf":
[0, json.JSONEncoder().encode({}), '200'],
@@ -167,7 +167,7 @@ class TestTerminateVnfViews(TestCase):
mock_vals = {
"/api/ztevmanagerdriver/v1/1/vnfs/111/terminate":
[0, json.JSONEncoder().encode({"jobId": job_id}), '200'],
- "/api/extsys/v1/vnfms/1":
+ "/api/aai-esr-server/v1/vnfms/1":
[0, json.JSONEncoder().encode({"name": 'vnfm1', "type": 'ztevmanagerdriver'}), '200'],
"/api/resmgr/v1/vnf/1":
[0, json.JSONEncoder().encode({"jobId": job_id}), '200'],
@@ -337,7 +337,7 @@ class TestHealVnfViews(TestCase):
mock_vals = {
"/api/ztevmanagerdriver/v1/1/vnfs/111/heal":
[0, json.JSONEncoder().encode({"jobId": self.job_id}), '200'],
- "/api/extsys/v1/vnfms/1":
+ "/api/aai-esr-server/v1/vnfms/1":
[0, json.JSONEncoder().encode({"name": 'vnfm1', "type": 'ztevmanagerdriver'}), '200'],
"/api/resmgr/v1/vnf/1":
[0, json.JSONEncoder().encode({"jobId": self.job_id}), '200'],
diff --git a/lcm/packages/tests/test_nf.py b/lcm/packages/tests/test_nf.py
index 2e922d4f..44de8d22 100644
--- a/lcm/packages/tests/test_nf.py
+++ b/lcm/packages/tests/test_nf.py
@@ -221,7 +221,7 @@ class TestNfPackage(TestCase):
"/api/catalog/v1/csars/2/files?relativePath=/SoftwareImages/image-lb":
[0, json.JSONEncoder().encode({
"csar_file_info": [{"downloadUri": "8"}, {"localPath": "9"}]}), '200'],
- "/api/extsys/v1/vims":
+ "/api/aai-esr-server/v1/vims":
[0, json.JSONEncoder().encode([{
"vimId": "1", "type": VIM_OPENSTACK,
"url": "/root/package", "userName": "tom",
@@ -260,7 +260,7 @@ class TestNfPackage(TestCase):
[0, json.JSONEncoder().encode({
"csar_file_info": [{"downloadUri": "8"}, {"localPath": "9"}]}), '200'],
"/api/catalog/v1/csars/3?processState=onBoardFailed": [0, '{}', 200],
- "/api/extsys/v1/vims":
+ "/api/aai-esr-server/v1/vims":
[0, json.JSONEncoder().encode([{
"vimId": "1", "type": VIM_OPENSTACK,
"url": "/root/package", "userName": "tom",
@@ -293,7 +293,7 @@ class TestNfPackage(TestCase):
[0, json.JSONEncoder().encode({
"csar_file_info": [{"downloadUri": "8"}, {"localPath": "9"}]}), '200'],
"/api/catalog/v1/csars/5?processState=onBoardFailed": [0, '{}', 200],
- "/api/extsys/v1/vims":
+ "/api/aai-esr-server/v1/vims":
[0, json.JSONEncoder().encode([{
"vimId": "1", "type": VIM_OPENSTACK,
"url": "/root/package", "userName": "tom",
@@ -402,7 +402,7 @@ class TestNfPackage(TestCase):
[0, "{}", "200"],
("/api/catalog/v1/csars/1", "GET"):
[0, json.JSONEncoder().encode({"processState": "normal"}), "200"],
- ("/api/extsys/v1/vims", "GET"):
+ ("/api/aai-esr-server/v1/vims", "GET"):
[0, json.JSONEncoder().encode([{"vimId": "002",
"url": "url_test",
"userName": "test01",
@@ -433,7 +433,7 @@ class TestNfPackage(TestCase):
[0, json.JSONEncoder().encode({"successfully": "successfully"}), "200"],
("/api/catalog/v1/csars/1", "GET"):
[0, json.JSONEncoder().encode({"notProcessState": "notProcessState"}), "200"],
- ("/api/extsys/v1/vims", "GET"):
+ ("/api/aai-esr-server/v1/vims", "GET"):
[0, json.JSONEncoder().encode([{
"vimId": "002",
"url": "url_test",
diff --git a/lcm/pub/msapi/extsys.py b/lcm/pub/msapi/extsys.py
index d834ea10..b7955d88 100644
--- a/lcm/pub/msapi/extsys.py
+++ b/lcm/pub/msapi/extsys.py
@@ -22,7 +22,7 @@ logger = logging.getLogger(__name__)
def get_vims():
- ret = req_by_msb("/api/extsys/v1/vims", "GET")
+ ret = req_by_msb("/api/aai-esr-server/v1/vims", "GET")
if ret[0] != 0:
logger.error("Status code is %s, detail is %s.", ret[2], ret[1])
raise NSLCMException("Failed to query vims from extsys.")
@@ -30,7 +30,7 @@ def get_vims():
def get_vim_by_id(vim_id):
- ret = req_by_msb("/api/extsys/v1/vims/%s" % vim_id, "GET")
+ ret = req_by_msb("/api/aai-esr-server/v1/vims/%s" % vim_id, "GET")
if ret[0] != 0:
logger.error("Status code is %s, detail is %s.", ret[2], ret[1])
raise NSLCMException("Failed to query vim(%s) from extsys." % vim_id)
@@ -38,7 +38,7 @@ def get_vim_by_id(vim_id):
def get_sdn_controller_by_id(sdn_ontroller_id):
- ret = req_by_msb("/api/extsys/v1/sdncontrollers/%s" % sdn_ontroller_id, "GET")
+ ret = req_by_msb("/api/aai-esr-server/v1/sdncontrollers/%s" % sdn_ontroller_id, "GET")
if ret[0] != 0:
logger.error("Failed to query sdn ontroller(%s) from extsys. detail is %s.", sdn_ontroller_id, ret[1])
raise NSLCMException("Failed to query sdn ontroller(%s) from extsys." % sdn_ontroller_id)
@@ -46,7 +46,7 @@ def get_sdn_controller_by_id(sdn_ontroller_id):
def get_vnfm_by_id(vnfm_inst_id):
- uri = '/api/extsys/v1/vnfms/%s' % vnfm_inst_id
+ uri = '/api/aai-esr-server/v1/vnfms/%s' % vnfm_inst_id
ret = req_by_msb(uri, "GET")
if ret[0] > 0:
logger.error('Send get VNFM information request to extsys failed.')
@@ -54,7 +54,7 @@ def get_vnfm_by_id(vnfm_inst_id):
return json.JSONDecoder().decode(ret[1])
def select_vnfm(vnfm_type, vim_id):
- uri = '/api/extsys/v1/vnfms'
+ uri = '/api/aai-esr-server/v1/vnfms'
ret = req_by_msb(uri, "GET")
if ret[0] > 0:
logger.error("Failed to call %s: %s", uri, ret[1])