diff options
author | sebdet <sebastien.determe@intl.att.com> | 2019-05-09 11:03:53 +0200 |
---|---|---|
committer | sebdet <sebastien.determe@intl.att.com> | 2019-05-09 11:53:52 +0200 |
commit | 4545e770dd5ab7cab80ea115ed326e60a944cbc4 (patch) | |
tree | de696c84c0f7cb2e18ac441cbdfbd08d56477805 /src/test | |
parent | c87a8c05937361d7d5fd239c75f8bca60f543068 (diff) |
Fix model type searching
Change the way we get the model type in the dcaeblueprint
Issue-ID: CLAMP-370
Change-Id: I961a20e5d993049c73acd67b6cbfe245e1676dda
Signed-off-by: sebdet <sebastien.determe@intl.att.com>
Diffstat (limited to 'src/test')
7 files changed, 14 insertions, 9 deletions
diff --git a/src/test/java/org/onap/clamp/clds/sdc/controller/installer/BlueprintParserTest.java b/src/test/java/org/onap/clamp/clds/sdc/controller/installer/BlueprintParserTest.java index 7a1f9f0ac..dec639770 100644 --- a/src/test/java/org/onap/clamp/clds/sdc/controller/installer/BlueprintParserTest.java +++ b/src/test/java/org/onap/clamp/clds/sdc/controller/installer/BlueprintParserTest.java @@ -144,7 +144,7 @@ public class BlueprintParserTest { MicroService expected = new MicroService(SECOND_APPP, MODEL_TYPE1, FIRST_APPP, ""); Entry<String, JsonElement> entry = jsonObject.entrySet().iterator().next(); - MicroService actual = new BlueprintParser().getNodeRepresentation(entry, jsonObject); + MicroService actual = new BlueprintParser().getNodeRepresentation(entry, jsonObject, null); Assert.assertEquals(expected, actual); } diff --git a/src/test/resources/clds/blueprint-with-microservice-chain.yaml b/src/test/resources/clds/blueprint-with-microservice-chain.yaml index 4a7e5d7aa..fa2d72052 100644 --- a/src/test/resources/clds/blueprint-with-microservice-chain.yaml +++ b/src/test/resources/clds/blueprint-with-microservice-chain.yaml @@ -31,7 +31,7 @@ node_templates: service_component_name_override: second_app image: { get_input: second_app_docker_image } policy_id: - policy_type_id: type2 + policy_model_id: "type2" interfaces: cloudify.interfaces.lifecycle: start: @@ -56,7 +56,7 @@ node_templates: image: { get_input: first_app_docker_image } container_port: 6565 policy_id: - policy_type_id: type1 + policy_model_id: "type1" interfaces: cloudify.interfaces.lifecycle: start: @@ -81,7 +81,7 @@ node_templates: image: { get_input: third_app_docker_image } container_port: 443 policy_id: - policy_type_id: type3 + policy_model_id: "type3" interfaces: cloudify.interfaces.lifecycle: start: diff --git a/src/test/resources/clds/single-microservice-fragment-valid.yaml b/src/test/resources/clds/single-microservice-fragment-valid.yaml index 269ee5062..2c1680717 100644 --- a/src/test/resources/clds/single-microservice-fragment-valid.yaml +++ b/src/test/resources/clds/single-microservice-fragment-valid.yaml @@ -6,7 +6,7 @@ second_app: image: { get_input: second_app_docker_image } name: second_app policy_id: - policy_type_id: type1 + policy_model_id: "type1" interfaces: cloudify.interfaces.lifecycle: start: diff --git a/src/test/resources/example/sdc/blueprint-dcae/prop-text-for-tca-3.json b/src/test/resources/example/sdc/blueprint-dcae/prop-text-for-tca-3.json index f8f531654..012c46e9c 100644 --- a/src/test/resources/example/sdc/blueprint-dcae/prop-text-for-tca-3.json +++ b/src/test/resources/example/sdc/blueprint-dcae/prop-text-for-tca-3.json @@ -40,7 +40,8 @@ "cbs_host": "config-binding-service.dcae.svc.cluster.local", "cbs_port": "10000", "external_port": "32012", - "policy_id": "AUTO_GENERATED_POLICY_ID_AT_SUBMIT" + "policy_id": "AUTO_GENERATED_POLICY_ID_AT_SUBMIT", + "policy_model_id": "onap.policies.monitoring.cdap.tca.hi.lo.app" } } ] diff --git a/src/test/resources/example/sdc/blueprint-dcae/tca.yaml b/src/test/resources/example/sdc/blueprint-dcae/tca.yaml index edaa0be28..0cb9cdb68 100644 --- a/src/test/resources/example/sdc/blueprint-dcae/tca.yaml +++ b/src/test/resources/example/sdc/blueprint-dcae/tca.yaml @@ -17,7 +17,7 @@ node_templates: properties: policy_id: get_input: policy_id - policy_type_id: onap.policies.monitoring.cdap.tca.hi.lo.app + policy_model_id: "onap.policies.monitoring.cdap.tca.hi.lo.app" cdap_host_host: type: dcae.nodes.StreamingAnalytics.SelectedCDAPInfrastructure properties: diff --git a/src/test/resources/example/sdc/blueprint-dcae/tca_2.yaml b/src/test/resources/example/sdc/blueprint-dcae/tca_2.yaml index 56ae32a7f..00ebfe7fe 100644 --- a/src/test/resources/example/sdc/blueprint-dcae/tca_2.yaml +++ b/src/test/resources/example/sdc/blueprint-dcae/tca_2.yaml @@ -171,4 +171,4 @@ node_templates: properties: policy_id: get_input: policy_id - policy_type_id: onap.policies.monitoring.cdap.tca.hi.lo.app + policy_model_id: "onap.policies.monitoring.cdap.tca.hi.lo.app" diff --git a/src/test/resources/example/sdc/blueprint-dcae/tca_3.yaml b/src/test/resources/example/sdc/blueprint-dcae/tca_3.yaml index 53cfc4f76..6fab504b2 100644 --- a/src/test/resources/example/sdc/blueprint-dcae/tca_3.yaml +++ b/src/test/resources/example/sdc/blueprint-dcae/tca_3.yaml @@ -51,6 +51,9 @@ inputs: type: string description: Kubernetes node port on which CDAPgui is exposed default: "32012" + policy_model_id: + type: string + default: "onap.policies.monitoring.cdap.tca.hi.lo.app" node_templates: tca_k8s: @@ -150,4 +153,5 @@ node_templates: properties: policy_id: get_input: policy_id - policy_type_id: onap.policies.monitoring.cdap.tca.hi.lo.app + policy_model_id: + get_input: policy_model_id |