summaryrefslogtreecommitdiffstats
path: root/vid-app-common
diff options
context:
space:
mode:
authorOfir Sonsino <os0695@att.com>2017-12-03 17:18:04 +0200
committerOfir Sonsino <os0695@att.com>2017-12-03 17:18:04 +0200
commitf32e4ab28de2fcc7adb3ada4ff9721bc9a5bd1a5 (patch)
treeae5e1b29464ae2ac994f886492b578aa18338b9a /vid-app-common
parent9c744cb1596cea5134fa5926d0ffde2bbc57a4e4 (diff)
Bugfix: Unable to delete a VFModule
Change-Id: I7f580977861ce479b332ff2bb2b16542f832eff6 Issue-ID: VID-95 Signed-off-by: Ofir Sonsino <os0695@att.com>
Diffstat (limited to 'vid-app-common')
-rwxr-xr-xvid-app-common/src/main/java/org/openecomp/vid/controller/MsoController.java2
-rw-r--r--vid-app-common/src/main/java/org/openecomp/vid/mso/MsoBusinessLogic.java7
2 files changed, 5 insertions, 4 deletions
diff --git a/vid-app-common/src/main/java/org/openecomp/vid/controller/MsoController.java b/vid-app-common/src/main/java/org/openecomp/vid/controller/MsoController.java
index 9a064b00..451b19de 100755
--- a/vid-app-common/src/main/java/org/openecomp/vid/controller/MsoController.java
+++ b/vid-app-common/src/main/java/org/openecomp/vid/controller/MsoController.java
@@ -405,7 +405,7 @@ public class MsoController extends RestrictedBaseController {
MsoBusinessLogic mbl = new MsoBusinessLogic();
- MsoResponseWrapper w = mbl.deleteVfModule(mso_request, serviceInstanceId, vnfInstanceId);
+ MsoResponseWrapper w = mbl.deleteVfModule(mso_request, serviceInstanceId, vnfInstanceId, vfModuleId);
// always return OK, the MSO status code is embedded in the body
return (new ResponseEntity<String>(w.getResponse(), HttpStatus.OK));
diff --git a/vid-app-common/src/main/java/org/openecomp/vid/mso/MsoBusinessLogic.java b/vid-app-common/src/main/java/org/openecomp/vid/mso/MsoBusinessLogic.java
index cd6003ad..f6847e45 100644
--- a/vid-app-common/src/main/java/org/openecomp/vid/mso/MsoBusinessLogic.java
+++ b/vid-app-common/src/main/java/org/openecomp/vid/mso/MsoBusinessLogic.java
@@ -153,7 +153,7 @@ public class MsoBusinessLogic {
return msoClientInterface.deleteVnf(requestDetails, vnf_endpoint);
}
- public MsoResponseWrapper deleteVfModule(RequestDetails requestDetails, String serviceInstanceId, String vnfInstanceId) throws Exception{
+ public MsoResponseWrapper deleteVfModule(RequestDetails requestDetails, String serviceInstanceId, String vnfInstanceId, String vfModuleId) throws Exception{
String methodName = "deleteVfModule";
logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start");
@@ -164,8 +164,9 @@ public class MsoBusinessLogic {
throw exception;
}
- String svc_endpoint = endpoint.replaceFirst(SVC_INSTANCE_ID, serviceInstanceId);
- String delete_vf_endpoint = svc_endpoint.replaceFirst(VNF_INSTANCE_ID, vnfInstanceId);
+ String vf__modules_endpoint = endpoint.replaceFirst(SVC_INSTANCE_ID, serviceInstanceId).replaceFirst(VNF_INSTANCE_ID, vnfInstanceId);
+
+ String delete_vf_endpoint = vf__modules_endpoint + '/' + vfModuleId;
return msoClientInterface.deleteVfModule(requestDetails, delete_vf_endpoint);
}