From 320b831367c168e0067ba58b765d709020fee64e Mon Sep 17 00:00:00 2001 From: Luji7 Date: Thu, 27 Oct 2016 13:38:11 +0800 Subject: Fix Issue#GSO-63 Change-Id: I7ebe25e26b6384482b6444c6e6272260131dee8b Signed-off-by: Luji7 --- .../src/main/webapp/lifecyclemgr/js/gsolcm.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr') diff --git a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/gsolcm.js b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/gsolcm.js index 3df70f70..9549d6f4 100644 --- a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/gsolcm.js +++ b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/gsolcm.js @@ -114,6 +114,7 @@ function fetchServiceTemplateBy(templateId) { function(response) { template.name = response.templateName; template.gsarId = response.csarId; + template.id = response.id; return fetchCsar(template.gsarId); } ).then( @@ -393,7 +394,7 @@ function createNetworkServiceInstance(template, serviceInstance, gatewayService) if (template.serviceType === 'GSO') { return createGsoServiceInstance(gatewayService, serviceInstance, template); } else if (template.serviceType === 'NFVO') { - return createNfvoServiceInstance(gatewayService, serviceInstance); + return createNfvoServiceInstance(gatewayService, serviceInstance, template); } else if (template.serviceType === 'SDNO') { return createSdnoServiceInstance(gatewayService, serviceInstance); } @@ -426,20 +427,22 @@ function createGsoServiceInstance(gatewayService, serviceInstance, serviceTempla return defer; } -function createNfvoServiceInstance(gatewayService, serviceInstance) { +function createNfvoServiceInstance(gatewayService, serviceInstance, template) { var nfvoLcmNsUri = '/openoapi/nslcm/v1/ns'; + serviceInstance.nsdId = template.id; return createServiceInstance(gatewayService, nfvoLcmNsUri, serviceInstance); } function createSdnoServiceInstance(gatewayService, serviceInstance) { var sdnoLcmNsUri = '/openoapi/sdnonslcm/v1/ns'; + serviceInstance.nsdId = serviceInstance.serviceTemplateId; return createServiceInstance(gatewayService, sdnoLcmNsUri, serviceInstance); } function createServiceInstance(gatewayService, nsUri, serviceInstance) { var defer = $.Deferred(); var sParameter = { - 'nsdId': serviceInstance.serviceTemplateId, + 'nsdId': serviceInstance.nsdId, 'nsName': serviceInstance.serviceName, 'description': serviceInstance.description, 'gatewayUri': nsUri -- cgit 1.2.3-korg