summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorying.yunlong <ying.yunlong@zte.com.cn>2017-11-02 10:25:16 +0800
committerying.yunlong <ying.yunlong@zte.com.cn>2017-11-02 10:25:16 +0800
commit4c7b0825e6490ac5b65062938eb9f323dba05326 (patch)
treec11bedd562f295ca4a05d5df7d1356ce3e5df397
parent6a2a929c3229fd2eb134115e4e310c79df680917 (diff)
Fix lcm vnf parameter reported to aai
Change-Id: I1cbf33998a1fc4821527c562a9813c15bf494145 Issue-ID: VFC-558 Signed-off-by: ying.yunlong <ying.yunlong@zte.com.cn>
-rw-r--r--lcm/ns/vnfs/create_vnfs.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/lcm/ns/vnfs/create_vnfs.py b/lcm/ns/vnfs/create_vnfs.py
index ede33807..0f3e57db 100644
--- a/lcm/ns/vnfs/create_vnfs.py
+++ b/lcm/ns/vnfs/create_vnfs.py
@@ -279,6 +279,9 @@ class CreateVnfs(Thread):
def create_vnf_in_aai(self):
logger.debug("CreateVnfs::create_vnf_in_aai::report vnf instance[%s] to aai." % self.nf_inst_id)
try:
+ ns_insts = NSInstModel.objects.filter(id=self.ns_inst_id)
+ self.global_customer_id = ns_insts[0].global_customer_id
+ self.service_type = ns_insts[0].service_type
data = {
"vnf-id": self.nf_inst_id,
"vnf-name": self.vnf_inst_name,
@@ -293,11 +296,11 @@ class CreateVnfs(Thread):
"relationship-data": [
{
"relationship-key": "customer.global-customer-id",
- "relationship-value": "global-customer-id-" + self.ns_inst_id
+ "relationship-value": self.global_customer_id
},
{
"relationship-key": "service-subscription.service-type",
- "relationship-value": "Network"
+ "relationship-value": self.service_type
},
{
"relationship-key": "service-instance.service-instance-id",