aboutsummaryrefslogtreecommitdiffstats
path: root/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-service/src/main
diff options
context:
space:
mode:
authorAndrewLamb <andrew.a.lamb@est.tech>2020-10-01 10:32:00 +0100
committerAndrewLamb <andrew.a.lamb@est.tech>2020-10-02 11:25:55 +0100
commit57aa480c5a0e9a823c13024f71e84f7673d7ed23 (patch)
treef8fd8d5b33a6543cb98135ac7636b63ddcfb6009 /so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-service/src/main
parentf2f9bec9aee2de5135226b24c70708a5df5ca525 (diff)
SO-ETSI-NFVO Delete NS Backend Service
Issue-ID: SO-2870 Change-Id: I476e78a7f528d460eb6dc9bd9019e7407ff167e3 Signed-off-by: AndrewLamb <andrew.a.lamb@est.tech>
Diffstat (limited to 'so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-service/src/main')
-rw-r--r--so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-service/src/main/java/org/onap/so/etsi/nfvo/ns/lcm/lifecycle/NsLifeCycleManager.java5
-rw-r--r--so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-service/src/main/java/org/onap/so/etsi/nfvo/ns/lcm/rest/NsLifecycleManagementController.java5
2 files changed, 8 insertions, 2 deletions
diff --git a/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-service/src/main/java/org/onap/so/etsi/nfvo/ns/lcm/lifecycle/NsLifeCycleManager.java b/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-service/src/main/java/org/onap/so/etsi/nfvo/ns/lcm/lifecycle/NsLifeCycleManager.java
index 2ebf55ff7f..ae9f55e1c5 100644
--- a/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-service/src/main/java/org/onap/so/etsi/nfvo/ns/lcm/lifecycle/NsLifeCycleManager.java
+++ b/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-service/src/main/java/org/onap/so/etsi/nfvo/ns/lcm/lifecycle/NsLifeCycleManager.java
@@ -82,4 +82,9 @@ public class NsLifeCycleManager {
return etsiSoNsLcmManagerUrlProvider.getNsLcmOpOccUri(nsLcmOpOccId);
}
+
+ public void deleteNs(final String nsInstanceId) {
+ logger.info("Will execute Delete Ns for nsInstanceId: {}", nsInstanceId);
+ jobExecutorService.runDeleteNsJob(nsInstanceId);
+ }
}
diff --git a/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-service/src/main/java/org/onap/so/etsi/nfvo/ns/lcm/rest/NsLifecycleManagementController.java b/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-service/src/main/java/org/onap/so/etsi/nfvo/ns/lcm/rest/NsLifecycleManagementController.java
index cfda89f3f0..78ab9e96cc 100644
--- a/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-service/src/main/java/org/onap/so/etsi/nfvo/ns/lcm/rest/NsLifecycleManagementController.java
+++ b/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-service/src/main/java/org/onap/so/etsi/nfvo/ns/lcm/rest/NsLifecycleManagementController.java
@@ -35,7 +35,6 @@ import org.onap.so.etsi.nfvo.ns.lcm.model.NsInstancesNsInstance;
import org.onap.so.etsi.nfvo.ns.lcm.model.TerminateNsRequest;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.DeleteMapping;
@@ -109,7 +108,9 @@ public class NsLifecycleManagementController {
produces = {MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
public ResponseEntity<?> deleteNs(@PathVariable("nsInstanceId") final String nsInstanceId) {
logger.debug("Received delete NS request for nsInstanceId: {}", nsInstanceId);
- return ResponseEntity.status(HttpStatus.NOT_IMPLEMENTED).body("Operation is not supported yet");
+ nsLifeCycleManager.deleteNs(nsInstanceId);
+ logger.info("Successfully deleted NS for nsInstanceId: {}", nsInstanceId);
+ return ResponseEntity.noContent().build();
}
/**