diff options
Diffstat (limited to 'mso-api-handlers/mso-api-handler-common/src/main')
5 files changed, 37 insertions, 3 deletions
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/camundabeans/CamundaVIDRequest.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/camundabeans/CamundaVIDRequest.java index 9099b48f11..829f8ce30c 100644 --- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/camundabeans/CamundaVIDRequest.java +++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/camundabeans/CamundaVIDRequest.java @@ -109,6 +109,9 @@ public class CamundaVIDRequest { @JsonProperty(CommonConstants.REQUEST_URI) private CamundaInput requestUri; + + @JsonProperty(CommonConstants.INSTANCE_GROUP_ID) + private CamundaInput instanceGroupId; @JsonProperty(CommonConstants.CAMUNDA_SERVICE_INPUT) public CamundaInput getServiceInput() { @@ -326,6 +329,14 @@ public class CamundaVIDRequest { public void setRecipeParams(CamundaInput recipeParams) { this.recipeParams = recipeParams; } + @JsonProperty(CommonConstants.INSTANCE_GROUP_ID) + public void setInstanceGroupId(CamundaInput instanceGroupIdInput) { + this.instanceGroupId = instanceGroupIdInput; + } + @JsonProperty(CommonConstants.INSTANCE_GROUP_ID) + public CamundaInput getInstanceGroupId() { + return instanceGroupId; + } @Override public String toString() { @@ -335,4 +346,6 @@ public class CamundaVIDRequest { return "CamundaRequest"; } + + } diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/CamundaClient.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/CamundaClient.java index 3936cca08d..34cfe18508 100644 --- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/CamundaClient.java +++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/CamundaClient.java @@ -129,7 +129,8 @@ public class CamundaClient extends RequestClient{ msoLogger.debug(CAMUNDA_URL_MESAGE+ url); String jsonReq = wrapVIDRequest(parameterObject.getRequestId(), parameterObject.isBaseVfModule(), parameterObject.getRecipeTimeout(), parameterObject.getRequestAction(), parameterObject.getServiceInstanceId(), parameterObject.getCorrelationId(), parameterObject.getVnfId(), parameterObject.getVfModuleId(), parameterObject.getVolumeGroupId(), parameterObject.getNetworkId(), parameterObject.getConfigurationId(), - parameterObject.getServiceType(), parameterObject.getVnfType(), parameterObject.getVfModuleType(), parameterObject.getNetworkType(), parameterObject.getRequestDetails(), parameterObject.getApiVersion(), parameterObject.isaLaCarte(), parameterObject.getRequestUri(), parameterObject.getRecipeParamXsd()); + parameterObject.getServiceType(), parameterObject.getVnfType(), parameterObject.getVfModuleType(), parameterObject.getNetworkType(), parameterObject.getRequestDetails(), parameterObject.getApiVersion(), parameterObject.isaLaCarte(), parameterObject.getRequestUri(), parameterObject.getRecipeParamXsd(), + parameterObject.getInstanceGroupId()); StringEntity input = new StringEntity(jsonReq); input.setContentType(CommonConstants.CONTENT_TYPE_JSON); @@ -200,7 +201,8 @@ public class CamundaClient extends RequestClient{ int recipeTimeout, String requestAction, String serviceInstanceId, String correlationId, String vnfId, String vfModuleId, String volumeGroupId, String networkId, String configurationId, String serviceType, String vnfType, String vfModuleType, String networkType, - String requestDetails, String apiVersion, boolean aLaCarte, String requestUri, String paramXsd){ + String requestDetails, String apiVersion, boolean aLaCarte, String requestUri, String paramXsd, + String instanceGroupId){ String jsonReq = null; try{ @@ -226,6 +228,7 @@ public class CamundaClient extends RequestClient{ CamundaInput apiVersionInput = new CamundaInput(); CamundaInput requestUriInput = new CamundaInput(); CamundaInput recipeParamsInput = new CamundaInput(); + CamundaInput instanceGroupIdInput = new CamundaInput(); //host.setValue(parseURL()); requestIdInput.setValue(StringUtils.defaultString(requestId)); @@ -247,6 +250,7 @@ public class CamundaClient extends RequestClient{ apiVersionInput.setValue(StringUtils.defaultString(apiVersion)); requestUriInput.setValue(StringUtils.defaultString(requestUri)); recipeParamsInput.setValue(paramXsd); + instanceGroupIdInput.setValue(StringUtils.defaultString(instanceGroupId)); serviceInput.setValue(requestDetails); camundaRequest.setServiceInput(serviceInput); @@ -271,6 +275,7 @@ public class CamundaClient extends RequestClient{ camundaRequest.setApiVersion(apiVersionInput); camundaRequest.setRequestUri(requestUriInput); camundaRequest.setRecipeParams(recipeParamsInput); + camundaRequest.setInstanceGroupId(instanceGroupIdInput); ObjectMapper mapper = new ObjectMapper(); mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, true); diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/CommonConstants.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/CommonConstants.java index d1b629f60c..b75ad9e415 100644 --- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/CommonConstants.java +++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/CommonConstants.java @@ -79,6 +79,7 @@ public final class CommonConstants { public static final String X_MINOR_VERSION = "X-MinorVersion"; public static final String X_PATCH_VERSION = "X-PatchVersion"; public static final String X_LATEST_VERSION = "X-LatestVersion"; + public static final String INSTANCE_GROUP_ID = "instanceGroupId"; private CommonConstants () { // prevent creating an instance of this class diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/RequestClientParameter.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/RequestClientParameter.java index 89db934985..1d18e2b02c 100644 --- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/RequestClientParameter.java +++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/RequestClientParameter.java @@ -43,6 +43,7 @@ public class RequestClientParameter { private boolean aLaCarte; private String recipeParamXsd; private String requestUri; + private String instanceGroupId; private RequestClientParameter(Builder builder) { requestId = builder.requestId; @@ -65,6 +66,7 @@ public class RequestClientParameter { apiVersion = builder.apiVersion; aLaCarte = builder.aLaCarte; requestUri = builder.requestUri; + instanceGroupId = builder.instanceGroupId; } @@ -147,6 +149,10 @@ public class RequestClientParameter { public String getRequestUri() { return requestUri; } + + public String getInstanceGroupId() { + return instanceGroupId; + } public static class Builder { private String requestId; @@ -169,6 +175,7 @@ public class RequestClientParameter { private boolean aLaCarte = false; private String recipeParamXsd; private String requestUri; + private String instanceGroupId; public Builder setRequestId(String requestId) { this.requestId = requestId; @@ -269,10 +276,16 @@ public class RequestClientParameter { this.requestUri = requestUri; return this; } + + public Builder setInstanceGroupId(String instanceGroupId) { + this.instanceGroupId = instanceGroupId; + return this; + } public RequestClientParameter build(){ return new RequestClientParameter(this); } + } diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/Action.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/Action.java index 3a35c23a86..03d68f88e8 100644 --- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/Action.java +++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/Action.java @@ -44,5 +44,7 @@ public enum Action { scaleInstance, deactivateAndCloudDelete, scaleOut, - recreateInstance + recreateInstance, + addMembers, + removeMembers } |