aboutsummaryrefslogtreecommitdiffstats
path: root/openo-portal/portal-lifecyclemgr
diff options
context:
space:
mode:
authorLuji7 <lu.ji3@zte.com.cn>2016-09-15 11:28:45 +0800
committerLuji7 <lu.ji3@zte.com.cn>2016-09-15 11:28:45 +0800
commitc4e8e7384f5f53aa10cbebfdd04dc7da92e94261 (patch)
tree3a0a8730b6c55e9c7697505b594be64dd3f8e928 /openo-portal/portal-lifecyclemgr
parentf7f15a6731de67bbced76acb53e497e56f65610b (diff)
rename s1ServiceUrl to gatewayService
Change-Id: I4c1692fe16228c0aff4b4a12bdbab3d077a3e9fb Signed-off-by: Luji7 <lu.ji3@zte.com.cn>
Diffstat (limited to 'openo-portal/portal-lifecyclemgr')
-rw-r--r--openo-portal/portal-lifecyclemgr/js/gsolcm.js58
1 files changed, 29 insertions, 29 deletions
diff --git a/openo-portal/portal-lifecyclemgr/js/gsolcm.js b/openo-portal/portal-lifecyclemgr/js/gsolcm.js
index a3390a7d..8fa7c7f4 100644
--- a/openo-portal/portal-lifecyclemgr/js/gsolcm.js
+++ b/openo-portal/portal-lifecyclemgr/js/gsolcm.js
@@ -39,17 +39,17 @@ lcmHandler.prototype = {
serviceDescription: $('#svcDesc').val(),
serviceParameters: collectServiceParameters(templateParameters)
}
- var s1ServiceUrl = '/openoapi/servicegateway/v1/services';
+ var gatewayService = '/openoapi/servicegateway/v1/services';
var serviceTemplate = fetchServiceTemplateBy(serviceInstance.serviceTemplateId);
if(serviceTemplate === undefined) {
return;
}
if(serviceTemplate.csarType === 'GSAR') {
- serviceInstance.serviceInstanceId = createGsoServiceInstance(s1ServiceUrl, serviceInstance);
+ serviceInstance.serviceInstanceId = createGsoServiceInstance(gatewayService, serviceInstance);
}else if(serviceTemplate.csarType === 'NSAR' || serviceTemplate.csarType === 'NFAR') {
- serviceInstance.serviceInstanceId = createNfvoServiceInstance(s1ServiceUrl, serviceInstance);
+ serviceInstance.serviceInstanceId = createNfvoServiceInstance(gatewayService, serviceInstance);
}else if(serviceTemplate.csarType === 'SSAR') {
- serviceInstance.serviceInstanceId = createSdnoServiceInstance(s1ServiceUrl, serviceInstance);
+ serviceInstance.serviceInstanceId = createSdnoServiceInstance(gatewayService, serviceInstance);
}
if(serviceInstance.serviceInstanceId === undefined) {
return;
@@ -174,7 +174,7 @@ function generateRequiredLabel(parameter) {
return requiredLabel;
}
-function createGsoServiceInstance(s1ServiceUrl, serviceInstance) {
+function createGsoServiceInstance(gatewayService, serviceInstance) {
var gsoLcmUri = '/openoapi/lifecyclemgr/v1/services';
var parameter = {
'name': serviceInstance.serviceName,
@@ -189,7 +189,7 @@ function createGsoServiceInstance(s1ServiceUrl, serviceInstance) {
$.ajax({
type : "POST",
async: false,
- url : s1ServiceUrl,
+ url : gatewayService,
contentType : "application/json",
dataType : "json",
data : JSON.stringify(parameter),
@@ -207,20 +207,20 @@ function createGsoServiceInstance(s1ServiceUrl, serviceInstance) {
return serviceInstanceId;
}
-function createNfvoServiceInstance(s1ServiceUrl, serviceInstance) {
+function createNfvoServiceInstance(gatewayService, serviceInstance) {
var nfvoLcmNsUrl = '/openoapi/nslcm/v1.0/ns';
- createServiceInstance(s1ServiceUrl, nfvoLcmNsUrl, serviceInstance);
+ createServiceInstance(gatewayService, nfvoLcmNsUrl, serviceInstance);
}
-function createServiceInstance(s1ServiceUrl, gatewayUri, serviceInstance) {
- var nsInstanceId = createNetworkService(s1ServiceUrl, gatewayUri, serviceInstance);
+function createServiceInstance(gatewayService, gatewayUri, serviceInstance) {
+ var nsInstanceId = createNetworkService(gatewayService, gatewayUri, serviceInstance);
if(nsInstanceId === undefined) {
return;
}
instantiateNetworkService(gatewayUri, nsInstanceId, serviceInstance);
}
-function createNetworkService(s1ServiceUrl, gatewayUri, serviceInstance) {
+function createNetworkService(gatewayService, gatewayUri, serviceInstance) {
var parameter = {
'nsdId': serviceInstance.serviceTemplateId,
'nsName': serviceInstance.serviceName,
@@ -232,7 +232,7 @@ function createNetworkService(s1ServiceUrl, gatewayUri, serviceInstance) {
$.ajax({
type : "POST",
async: false,
- url : s1ServiceUrl,
+ url : gatewayService,
contentType : "application/json",
dataType : "json",
data : JSON.stringify(parameter),
@@ -257,7 +257,7 @@ function instantiateNetworkService(gatewayUri, nsInstanceId, serviceInstance) {
$.ajax({
type : "POST",
async: false,
- url : s1ServiceUrl,
+ url : gatewayService,
contentType : "application/json",
dataType : "json",
data : JSON.stringify(parameter),
@@ -271,9 +271,9 @@ function instantiateNetworkService(gatewayUri, nsInstanceId, serviceInstance) {
return result;
}
-function createSdnoServiceInstance(s1ServiceUrl, serviceInstance) {
+function createSdnoServiceInstance(gatewayService, serviceInstance) {
var sdnoLcmNsUrl = '/openoapi/sdnonslcm/v1.0/ns';
- createServiceInstance(s1ServiceUrl, sdnoLcmNsUrl, serviceInstance);
+ createServiceInstance(gatewayService, sdnoLcmNsUrl, serviceInstance);
}
function updateTable(serviceInstance) {
@@ -325,44 +325,44 @@ function deleteServiceInstance(templateId, instanceId) {
if(serviceTemplate === undefined) {
return;
}
- var s1ServiceUrl = '/openoapi/servicegateway/v1/services';
+ var gatewayService = '/openoapi/servicegateway/v1/services';
var result = false;
if(serviceTemplate.csarType === 'GSAR') {
- result = deleteGsoServiceInstance(s1ServiceUrl, instanceId);
+ result = deleteGsoServiceInstance(gatewayService, instanceId);
}else if(serviceTemplate.csarType === 'NSAR' || serviceTemplate.csarType === 'NFAR') {
- result = deleteNfvoServiceInstance(s1ServiceUrl, instanceId);
+ result = deleteNfvoServiceInstance(gatewayService, instanceId);
}else if(serviceTemplate.csarType === 'SSAR') {
- result = deleteSdnoServiceInstance(s1ServiceUrl, instanceId);
+ result = deleteSdnoServiceInstance(gatewayService, instanceId);
}
return result;
}
-function deleteGsoServiceInstance(s1ServiceUrl, instanceId) {
+function deleteGsoServiceInstance(gatewayService, instanceId) {
var gsoLcmUrl = '/openoapi/lifecyclemgr/v1/services/'+ instanceId;
- return sendDeleteRequest(s1ServiceUrl, gsoLcmUrl);
+ return sendDeleteRequest(gatewayService, gsoLcmUrl);
}
-function deleteNfvoServiceInstance(s1ServiceUrl, instanceId) {
+function deleteNfvoServiceInstance(gatewayService, instanceId) {
var nfvoNsUrl = '/openoapi/nslcm/v1.0/ns/' + instanceId;
var nfvoNsTerminateUrl = nfvoNsUrl +'/terminate';
- var result = sendDeleteRequest(s1ServiceUrl, nfvoNsTerminateUrl);
+ var result = sendDeleteRequest(gatewayService, nfvoNsTerminateUrl);
if(result) {
- result = sendDeleteRequest(s1ServiceUrl, nfvoNsUrl);
+ result = sendDeleteRequest(gatewayService, nfvoNsUrl);
}
return result;
}
-function deleteSdnoServiceInstance(s1ServiceUrl, instanceId) {
+function deleteSdnoServiceInstance(gatewayService, instanceId) {
var sdnoNsUrl = '/openoapi/sdnonslcm/v1.0/ns/' + instanceId;
var sdnoNsTerminateUrl = sdnoNsUrl + '/terminate';
- var result = sendDeleteRequest(s1ServiceUrl, sdnoNsTerminateUrl);
+ var result = sendDeleteRequest(gatewayService, sdnoNsTerminateUrl);
if(result) {
- result = sendDeleteRequest(s1ServiceUrl, sdnoNsUrl);
+ result = sendDeleteRequest(gatewayService, sdnoNsUrl);
}
return result;
}
-function sendDeleteRequest(s1ServiceUrl, url) {
+function sendDeleteRequest(gatewayService, url) {
var parameter = {
URL: url
};
@@ -370,7 +370,7 @@ function sendDeleteRequest(s1ServiceUrl, url) {
$.ajax({
type : "DELETE",
async: false,
- url : s1ServiceUrl,
+ url : gatewayService,
contentType : "application/json",
dataType : "json",
data : JSON.stringify(parameter),