aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/org/onap/clamp/policy/microservice/MicroServicePolicy.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/onap/clamp/policy/microservice/MicroServicePolicy.java')
-rw-r--r--src/main/java/org/onap/clamp/policy/microservice/MicroServicePolicy.java13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/main/java/org/onap/clamp/policy/microservice/MicroServicePolicy.java b/src/main/java/org/onap/clamp/policy/microservice/MicroServicePolicy.java
index b3bd7e88..e997b430 100644
--- a/src/main/java/org/onap/clamp/policy/microservice/MicroServicePolicy.java
+++ b/src/main/java/org/onap/clamp/policy/microservice/MicroServicePolicy.java
@@ -129,10 +129,8 @@ public class MicroServicePolicy extends Policy implements Serializable {
ToscaConverterWithDictionarySupport toscaConverter) {
this(Policy.generatePolicyName("MICROSERVICE", service.getName(), service.getVersion(),
RandomStringUtils.randomAlphanumeric(3), RandomStringUtils.randomAlphanumeric(3)),
- loopElementModel.getPolicyModels().first(), false,
- new JsonObject(),
- loopElementModel, null, null);
- this.updateJsonRepresentation(toscaConverter);
+ loopElementModel.getPolicyModels().first(), false, new JsonObject(), loopElementModel, null, null);
+ this.updateJsonRepresentation(toscaConverter, service);
}
@Override
@@ -151,9 +149,10 @@ public class MicroServicePolicy extends Policy implements Serializable {
}
@Override
- public void updateJsonRepresentation(ToscaConverterWithDictionarySupport toscaConverter) {
- this.setJsonRepresentation(toscaConverter.convertToscaToJsonSchemaObject(this.getPolicyModel().getPolicyModelTosca(),
- this.getPolicyModel().getPolicyModelType()));
+ public void updateJsonRepresentation(ToscaConverterWithDictionarySupport toscaConverter, Service serviceModel) {
+ this.setJsonRepresentation(
+ toscaConverter.convertToscaToJsonSchemaObject(this.getPolicyModel().getPolicyModelTosca(),
+ this.getPolicyModel().getPolicyModelType(), serviceModel));
}
public Boolean getShared() {