diff options
author | FrancescoFioraEst <francesco.fiora@est.tech> | 2022-11-28 17:31:45 +0000 |
---|---|---|
committer | Francesco Fiora <francesco.fiora@est.tech> | 2022-11-30 10:44:45 +0000 |
commit | 92c372362b9c2dabc4bd0ff3eb6e65ad5659ffb4 (patch) | |
tree | 548c03b01ecdb78500d581c8da19b2923a02e468 /runtime-acm | |
parent | bff1cfc07634e2a28460deca196b5b877948684e (diff) |
Save ToscaServiceTemplate as Json in ACM
Save ToscaServiceTemplate as Json using DocToscaServiceTemplate
as model.
Issue-ID: POLICY-4468
Change-Id: I4c6f49012d091b87f0da4db2edcd5f16af2f4d5c
Signed-off-by: FrancescoFioraEst <francesco.fiora@est.tech>
Diffstat (limited to 'runtime-acm')
2 files changed, 3 insertions, 3 deletions
diff --git a/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/Application.java b/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/Application.java index d9298b15e..64e3e6c8f 100644 --- a/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/Application.java +++ b/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/Application.java @@ -41,7 +41,6 @@ import org.springframework.scheduling.annotation.EnableScheduling; }) @ConfigurationPropertiesScan("org.onap.policy.clamp.acm.runtime.main.parameters") @EntityScan({ - "org.onap.policy.models.tosca.simple.concepts", "org.onap.policy.clamp.models.acm.persistence.concepts" }) //@formatter:on diff --git a/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/commissioning/rest/CommissioningControllerTest.java b/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/commissioning/rest/CommissioningControllerTest.java index e11ceeeb7..8066df434 100644 --- a/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/commissioning/rest/CommissioningControllerTest.java +++ b/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/commissioning/rest/CommissioningControllerTest.java @@ -153,9 +153,10 @@ class CommissioningControllerTest extends CommonRestController { toscaProperty.setType("onap.datatypes.ToscaConceptIdentifier"); toscaDataType.getProperties().put(toscaProperty.getName(), toscaProperty); - serviceTemplate.getDataTypes().put(toscaDataType.getName(), toscaDataType); + var serviceTemplateUpdate = new ToscaServiceTemplate(serviceTemplate); + serviceTemplateUpdate.getDataTypes().put(toscaDataType.getName(), toscaDataType); invocationBuilder = super.sendRequest(COMMISSIONING_ENDPOINT + "/" + compositionId); - resp = invocationBuilder.put(Entity.json(serviceTemplate)); + resp = invocationBuilder.put(Entity.json(serviceTemplateUpdate)); assertEquals(Response.Status.OK.getStatusCode(), resp.getStatus()); commissioningResponse = resp.readEntity(CommissioningResponse.class); assertNotNull(commissioningResponse); |