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
This commit is contained in:
Sahdev Zala 2016-03-14 11:45:56 -07:00
parent b480a11678
commit 8fe37f405e
2 changed files with 1 additions and 52 deletions

View File

@ -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.

View File

@ -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] }