aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/main
diff options
context:
space:
mode:
authorWojciech Sliwka <wojciech.sliwka@nokia.com>2019-03-21 11:28:05 +0100
committerWojciech Sliwka <wojciech.sliwka@nokia.com>2019-03-21 11:29:05 +0100
commit55e9181c17748a09f57d0a7823fb5fb10a0bda65 (patch)
treea2a9e1af551b5e5d4ec10e0debe2b98cab333174 /vid-app-common/src/main
parent926100a4e3d59d0dbee1f79570fca98d177d323b (diff)
Retrieve worfklows by model
Change logic to retrieve workflows from SO by modelVersionId instead of vnfName Change-Id: Id8ee8b85670dd4b56ce6a43c120e5ef053e5f617 Issue-ID: VID-444 Signed-off-by: Wojciech Sliwka <wojciech.sliwka@nokia.com>
Diffstat (limited to 'vid-app-common/src/main')
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/controller/WorkflowsController.java4
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/services/ExternalWorkflowsService.java2
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/services/ExternalWorkflowsServiceImpl.java4
-rw-r--r--vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js4
-rw-r--r--vid-app-common/src/main/webapp/app/vid/scripts/services/change-management.service.js4
5 files changed, 9 insertions, 9 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/WorkflowsController.java b/vid-app-common/src/main/java/org/onap/vid/controller/WorkflowsController.java
index a94481b9e..f413d5658 100644
--- a/vid-app-common/src/main/java/org/onap/vid/controller/WorkflowsController.java
+++ b/vid-app-common/src/main/java/org/onap/vid/controller/WorkflowsController.java
@@ -48,8 +48,8 @@ public class WorkflowsController extends VidRestrictedBaseController {
}
@RequestMapping(value = "workflows", method = RequestMethod.GET)
- public List<SOWorkflow> getWorkflows(@RequestParam(value = "vnfName") String vnfName){
- return externalWorkflowsService.getWorkflows(vnfName);
+ public List<SOWorkflow> getWorkflows(@RequestParam(value = "vnfModelId") String vnfModelId){
+ return externalWorkflowsService.getWorkflows(vnfModelId);
}
@RequestMapping(value = "remote-workflow-parameters/{id}", method = RequestMethod.GET)
diff --git a/vid-app-common/src/main/java/org/onap/vid/services/ExternalWorkflowsService.java b/vid-app-common/src/main/java/org/onap/vid/services/ExternalWorkflowsService.java
index da909a54d..2eae52f4f 100644
--- a/vid-app-common/src/main/java/org/onap/vid/services/ExternalWorkflowsService.java
+++ b/vid-app-common/src/main/java/org/onap/vid/services/ExternalWorkflowsService.java
@@ -25,7 +25,7 @@ import org.onap.vid.model.SOWorkflow;
import org.onap.vid.model.SOWorkflowParameterDefinitions;
public interface ExternalWorkflowsService {
- List<SOWorkflow> getWorkflows(String vnfName);
+ List<SOWorkflow> getWorkflows(String vnfModelId);
SOWorkflowParameterDefinitions getWorkflowParameterDefinitions(Long workflowId);
}
diff --git a/vid-app-common/src/main/java/org/onap/vid/services/ExternalWorkflowsServiceImpl.java b/vid-app-common/src/main/java/org/onap/vid/services/ExternalWorkflowsServiceImpl.java
index 1da03f0ac..e03b5463a 100644
--- a/vid-app-common/src/main/java/org/onap/vid/services/ExternalWorkflowsServiceImpl.java
+++ b/vid-app-common/src/main/java/org/onap/vid/services/ExternalWorkflowsServiceImpl.java
@@ -40,8 +40,8 @@ public class ExternalWorkflowsServiceImpl implements ExternalWorkflowsService {
}
@Override
- public List<SOWorkflow> getWorkflows(String vnfName) {
- MsoResponseWrapper2<SOWorkflows> msoResponse = mockedWorkflowsRestClient.getWorkflows(vnfName);
+ public List<SOWorkflow> getWorkflows(String vnfModelId) {
+ MsoResponseWrapper2<SOWorkflows> msoResponse = mockedWorkflowsRestClient.getWorkflows(vnfModelId);
validateSOResponse(msoResponse, SOWorkflows.class);
return convertMsoResponseToWorkflowList(msoResponse);
}
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js
index 88caef29e..a071a58de 100644
--- a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js
@@ -660,8 +660,8 @@
};
vm.loadRemoteWorkFlows = function () {
- let vnfNames = vm.changeManagement.vnfNames.map(vnfName => vnfName.name);
- return changeManagementService.getSOWorkflows(vnfNames)
+ let vnfModelIDs = vm.changeManagement.vnfNames.map(vnfName => vnfName.modelVersionId);
+ return changeManagementService.getSOWorkflows(vnfModelIDs)
.then(function (response) {
vm.remoteWorkflows = response.data || [];
}).catch(function (error) {
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/services/change-management.service.js b/vid-app-common/src/main/webapp/app/vid/scripts/services/change-management.service.js
index 2a06e75b1..4b45b891d 100644
--- a/vid-app-common/src/main/webapp/app/vid/scripts/services/change-management.service.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/services/change-management.service.js
@@ -41,8 +41,8 @@
});
};
- this.getSOWorkflows = function (vnfNames) {
- return $http.get(COMPONENT.GET_SO_WORKFLOWS, {params: {vnfName: vnfNames}})
+ this.getSOWorkflows = function (vnfIDs) {
+ return $http.get(COMPONENT.GET_SO_WORKFLOWS, {params: {vnfModelId: vnfIDs}})
.success(function (response) {
return {data: response};
}).catch(function (ex) {