diff options
author | sebdet <sebastien.determe@intl.att.com> | 2019-10-09 14:34:16 +0200 |
---|---|---|
committer | sebdet <sebastien.determe@intl.att.com> | 2019-10-09 16:05:38 +0200 |
commit | 4a00d035390b67c175669fb22e2455ce3e8bb667 (patch) | |
tree | aae9069ca54424c76f25452de81c3770b5374c6d /src/test/java/org/onap/clamp/clds | |
parent | 7d277f0b30cd35b7e8d758863c8cc9eadb62eecd (diff) |
Add policy model id in tosca parser
Add the parameter policy model id when converting the tosca to a Json
schema for the UI so that it takes well what is provided in the
blueprint
Issue-ID: CLAMP-534
Change-Id: Ie5e9e0c495c3969f25cca36d8f3d74c82f1f63b6
Signed-off-by: sebdet <sebastien.determe@intl.att.com>
Diffstat (limited to 'src/test/java/org/onap/clamp/clds')
-rw-r--r-- | src/test/java/org/onap/clamp/clds/tosca/ToscaYamlToJsonConvertorTest.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/test/java/org/onap/clamp/clds/tosca/ToscaYamlToJsonConvertorTest.java b/src/test/java/org/onap/clamp/clds/tosca/ToscaYamlToJsonConvertorTest.java index 00c9b7d0..18f77cba 100644 --- a/src/test/java/org/onap/clamp/clds/tosca/ToscaYamlToJsonConvertorTest.java +++ b/src/test/java/org/onap/clamp/clds/tosca/ToscaYamlToJsonConvertorTest.java @@ -45,7 +45,8 @@ public class ToscaYamlToJsonConvertorTest { String toscaModelYaml = ResourceFileUtil.getResourceAsString("tosca/tosca_example.yaml"); ToscaYamlToJsonConvertor convertor = new ToscaYamlToJsonConvertor(); - String parsedJsonSchema = convertor.parseToscaYaml(toscaModelYaml); + String parsedJsonSchema = convertor.parseToscaYaml(toscaModelYaml, + "onap.policies.monitoring.cdap.tca.hi.lo.app"); assertNotNull(parsedJsonSchema); JSONAssert.assertEquals(ResourceFileUtil.getResourceAsString("tosca/policy-yaml-to-json.json"), parsedJsonSchema, true); @@ -62,7 +63,7 @@ public class ToscaYamlToJsonConvertorTest { String toscaModelYaml = ResourceFileUtil.getResourceAsString("tosca/tosca-with-constraints.yaml"); ToscaYamlToJsonConvertor convertor = new ToscaYamlToJsonConvertor(); - String parsedJsonSchema = convertor.parseToscaYaml(toscaModelYaml); + String parsedJsonSchema = convertor.parseToscaYaml(toscaModelYaml,"onap.policies.monitoring.example.app"); assertNotNull(parsedJsonSchema); JSONAssert.assertEquals(ResourceFileUtil.getResourceAsString("tosca/policy-yaml-to-json-with-constraints" + ".json"), @@ -80,7 +81,7 @@ public class ToscaYamlToJsonConvertorTest { String toscaModelYaml = ResourceFileUtil.getResourceAsString("tosca/tosca-with-datatypes.yaml"); ToscaYamlToJsonConvertor convertor = new ToscaYamlToJsonConvertor(); - String parsedJsonSchema = convertor.parseToscaYaml(toscaModelYaml); + String parsedJsonSchema = convertor.parseToscaYaml(toscaModelYaml,"onap.policies.monitoring.example.app"); assertNotNull(parsedJsonSchema); JSONAssert.assertEquals(ResourceFileUtil.getResourceAsString("tosca/policy-yaml-to-json-with-datatypes.json"), parsedJsonSchema, true); |