From 8fe37f405ee8ddc40424189aab9ccf717c6181aa Mon Sep 17 00:00:00 2001 From: Sahdev Zala Date: Mon, 14 Mar 2016 11:45:56 -0700 Subject: [PATCH] Fix the incorrect use of attribute The use of get_attribute instead of get_property can fix the issue, but since the templates were creatd for specific tests as explained in the bug it is good to clean up clutterd template code. Change-Id: I7a26478d3e97c89ff2dd978ba53ba83aa3e1912a Closes-Bug: 1557117 --- .../data/test_tosca_top_level_error1.yaml | 31 +------------------ .../data/test_tosca_top_level_error2.yaml | 22 ------------- 2 files changed, 1 insertion(+), 52 deletions(-) diff --git a/toscaparser/tests/data/test_tosca_top_level_error1.yaml b/toscaparser/tests/data/test_tosca_top_level_error1.yaml index 591ee97e..d35c0220 100644 --- a/toscaparser/tests/data/test_tosca_top_level_error1.yaml +++ b/toscaparser/tests/data/test_tosca_top_level_error1.yaml @@ -1,31 +1,2 @@ description: > - TOSCA simple profile missing version section. - -topology_template: - inputs: - cpus: - type: integer - description: Number of CPUs for the server. - constraints: - - valid_values: [ 1, 2, 4, 8 ] - - node_templates: - server: - type: tosca.nodes.Compute - capabilities: - host: - properties: - disk_size: 10 GB - num_cpus: { get_input: cpus } - mem_size: 4096 MB - os: - properties: - architecture: x86_64 - type: Linux - distribution: Fedora - version: 18.0 - - outputs: - server_address: - description: IP address of server instance. - value: { get_property: [server, private_address] } + TOSCA simple profile missing version section. \ No newline at end of file diff --git a/toscaparser/tests/data/test_tosca_top_level_error2.yaml b/toscaparser/tests/data/test_tosca_top_level_error2.yaml index 683e6234..b3e80f9c 100644 --- a/toscaparser/tests/data/test_tosca_top_level_error2.yaml +++ b/toscaparser/tests/data/test_tosca_top_level_error2.yaml @@ -4,30 +4,8 @@ description: > TOSCA simple profile with invalid top-level key: 'node_template'. topology_template: - inputs: - cpus: - type: integer - description: Number of CPUs for the server. - constraints: - - valid_values: [ 1, 2, 4, 8 ] node_template: server: type: tosca.nodes.Compute - capabilities: - host: - properties: - disk_size: 10 GB - num_cpus: { get_input: cpus } - mem_size: 4096 MB - os: - properties: - architecture: x86_64 - type: Linux - distribution: Fedora - version: 18.0 - outputs: - server_address: - description: IP address of server instance. - value: { get_property: [server, private_address] }