From a027667f8eef36766d05bb95b38e905254cef0f2 Mon Sep 17 00:00:00 2001 From: Luji7 Date: Wed, 28 Sep 2016 15:41:33 +0800 Subject: Fix bug, no response while creating nfvo service instance Change-Id: Ic0825ec19bd12cfad6c8c3a540a9fdbc3be77f62 Signed-off-by: Luji7 --- .../src/main/webapp/lifecyclemgr/js/gsolcm.js | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) 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 15fd4621..07de504f 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 @@ -255,23 +255,24 @@ function createGsoServiceInstance(gatewayService, serviceInstance, serviceTempla function createNfvoServiceInstance(gatewayService, serviceInstance) { var nfvoLcmNsUrl = '/openoapi/nslcm/v1.0/ns'; serviceInstance.serviceParameters.location = serviceInstance.vimLocation; - createServiceInstance(gatewayService, nfvoLcmNsUrl, serviceInstance); + return createServiceInstance(gatewayService, nfvoLcmNsUrl, serviceInstance); } -function createServiceInstance(gatewayService, gatewayUri, serviceInstance) { - var nsInstanceId = createNetworkService(gatewayService, gatewayUri, serviceInstance); +function createServiceInstance(gatewayService, nsUri, serviceInstance) { + var nsInstanceId = createNetworkService(gatewayService, nsUri, serviceInstance); if (nsInstanceId === undefined) { return; } - instantiateNetworkService(gatewayUri, nsInstanceId, serviceInstance); + instantiateNetworkService(gatewayService, nsUri,nsInstanceId, serviceInstance); + return nsInstanceId; } -function createNetworkService(gatewayService, gatewayUri, serviceInstance) { +function createNetworkService(gatewayService, nsUrl, serviceInstance) { var parameter = { 'nsdId': serviceInstance.serviceTemplateId, 'nsName': serviceInstance.serviceName, 'description': serviceInstance.serviceDescription, - 'gatewayUri': gatewayUri + 'gatewayUri': nsUrl }; var nsInstanceId; $.ajax({ @@ -291,8 +292,8 @@ function createNetworkService(gatewayService, gatewayUri, serviceInstance) { return nsInstanceId; } -function instantiateNetworkService(gatewayService, nsInstanceId, serviceInstance) { - var initNsUrl = gatewayUri + '/' + nsInstanceId + '/Instantiate' +function instantiateNetworkService(gatewayService, nsUri, nsInstanceId, serviceInstance) { + var initNsUrl = nsUri + '/' + nsInstanceId + '/Instantiate' var parameter = { 'gatewayUri': initNsUrl, 'nsInstanceId': nsInstanceId, @@ -318,7 +319,7 @@ function instantiateNetworkService(gatewayService, nsInstanceId, serviceInstance function createSdnoServiceInstance(gatewayService, serviceInstance) { var sdnoLcmNsUrl = '/openoapi/sdnonslcm/v1.0/ns'; - createServiceInstance(gatewayService, sdnoLcmNsUrl, serviceInstance); + return createServiceInstance(gatewayService, sdnoLcmNsUrl, serviceInstance); } function updateTable(serviceInstance) { -- cgit 1.2.3-korg