aboutsummaryrefslogtreecommitdiffstats
path: root/adapters/mso-vfc-adapter
diff options
context:
space:
mode:
authorSeshu Kumar M <seshu.kumar.m@huawei.com>2018-05-23 06:36:18 +0000
committerGerrit Code Review <gerrit@onap.org>2018-05-23 06:36:18 +0000
commitaa59e0bf4ba42f1bbc2ef8593d872645b93d0340 (patch)
tree66670744a4ce96e6e816d6a5990e539409e2c40d /adapters/mso-vfc-adapter
parent58b633b666f5608fbd00c75edf0b2e6d5c0d1d16 (diff)
parent3d49e5ad7f6af8803adae587c0e82dd813a85877 (diff)
Merge "add scale function in VfcAdapterRest.java"
Diffstat (limited to 'adapters/mso-vfc-adapter')
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/openecomp/mso/adapters/vfc/VfcAdapterRest.java27
1 files changed, 27 insertions, 0 deletions
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/openecomp/mso/adapters/vfc/VfcAdapterRest.java b/adapters/mso-vfc-adapter/src/main/java/org/openecomp/mso/adapters/vfc/VfcAdapterRest.java
index ebbcf1b1ff..c1f19b7ffb 100644
--- a/adapters/mso-vfc-adapter/src/main/java/org/openecomp/mso/adapters/vfc/VfcAdapterRest.java
+++ b/adapters/mso-vfc-adapter/src/main/java/org/openecomp/mso/adapters/vfc/VfcAdapterRest.java
@@ -180,6 +180,33 @@ public class VfcAdapterRest {
}
}
+ /**
+ * Scale NS instance
+ * <br>
+ *
+ * @param servletReq The http request
+ * @param nsInstanceId The NS instance id
+ * @return
+ * @since ONAP Amsterdam Release
+ */
+ @POST
+ @Path("/ns/{nsInstanceId}/scale")
+ @Consumes({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
+ @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
+ public Response scaleNfvoNs(String data, @PathParam("nsInstanceId") String nsInstanceId) {
+ try {
+ ValidateUtil.assertObjectNotNull(data);
+ LOGGER.debug("Scale Ns Request Received.Body from request is {}" + data);
+ NSResourceInputParameter nsInput = JsonUtil.unMarshal(data, NSResourceInputParameter.class);
+ RestfulResponse rsp = driverMgr.scaleNs(nsInstanceId, nsInput);
+ return buildResponse(rsp);
+ } catch(ApplicationException e) {
+ LOGGER.debug("ApplicationException: ", e);
+ return e.buildErrorResponse();
+ }
+ }
+
+
/**
* build response from restful response <br>
*