aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/APIs/NSLCM_API/NSLCM_API_Specification_v0.1.rst14
-rw-r--r--lcm/ns/const.py3
-rw-r--r--lcm/ns/ns_create.py7
-rw-r--r--lcm/swagger/vfc.vnfdriver.swagger.json2
4 files changed, 21 insertions, 5 deletions
diff --git a/docs/APIs/NSLCM_API/NSLCM_API_Specification_v0.1.rst b/docs/APIs/NSLCM_API/NSLCM_API_Specification_v0.1.rst
index 16b52b9c..66df2f41 100644
--- a/docs/APIs/NSLCM_API/NSLCM_API_Specification_v0.1.rst
+++ b/docs/APIs/NSLCM_API/NSLCM_API_Specification_v0.1.rst
@@ -566,7 +566,19 @@ NS LCM API
"type": "object",
"properties": {
-
+ "context":{
+ "type": "object",
+ "properties": {
+ "global-customer-id":{
+ "type": "string",
+ "description": "the global customer id"
+ },
+ "service-type":{
+ "type": "string",
+ "description": "service type"
+ }
+ }
+ },
"csarId": {
"type": "string",
diff --git a/lcm/ns/const.py b/lcm/ns/const.py
index b4165e5e..2527efdf 100644
--- a/lcm/ns/const.py
+++ b/lcm/ns/const.py
@@ -18,3 +18,6 @@ OWNER_TYPE = enum(VNF=0, VNFM=1, NS=2)
NS_INST_STATUS = enum(EMPTY='empty', INSTANTIATING='instantiating', TERMINATING='terminating',
ACTIVE='active', FAILED='failed', INACTIVE='inactive', UPDATING='updating', SCALING='scaling',
HEALING='healing')
+
+SERVICE_TYPE = 'NetworkService'
+SERVICE_ROLE = 'NetworkService'
diff --git a/lcm/ns/ns_create.py b/lcm/ns/ns_create.py
index ade97621..c7f4a684 100644
--- a/lcm/ns/ns_create.py
+++ b/lcm/ns/ns_create.py
@@ -22,6 +22,7 @@ from lcm.pub.msapi.aai import create_ns_aai
from lcm.pub.msapi.sdc_run_catalog import query_nspackage_by_id
from lcm.pub.utils.timeutil import now_time
from lcm.pub.utils.values import ignore_case_get
+from lcm.ns.const import SERVICE_ROLE, SERVICE_TYPE
logger = logging.getLogger(__name__)
@@ -104,10 +105,10 @@ class CreateNSService(object):
data = {
"service-instance-id": self.ns_inst_id,
"service-instance-name": self.ns_name,
- "service-type": "Network",
- "service-role": "service-role-" + self.ns_inst_id
+ "service-type": SERVICE_TYPE,
+ "service-role": SERVICE_ROLE
}
- resp_data, resp_status = create_ns_aai(self.global_customer_id, self.service_type, self.ns_inst_id, data)
+ resp_data, resp_status = create_ns_aai(self.global_customer_id, SERVICE_TYPE, self.ns_inst_id, data)
if resp_data:
logger.debug("Fail to create ns[%s] to aai: [%s].", self.ns_inst_id, resp_status)
else:
diff --git a/lcm/swagger/vfc.vnfdriver.swagger.json b/lcm/swagger/vfc.vnfdriver.swagger.json
index c9c47c01..6fa7bb09 100644
--- a/lcm/swagger/vfc.vnfdriver.swagger.json
+++ b/lcm/swagger/vfc.vnfdriver.swagger.json
@@ -538,7 +538,7 @@
}
}
}
- },
+ }
},
"definitions": {
"jobResponseInfo": {