diff options
Diffstat (limited to 'adapters/so-appc-orchestrator/src/main')
2 files changed, 29 insertions, 1 deletions
diff --git a/adapters/so-appc-orchestrator/src/main/java/org/onap/so/adapters/appc/orchestrator/client/beans/ConfigurationParameters.java b/adapters/so-appc-orchestrator/src/main/java/org/onap/so/adapters/appc/orchestrator/client/beans/ConfigurationParameters.java index b065e9a0c3..e5321067ac 100644 --- a/adapters/so-appc-orchestrator/src/main/java/org/onap/so/adapters/appc/orchestrator/client/beans/ConfigurationParameters.java +++ b/adapters/so-appc-orchestrator/src/main/java/org/onap/so/adapters/appc/orchestrator/client/beans/ConfigurationParameters.java @@ -1,5 +1,10 @@ package org.onap.so.adapters.appc.orchestrator.client.beans; +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; @@ -14,6 +19,8 @@ public class ConfigurationParameters { private String nodeList; @JsonProperty("file_parameter_content") private String fileParameterContent; + @JsonIgnore + private Map<String, String> additionalProperties = new HashMap<>(); @JsonProperty("vnf_name") @@ -50,4 +57,18 @@ public class ConfigurationParameters { this.fileParameterContent = fileParameterContent; } + @JsonAnyGetter + public Map<String, String> getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, String value) { + this.additionalProperties.put(name, value); + } + + public void setAdditionalProperties(Map<String, String> map) { + this.additionalProperties = map; + } + } diff --git a/adapters/so-appc-orchestrator/src/main/java/org/onap/so/adapters/appc/orchestrator/service/ApplicationControllerTaskImpl.java b/adapters/so-appc-orchestrator/src/main/java/org/onap/so/adapters/appc/orchestrator/service/ApplicationControllerTaskImpl.java index a174ccb05a..99d6b4dc12 100644 --- a/adapters/so-appc-orchestrator/src/main/java/org/onap/so/adapters/appc/orchestrator/service/ApplicationControllerTaskImpl.java +++ b/adapters/so-appc-orchestrator/src/main/java/org/onap/so/adapters/appc/orchestrator/service/ApplicationControllerTaskImpl.java @@ -32,10 +32,10 @@ public class ApplicationControllerTaskImpl { Optional<String> vserverId = Optional.empty(); Parameters parameters = new Parameters(); ConfigurationParameters configParams = new ConfigurationParameters(); + RequestParameters requestParams = new RequestParameters(); switch (request.getAction()) { case HealthCheck: - RequestParameters requestParams = new RequestParameters(); requestParams.setHostIpAddress(request.getApplicationControllerVnf().getVnfHostIpAddress()); parameters.setRequestParameters(requestParams); payload = Optional.of((mapper.getMapper().writeValueAsString(parameters))); @@ -75,6 +75,12 @@ public class ApplicationControllerTaskImpl { payload = Optional.of((mapper.getMapper().writeValueAsString(parameters))); break; case ConfigModify: + requestParams.setHostIpAddress(request.getApplicationControllerVnf().getVnfHostIpAddress()); + configParams.setAdditionalProperties(request.getConfigParams()); + parameters.setRequestParameters(requestParams); + parameters.setConfigurationParameters(configParams); + payload = Optional.of((mapper.getMapper().writeValueAsString(parameters))); + break; case ConfigScaleOut: break; case UpgradePreCheck: @@ -97,6 +103,7 @@ public class ApplicationControllerTaskImpl { vserverId = Optional .of(request.getApplicationControllerVnf().getApplicationControllerVm().getVserverId()); } + break; default: // errorMessage = "Unable to idenify Action request for AppCClient"; break; |