diff options
author | xg353y <xg353y@intl.att.com> | 2017-11-03 10:30:12 +0100 |
---|---|---|
committer | xg353y <xg353y@intl.att.com> | 2017-11-03 10:33:44 +0100 |
commit | 46e7f8e7eebaeeab27b5024b13ea28a9fbf88543 (patch) | |
tree | 3b95d13da4562d1d686ab6c657035fd9b24b4670 /src/main | |
parent | 451f53ce0a02532b3da6a9cc2fbb59fee17cbe53 (diff) |
Update the content send to Policy
Adding tca_policy tag under content section, while sending configBody to
Policy.
Change-Id: I184d366b0cda24ff6b95c4e8c29d0a90bde7ba06
Issue-ID: CLAMP-62
Signed-off-by: xg353y <xg353y@intl.att.com>
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/org/onap/clamp/clds/client/req/TcaRequestFormatter.java | 2 | ||||
-rw-r--r-- | src/main/resources/clds/clds-reference.properties | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/org/onap/clamp/clds/client/req/TcaRequestFormatter.java b/src/main/java/org/onap/clamp/clds/client/req/TcaRequestFormatter.java index a71a5f37..9698a995 100644 --- a/src/main/java/org/onap/clamp/clds/client/req/TcaRequestFormatter.java +++ b/src/main/java/org/onap/clamp/clds/client/req/TcaRequestFormatter.java @@ -75,7 +75,7 @@ public class TcaRequestFormatter { String policyName = refProp.getStringValue("tca.policyid.prefix") + modelProperties.getCurrentPolicyScopeAndPolicyName(); ((ObjectNode) rootNode).put("policyName", policyName); ((ObjectNode) rootNode).put("description", "MicroService vCPE Policy"); - ((ObjectNode) rootNode).replace("content", createPolicyContent(refProp, modelProperties, service, policyName, tca)); + ((ObjectNode) rootNode.get("content")).replace("tca_policy", createPolicyContent(refProp, modelProperties, service, policyName, tca)); String tcaPolicyReq = rootNode.toString(); logger.info("tcaPolicyReq=" + tcaPolicyReq); diff --git a/src/main/resources/clds/clds-reference.properties b/src/main/resources/clds/clds-reference.properties index 3bf018d3..ab33d5ce 100644 --- a/src/main/resources/clds/clds-reference.properties +++ b/src/main/resources/clds/clds-reference.properties @@ -48,7 +48,7 @@ policy.op.policyNamePrefix=Config_BRMS_Param_ # TCA MicroService Policy request build properties
#
tca.policyid.prefix=DCAE.Config_
-tca.policy.template={"service": "policy_tosca_tca", "version": "1.0.0", "location": "SampleServiceLocation", "configName": "SampleConfigName", "uuid": "test", "policyScope": "resource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e", "templateVersion": "OpenSource.version.1", "policyName": "MicroServicevCPE", "description": "MicroService Policy", "priority": "1", "riskType": "SampleRiskType", "riskLevel": "1", "guard": "False","content":{}}
+tca.policy.template={"service": "tca_policy", "version": "1.0.0", "location": "SampleServiceLocation", "configName": "SampleConfigName", "uuid": "test", "policyScope": "resource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e", "templateVersion": "OpenSource.version.1", "policyName": "MicroServicevCPE", "description": "MicroService Policy", "priority": "1", "riskType": "SampleRiskType", "riskLevel": "1", "guard": "False","content":{"tca_policy": {}}}
tca.template= {"domain": "measurementsForVfScaling", "metricsPerEventName": [{"eventName": "???", "controlLoopSchemaType":"VNF","policyScope": "DCAE","policyName": "???","policyVersion": "v0.0.1","thresholds": []}]}
tca.thresholds.template={"closedLoopControlName": "???", "version": "1.0.2","fieldPath": "?????", "thresholdValue": 0,"direction": "???","severity": "MAJOR", "closedLoopEventStatus": "???"}
|