fix ns instance instantiation bug 33/72633/1
authorguochuyicmri <guochuyi@chinamobile.com>
Wed, 14 Nov 2018 11:23:18 +0000 (19:23 +0800)
committerguochuyicmri <guochuyi@chinamobile.com>
Wed, 14 Nov 2018 11:27:36 +0000 (19:27 +0800)
Change-Id: I6cecb862aaaad7f6f1f3c7208b682942dd8df8c3
Issue-ID: USECASEUI-160
Signed-off-by: guochuyicmri <guochuyi@chinamobile.com>
usecaseui-portal/src/app/components/e2e-creation/e2e-creation.component.ts
usecaseui-portal/src/app/services/services-list/services-list.component.ts

index 213df2b..d45978a 100644 (file)
@@ -188,15 +188,9 @@ export class E2eCreationComponent implements OnInit {
       })
       this.nsTemplateParameters.vnfs.forEach((vnf)=>{
         let vnfparams = {
-          vnfProfileId: vnf.vnf_id,
+          vnfProfileId: vnf.properties.id,
           locationConstraints: {
             vimid: vnf.value.id,
-            accessinfo: {
-              tenant: ""
-            },
-            accessInfo: {
-              tenant: ""
-            }
           }
         }
         this.ns_service2.locationConstraints.push(vnfparams);
index 003e897..e742ee3 100644 (file)
@@ -532,8 +532,8 @@ export class ServicesListComponent implements OnInit {
       let createParams = "?ns_instance_id=" + data.nsInstanceId + 
                         "&customerId="+this.customerSelected.id + 
                         "&serviceType="+this.serviceTypeSelected.name + 
-                        "&serviceDomain="+"SITE" +
-                        "&parentServiceInstanceId="+this.parentServiceInstanceId;
+                        "&serviceDomain="+ this.templateTypeSelected +
+                        "&parentServiceInstanceId=";
       // step2
       this.createNsService(createParams,obj.step2).then((jobid)=>{
 
@@ -572,6 +572,10 @@ export class ServicesListComponent implements OnInit {
     let mypromise = new Promise((res,rej)=>{
       this.myhttp.nsCreateInstance2(id,obj)
         .subscribe((data)=>{
+          if(data.status == "FAILED"){
+            console.log("instantiate ns service data :" + JSON.stringify(data));
+            return false;
+          }
           res(data.jobId);
         })
     })