aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-be-plugins/etsi-nfv-nsd-csar-plugin
diff options
context:
space:
mode:
authorMichaelMorris <michael.morris@est.tech>2022-10-13 14:12:47 +0100
committerVasyl Razinkov <vasyl.razinkov@est.tech>2022-10-24 15:06:02 +0000
commit2edea35f59360fbc8b4f451fc573e02dc5f65010 (patch)
tree1b1ead43f07d813562b55e9dbad80efcd5308ea8 /catalog-be-plugins/etsi-nfv-nsd-csar-plugin
parentaa361f84ec4d137e7a64df8c7feaec6d2304c03e (diff)
Support import of VFCs with property constraints
Signed-off-by: MichaelMorris <michael.morris@est.tech> Issue-ID: SDC-4216 Change-Id: I19dce9f929535aa22cad6a1d95a213f42dd6e99c
Diffstat (limited to 'catalog-be-plugins/etsi-nfv-nsd-csar-plugin')
-rw-r--r--catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/tosca/yaml/NsdTemplateRepresenter.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/tosca/yaml/NsdTemplateRepresenter.java b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/tosca/yaml/NsdTemplateRepresenter.java
index cb8928f372..eba1a402de 100644
--- a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/tosca/yaml/NsdTemplateRepresenter.java
+++ b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/tosca/yaml/NsdTemplateRepresenter.java
@@ -60,7 +60,7 @@ public class NsdTemplateRepresenter extends Representer {
return handleToscaTemplate(javaBean, property, propertyValue, customTag);
}
if (javaBean instanceof ToscaPropertyConstraintValidValues) {
- return handleToscaPropertyConstraintValidValues(javaBean, property, propertyValue, customTag);
+ return handleToscaPropertyConstraintValidValues((ToscaPropertyConstraintValidValues)javaBean, property, propertyValue, customTag);
}
if (javaBean instanceof ToscaProperty) {
return handleToscaProperty(javaBean, property, propertyValue, customTag);
@@ -76,11 +76,11 @@ public class NsdTemplateRepresenter extends Representer {
return nodeTuple;
}
- private NodeTuple handleToscaPropertyConstraintValidValues(final Object javaBean, final Property property, final Object propertyValue,
+ private NodeTuple handleToscaPropertyConstraintValidValues(final ToscaPropertyConstraintValidValues javaBean, final Property property, final Object propertyValue,
final Tag customTag) {
final NodeTuple nodeTuple = super.representJavaBeanProperty(javaBean, property, propertyValue, customTag);
if ("validValues".equals(property.getName())) {
- final String validValuesEntryName = ToscaPropertyConstraintValidValues.getEntryToscaName("validValues");
+ final String validValuesEntryName = javaBean.getEntryToscaName("validValues");
return new NodeTuple(representData(validValuesEntryName), nodeTuple.getValueNode());
}
return nodeTuple;