diff options
author | 2019-01-10 12:42:59 +0000 | |
---|---|---|
committer | 2019-01-10 12:42:59 +0000 | |
commit | 659874df80409170e57b6dd6197eb3a81eb3468e (patch) | |
tree | 08e79fd57aa0ed299586fd88f69f87a5a2f5ded1 /vid-app-common/src/main/webapp/app/vid/scripts/services/msoService.js | |
parent | 143784a849ece4fc35cc290e33f829b72bf1fc79 (diff) | |
parent | 6ad41e3ccd398a2721f41ad61c80b7bb03f7d127 (diff) |
Merge "Merge from ECOMP's repository"
Diffstat (limited to 'vid-app-common/src/main/webapp/app/vid/scripts/services/msoService.js')
-rwxr-xr-x | vid-app-common/src/main/webapp/app/vid/scripts/services/msoService.js | 38 |
1 files changed, 33 insertions, 5 deletions
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/services/msoService.js b/vid-app-common/src/main/webapp/app/vid/scripts/services/msoService.js index 273f8e9e..790f7988 100755 --- a/vid-app-common/src/main/webapp/app/vid/scripts/services/msoService.js +++ b/vid-app-common/src/main/webapp/app/vid/scripts/services/msoService.js @@ -80,6 +80,30 @@ var MsoService = function($http, $log, $q, PropertyService, AaiService, UtilityS };
+ var buildPayloadForActivateFabricConfiguration = function (model, userId) {
+ var requestDetails = {
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": model.service.invariantUuid,
+ "modelVersionId": model.service.uuid,
+ "modelName": model.service.name,
+ "modelVersion": model.service.version
+ },
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": userId
+ },
+ "requestParameters": {
+ "aLaCarte": false
+ }
+ };
+
+ $log.debug("Service Activate Fabric Configuration payload", requestDetails);
+
+ return requestDetails;
+
+ };
+
var activateInstance = function(requestParams) {
var requestDetails = buildPayloadForServiceActivateDeactivate(requestParams.model, requestParams.userId);
@@ -94,12 +118,10 @@ var MsoService = function($http, $log, $q, PropertyService, AaiService, UtilityS requestDetails);
};
- var sendPostRequest = function(url, requestDetails) {
+ var sendPostRequestWithBody = function(url, requestBody) {
var deferred = $q.defer();
if (url) {
- $http.post(url, {
- requestDetails: requestDetails
- }, {
+ $http.post(url, requestBody, {
timeout: PropertyService.getServerResponseTimeoutMsec()
}).success(function (response) {
deferred.resolve({data: response});
@@ -111,9 +133,16 @@ var MsoService = function($http, $log, $q, PropertyService, AaiService, UtilityS return deferred.promise;
};
+ var sendPostRequest = function(url, requestDetails) {
+ return sendPostRequestWithBody(url, {requestDetails: requestDetails});
+ };
+
return {
createInstance : requestInstanceUpdate,
deleteInstance : requestInstanceUpdate,
+ createAndDeleteInstance: function(requestParams) {
+ return sendPostRequest("mso/" + requestParams.url, requestParams.requestDetails);
+ },
getOrchestrationRequest : function(requestId, successCallbackFunction) {
$log.debug("MsoService:getOrchestrationRequest: requestId: "
+ requestId);
@@ -312,7 +341,6 @@ var MsoService = function($http, $log, $q, PropertyService, AaiService, UtilityS "modelCustomizationName": requestParams.configurationModelInfo.modelCustomizationName
},
"cloudConfiguration": {
- // "tenantId": ????
"lcpCloudRegionId": requestParams.portMirroringConfigFields.lcpRegion.value
},
"requestInfo": {
|