summaryrefslogtreecommitdiffstats
path: root/tosca2heat/tosca-parser-0.3.0/toscaparser/tests/data/functions
diff options
context:
space:
mode:
authorzhipengh <zhipengh512@gmail.com>2015-12-22 15:04:53 +0800
committerzhipengh <zhipengh512@gmail.com>2015-12-22 15:04:53 +0800
commitb678c5bfea0f1b142c2a4a5bdee1e3309a021887 (patch)
tree493ec289254370057daaaded00fd1b4761783c86 /tosca2heat/tosca-parser-0.3.0/toscaparser/tests/data/functions
parent828f613ea0c3e334eacf3f7857252246708d1c88 (diff)
JIRA:PARSER-15 Provide Standalone Heat-Translator Liberty Pypi Packages
Diffstat (limited to 'tosca2heat/tosca-parser-0.3.0/toscaparser/tests/data/functions')
-rw-r--r--tosca2heat/tosca-parser-0.3.0/toscaparser/tests/data/functions/test_get_attribute_host_keyword.yaml33
-rw-r--r--tosca2heat/tosca-parser-0.3.0/toscaparser/tests/data/functions/test_get_attribute_host_not_found.yaml20
-rw-r--r--tosca2heat/tosca-parser-0.3.0/toscaparser/tests/data/functions/test_get_attribute_illegal_host_in_outputs.yaml17
-rw-r--r--tosca2heat/tosca-parser-0.3.0/toscaparser/tests/data/functions/test_get_attribute_unknown_attribute_name.yaml28
-rw-r--r--tosca2heat/tosca-parser-0.3.0/toscaparser/tests/data/functions/test_get_attribute_unknown_node_template_name.yaml28
-rw-r--r--tosca2heat/tosca-parser-0.3.0/toscaparser/tests/data/functions/test_invalid_function_signature.yaml34
-rw-r--r--tosca2heat/tosca-parser-0.3.0/toscaparser/tests/data/functions/test_unknown_capability_property.yaml36
-rw-r--r--tosca2heat/tosca-parser-0.3.0/toscaparser/tests/data/functions/test_unknown_input_in_interface.yaml20
-rw-r--r--tosca2heat/tosca-parser-0.3.0/toscaparser/tests/data/functions/test_unknown_input_in_property.yaml13
9 files changed, 229 insertions, 0 deletions
diff --git a/tosca2heat/tosca-parser-0.3.0/toscaparser/tests/data/functions/test_get_attribute_host_keyword.yaml b/tosca2heat/tosca-parser-0.3.0/toscaparser/tests/data/functions/test_get_attribute_host_keyword.yaml
new file mode 100644
index 0000000..90ffbe2
--- /dev/null
+++ b/tosca2heat/tosca-parser-0.3.0/toscaparser/tests/data/functions/test_get_attribute_host_keyword.yaml
@@ -0,0 +1,33 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: >
+ TOSCA template for testing get_attribute with HOST keyword.
+
+topology_template:
+ node_templates:
+ server:
+ type: tosca.nodes.Compute
+ capabilities:
+ host:
+ properties:
+ num_cpus: 2
+ dbms:
+ type: tosca.nodes.DBMS
+ requirements:
+ - host: server
+ interfaces:
+ Standard:
+ configure:
+ implementation: configure.sh
+ inputs:
+ ip_address: { get_attribute: [ HOST, private_address ] }
+ database:
+ type: tosca.nodes.Database
+ requirements:
+ - host: dbms
+ interfaces:
+ Standard:
+ configure:
+ implementation: configure.sh
+ inputs:
+ ip_address: { get_attribute: [ HOST, private_address ] }
diff --git a/tosca2heat/tosca-parser-0.3.0/toscaparser/tests/data/functions/test_get_attribute_host_not_found.yaml b/tosca2heat/tosca-parser-0.3.0/toscaparser/tests/data/functions/test_get_attribute_host_not_found.yaml
new file mode 100644
index 0000000..69679ff
--- /dev/null
+++ b/tosca2heat/tosca-parser-0.3.0/toscaparser/tests/data/functions/test_get_attribute_host_not_found.yaml
@@ -0,0 +1,20 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: >
+ TOSCA template for testing get_attribute with HOST keyword.
+
+topology_template:
+ node_templates:
+ server:
+ type: tosca.nodes.Compute
+ capabilities:
+ host:
+ properties:
+ num_cpus: 2
+ interfaces:
+ Standard:
+ configure:
+ implementation: configure.sh
+ inputs:
+ ip_address: { get_attribute: [ HOST, private_address ] }
+
diff --git a/tosca2heat/tosca-parser-0.3.0/toscaparser/tests/data/functions/test_get_attribute_illegal_host_in_outputs.yaml b/tosca2heat/tosca-parser-0.3.0/toscaparser/tests/data/functions/test_get_attribute_illegal_host_in_outputs.yaml
new file mode 100644
index 0000000..6c7d9bb
--- /dev/null
+++ b/tosca2heat/tosca-parser-0.3.0/toscaparser/tests/data/functions/test_get_attribute_illegal_host_in_outputs.yaml
@@ -0,0 +1,17 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: >
+ TOSCA template for testing get_attribute with HOST keyword.
+
+topology_template:
+ node_templates:
+ server:
+ type: tosca.nodes.Compute
+ capabilities:
+ host:
+ properties:
+ num_cpus: 2
+
+ outputs:
+ ip_address:
+ value: { get_attribute: [ HOST, private_address ] }
diff --git a/tosca2heat/tosca-parser-0.3.0/toscaparser/tests/data/functions/test_get_attribute_unknown_attribute_name.yaml b/tosca2heat/tosca-parser-0.3.0/toscaparser/tests/data/functions/test_get_attribute_unknown_attribute_name.yaml
new file mode 100644
index 0000000..0570c7c
--- /dev/null
+++ b/tosca2heat/tosca-parser-0.3.0/toscaparser/tests/data/functions/test_get_attribute_unknown_attribute_name.yaml
@@ -0,0 +1,28 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: >
+ Tosca template for testing unknown attribute name in get_attribute
+ function.
+
+topology_template:
+ inputs:
+ image_id:
+ type: string
+
+ node_templates:
+ server:
+ type: tosca.nodes.Compute
+ capabilities:
+ host:
+ properties:
+ num_cpus: 2
+ interfaces:
+ Standard:
+ configure:
+ implementation: start_server.sh
+ inputs:
+ image_id: { get_input: image_id }
+
+ outputs:
+ ip_address:
+ value: { get_attribute: [ server, unknown_attribute ] }
diff --git a/tosca2heat/tosca-parser-0.3.0/toscaparser/tests/data/functions/test_get_attribute_unknown_node_template_name.yaml b/tosca2heat/tosca-parser-0.3.0/toscaparser/tests/data/functions/test_get_attribute_unknown_node_template_name.yaml
new file mode 100644
index 0000000..923305c
--- /dev/null
+++ b/tosca2heat/tosca-parser-0.3.0/toscaparser/tests/data/functions/test_get_attribute_unknown_node_template_name.yaml
@@ -0,0 +1,28 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: >
+ Tosca template for testing unknown node template name in get_attribute
+ function.
+
+topology_template:
+ inputs:
+ image_id:
+ type: string
+
+ node_templates:
+ server:
+ type: tosca.nodes.Compute
+ capabilities:
+ host:
+ properties:
+ num_cpus: 2
+ interfaces:
+ Standard:
+ configure:
+ implementation: start_server.sh
+ inputs:
+ image_id: { get_input: image_id }
+
+ outputs:
+ ip_address:
+ value: { get_attribute: [ unknown_node_template, private_address ] }
diff --git a/tosca2heat/tosca-parser-0.3.0/toscaparser/tests/data/functions/test_invalid_function_signature.yaml b/tosca2heat/tosca-parser-0.3.0/toscaparser/tests/data/functions/test_invalid_function_signature.yaml
new file mode 100644
index 0000000..dde8427
--- /dev/null
+++ b/tosca2heat/tosca-parser-0.3.0/toscaparser/tests/data/functions/test_invalid_function_signature.yaml
@@ -0,0 +1,34 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: >
+ TOSCA simple profile template to test invalid get_input function.
+
+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:
+ # compute properties (flavor)
+ disk_size: 10 GB
+ num_cpus: { get_input: [cpus, 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_attribute: [server, private_address] }
diff --git a/tosca2heat/tosca-parser-0.3.0/toscaparser/tests/data/functions/test_unknown_capability_property.yaml b/tosca2heat/tosca-parser-0.3.0/toscaparser/tests/data/functions/test_unknown_capability_property.yaml
new file mode 100644
index 0000000..4a92530
--- /dev/null
+++ b/tosca2heat/tosca-parser-0.3.0/toscaparser/tests/data/functions/test_unknown_capability_property.yaml
@@ -0,0 +1,36 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: >
+ Tosca template for testing an unknown capability property.
+
+topology_template:
+ node_templates:
+ server:
+ type: tosca.nodes.Compute
+ capabilities:
+ host:
+ properties:
+ num_cpus: 2
+ dbms:
+ type: tosca.nodes.DBMS
+ properties:
+ root_password: 1234
+ port: 3672
+ database:
+ type: tosca.nodes.Database
+ properties:
+ name: my_db
+ user: abcd
+ password: 1234
+ capabilities:
+ database_endpoint:
+ properties:
+ port: { get_property: [ dbms, port ] }
+ requirements:
+ - host: dbms
+ interfaces:
+ Standard:
+ configure:
+ implementation: database_configure.sh
+ inputs:
+ db_port: { get_property: [ SELF, database_endpoint, unknown ] }
diff --git a/tosca2heat/tosca-parser-0.3.0/toscaparser/tests/data/functions/test_unknown_input_in_interface.yaml b/tosca2heat/tosca-parser-0.3.0/toscaparser/tests/data/functions/test_unknown_input_in_interface.yaml
new file mode 100644
index 0000000..cbfb391
--- /dev/null
+++ b/tosca2heat/tosca-parser-0.3.0/toscaparser/tests/data/functions/test_unknown_input_in_interface.yaml
@@ -0,0 +1,20 @@
+
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: >
+ Tosca template for testing an unknown input.
+
+topology_template:
+ node_templates:
+ server:
+ type: tosca.nodes.Compute
+ capabilities:
+ host:
+ properties:
+ num_cpus: 2
+ interfaces:
+ Standard:
+ configure:
+ implementation: start_server.sh
+ inputs:
+ image_id: { get_input: image_id }
diff --git a/tosca2heat/tosca-parser-0.3.0/toscaparser/tests/data/functions/test_unknown_input_in_property.yaml b/tosca2heat/tosca-parser-0.3.0/toscaparser/tests/data/functions/test_unknown_input_in_property.yaml
new file mode 100644
index 0000000..9ba7ee5
--- /dev/null
+++ b/tosca2heat/tosca-parser-0.3.0/toscaparser/tests/data/functions/test_unknown_input_in_property.yaml
@@ -0,0 +1,13 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: >
+ Tosca template for testing an unknown input.
+
+topology_template:
+ node_templates:
+ obj_store_server:
+ type: tosca.nodes.ObjectStorage
+ properties:
+ name: { get_input: objectstore_name }
+ size: 1024 MB
+ maxsize: 1 GB