diff options
author | Tao Shen <shentao@chinamobile.com> | 2018-11-15 11:13:45 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-11-15 11:13:45 +0000 |
commit | 1938ed259661d225295976820c909378d3bf7d55 (patch) | |
tree | 82ec94438b69c533c4d7476bdc112473a2e6019a /usecaseui-portal/src | |
parent | c97dae4c8b564c996d38e9f50845856865b68733 (diff) | |
parent | cc166a941f69030a467b9e2280fb7b9f08dca945 (diff) |
Merge "fix NS Instance Instantiation for VF-C"
Diffstat (limited to 'usecaseui-portal/src')
3 files changed, 33 insertions, 6 deletions
diff --git a/usecaseui-portal/src/app/components/e2e-creation/e2e-creation.component.ts b/usecaseui-portal/src/app/components/e2e-creation/e2e-creation.component.ts index d45978ae..3cbc12ae 100644 --- a/usecaseui-portal/src/app/components/e2e-creation/e2e-creation.component.ts +++ b/usecaseui-portal/src/app/components/e2e-creation/e2e-creation.component.ts @@ -190,7 +190,7 @@ export class E2eCreationComponent implements OnInit { let vnfparams = { vnfProfileId: vnf.properties.id, locationConstraints: { - vimid: vnf.value.id, + vimId: vnf.value.name + "_" + vnf.value.id, } } this.ns_service2.locationConstraints.push(vnfparams); diff --git a/usecaseui-portal/src/app/myhttp.service.ts b/usecaseui-portal/src/app/myhttp.service.ts index 7c77e973..fda6d0f8 100644 --- a/usecaseui-portal/src/app/myhttp.service.ts +++ b/usecaseui-portal/src/app/myhttp.service.ts @@ -182,7 +182,7 @@ export class MyhttpService { } nsCreateInstance2(params, requestBody) { // return this.http.get<any>(this.url.ns_createService2 + params); //Local simulation - return this.http.post<any>(this.url.ns_createService + params, requestBody); + return this.http.post<any>(this.url.ns_createService2 + params, requestBody); } // Input parameter name conversion diff --git a/usecaseui-portal/src/app/services/services-list/services-list.component.ts b/usecaseui-portal/src/app/services/services-list/services-list.component.ts index e742ee39..4e0770a3 100644 --- a/usecaseui-portal/src/app/services/services-list/services-list.component.ts +++ b/usecaseui-portal/src/app/services/services-list/services-list.component.ts @@ -519,7 +519,11 @@ export class ServicesListComponent implements OnInit { // step1 this.myhttp.nsCreateInstance(obj.step1) .subscribe((data)=>{ - console.log(data); + // console.log(data); + if(data.status == "FAILED"){ + console.log("create ns service failed :" + JSON.stringify(data)); + return false; + } newData = { // 'service-instance-id':data.nsInstanceId, 'service-instance-name':obj.step1.nsName, @@ -562,7 +566,10 @@ export class ServicesListComponent implements OnInit { let mypromise = new Promise((res,rej)=>{ this.myhttp.createInstance(requestBody,createParams) .subscribe((data)=>{ - + if(data.status == "FAILED"){ + console.log("create e2e service failed :" + JSON.stringify(data)); + return false; + } res(data.service); }) }) @@ -573,7 +580,7 @@ export class ServicesListComponent implements OnInit { this.myhttp.nsCreateInstance2(id,obj) .subscribe((data)=>{ if(data.status == "FAILED"){ - console.log("instantiate ns service data :" + JSON.stringify(data)); + console.log("instantiate ns service failed :" + JSON.stringify(data)); return false; } res(data.jobId); @@ -588,6 +595,10 @@ export class ServicesListComponent implements OnInit { service.status = "Scaling"; this.myhttp.scaleE2eService(id,requestBody) .subscribe((data)=>{ + if(data.status == "FAILED"){ + console.log("scale E2e service failed :" + JSON.stringify(data)); + return false; + } let obj = { serviceId:id, operationId:data.operationId @@ -608,6 +619,10 @@ export class ServicesListComponent implements OnInit { service.status = "Healing"; this.myhttp.healNsService(service.nsInstanceId,requestBody) .subscribe((data)=>{ + if(data.status == "FAILED"){ + console.log("heal nsvnf service failed :" + JSON.stringify(data)); + return false; + } let jobid = data.jobId; let updata = (prodata)=>{ service.rate = prodata.responseDescriptor.progress; @@ -636,6 +651,10 @@ export class ServicesListComponent implements OnInit { return new Promise((res,rej)=>{ this.myhttp.deleteInstance(params) .subscribe((data)=>{ + if(data.status == "FAILED"){ + console.log("delete service failed :" + JSON.stringify(data)); + return false; + } let obj = {serviceId:params.serviceInstanceId,operationId:data.operationId} let updata = (prodata)=>{ allprogress[prodata.operationId] = prodata.progress; @@ -680,7 +699,11 @@ export class ServicesListComponent implements OnInit { }).then(()=>{ this.myhttp.nsDeleteInstance(id) .subscribe((data)=>{ - console.log(data); + // console.log(data); + if(data.status == "FAILED"){ + console.log("delete ns service failed :" + JSON.stringify(data)); + return false; + } service.rate = 100; service.status = "completed"; let hasUndone = this.tableData.some((item)=>{ @@ -699,6 +722,10 @@ export class ServicesListComponent implements OnInit { let mypromise = new Promise((res,rej)=>{ this.myhttp.stopNsService(id,obj) .subscribe((data)=>{ + if(data.status == "FAILED"){ + console.log("stop ns service failed :" + JSON.stringify(data)); + return false; + } res(data.jobId); }) }) |