X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fonap%2Fclamp%2Fclds%2Fclient%2FPolicyClient.java;h=54b3fbb48d1d63b81dfea8ba2c50646808e5269d;hb=1de3466a56a245223752c34423b7858117b56b73;hp=cb86acbd363c48fdb33485806d3671fe39445720;hpb=8ecddd315559babae58e02d2e9a98da11fe54aa3;p=clamp.git diff --git a/src/main/java/org/onap/clamp/clds/client/PolicyClient.java b/src/main/java/org/onap/clamp/clds/client/PolicyClient.java index cb86acbd..54b3fbb4 100644 --- a/src/main/java/org/onap/clamp/clds/client/PolicyClient.java +++ b/src/main/java/org/onap/clamp/clds/client/PolicyClient.java @@ -37,6 +37,7 @@ import java.util.UUID; import javax.ws.rs.BadRequestException; +import org.onap.clamp.clds.client.req.TcaRequestFormatter; import org.onap.clamp.clds.exception.policy.PolicyClientException; import org.onap.clamp.clds.model.prop.ModelProperties; import org.onap.clamp.clds.model.refprop.RefProp; @@ -62,7 +63,6 @@ import org.springframework.context.ApplicationContext; * Policy utility methods - specifically, send the policy. */ public class PolicyClient { - protected static final String POLICY_PREFIX_BASE = "Config_"; protected static final String POLICY_PREFIX_BRMS_PARAM = "Config_BRMS_Param_"; protected static final String POLICY_PREFIX_MICROSERVICE = "Config_MS_"; @@ -110,8 +110,6 @@ public class PolicyClient { // Data Issue: No policyDescription given. policyParameters.setPolicyDescription(refProp.getStringValue("op.policyDescription")); - policyParameters.setAttributes(attributes); - // Set a random UUID(Mandatory) policyParameters.setRequestID(UUID.fromString(policyRequestUuid)); String policyNamePrefix = refProp.getStringValue("policy.op.policyNamePrefix"); @@ -213,16 +211,12 @@ public class PolicyClient { public String sendMicroServiceInOther(String configBody, ModelProperties prop, String policyRequestUuid) { PolicyParameters policyParameters = new PolicyParameters(); - - // Set Policy Type + // Set Policy Type policyParameters.setPolicyConfigType(PolicyConfigType.MicroService); + policyParameters.setOnapName("DCAE"); policyParameters.setEcompName(refProp.getStringValue("policy.onap.name")); policyParameters.setPolicyName(prop.getCurrentPolicyScopeAndPolicyName()); - policyParameters.setConfigBody(configBody); - policyParameters.setConfigBodyType(PolicyType.OTHER); - - policyParameters.setRequestID(UUID.fromString(policyRequestUuid)); String policyNamePrefix = refProp.getStringValue("policy.ms.policyNamePrefix"); // Adding this line to clear the policy id from policy name while