summaryrefslogtreecommitdiffstats
path: root/tosca2heat/heat-translator/translator/tests/data
diff options
context:
space:
mode:
Diffstat (limited to 'tosca2heat/heat-translator/translator/tests/data')
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/autoscaling/tosca_autoscaling.yaml40
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/autoscaling/tosca_cluster_autoscaling.yaml62
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/custom_types/senlin_cluster_policies.yaml11
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/autoscaling/asg_res.yaml10
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/autoscaling/hot_autoscaling.yaml39
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/autoscaling/hot_cluster_autoscaling.yaml60
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/hot_artifact.yaml19
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/hot_custom_type.yaml2
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/hot_custom_type_with_override.yaml2
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/hot_custom_type_with_param_override.yaml2
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/hot_elk.yaml51
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/hot_elk_from_csar.yaml54
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/hot_exchange_public_ssh_key.yaml2
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/hot_flavor_and_image.yaml2
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/hot_flavor_and_image_params.yaml2
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/hot_get_functions_semantic.yaml2
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/hot_hello_world.yaml2
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/hot_hello_world_userkey.yaml2
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/hot_host_assignment.yaml6
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/hot_nodejs_mongodb_two_instances.yaml18
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/hot_script_types.yaml2
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_instance_wordpress.yaml6
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_instance_wordpress_from_csar.yaml6
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_object_store.yaml2
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_server.yaml6
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_server_with_defaults_with_input.yaml6
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_server_with_defaults_without_input.yaml6
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_server_without_tosca_os_version.yaml2
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/hot_software_component.yaml2
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/hot_software_component_multiple_hosts.yaml75
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/hot_vRNC.yaml16
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/hot_web_application.yaml2
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/interfaces/hot_interface_on_compute.yaml (renamed from tosca2heat/heat-translator/translator/tests/data/hot_output/hot_interface_on_compute.yaml)2
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/network/hot_custom_network_nodes.yaml2
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/network/hot_one_server_one_network.yaml2
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/network/hot_one_server_three_networks.yaml2
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/network/hot_server_on_existing_network.yaml2
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/network/hot_two_servers_one_network.yaml2
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/nfv/SP1_res.yaml39
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/nfv/hot_nfv_sample.yaml (renamed from tosca2heat/heat-translator/translator/tests/data/hot_output/hot_nfv_sample.yaml)12
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/nfv/hot_tosca_nfv_autoscaling.yaml30
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/policies/hot_policies.yaml (renamed from tosca2heat/heat-translator/translator/tests/data/hot_output/hot_policies.yaml)2
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment.yaml6
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation1_alt1.yaml10
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation1_alt2.yaml10
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation2_alt1.yaml10
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation2_alt2.yaml10
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_custom_relationship_type.yaml6
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_relationship_template.yaml6
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_multiple_blockstorage_with_attachment_alt1.yaml10
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_multiple_blockstorage_with_attachment_alt2.yaml10
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/interfaces/test_tosca_interface_on_compute.yaml48
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/interfaces/test_tosca_script_types.yaml48
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/nfv/tacker_defs.yaml183
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/nfv/tacker_nfv_defs.yaml261
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/nfv/test_tosca_nfv_autoscaling.yaml67
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/nfv/test_tosca_nfv_sample.yaml90
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/policies/tosca_policies.yaml28
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/test_tosca_artifact.yaml5
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/test_tosca_flavor_and_image.yaml4
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/test_tosca_get_functions_semantic.yaml18
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/test_tosca_unsupported_type.yaml15
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/tosca_software_component_multiple_hosts.yaml55
63 files changed, 1408 insertions, 106 deletions
diff --git a/tosca2heat/heat-translator/translator/tests/data/autoscaling/tosca_autoscaling.yaml b/tosca2heat/heat-translator/translator/tests/data/autoscaling/tosca_autoscaling.yaml
new file mode 100644
index 0000000..f58d727
--- /dev/null
+++ b/tosca2heat/heat-translator/translator/tests/data/autoscaling/tosca_autoscaling.yaml
@@ -0,0 +1,40 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: >
+ Template for deploying servers based on policies.
+
+topology_template:
+ node_templates:
+ my_server_1:
+ type: tosca.nodes.Compute
+ capabilities:
+ host:
+ properties:
+ num_cpus: 2
+ disk_size: 10 GB
+ mem_size: 512 MB
+ os:
+ properties:
+ # host Operating System image properties
+ architecture: x86_64
+ type: Linux
+ distribution: RHEL
+ version: 6.5
+ policies:
+ - asg:
+ type: tosca.policies.Scaling
+ description: Simple node autoscaling
+ targets: [my_server_1]
+ triggers:
+ resize_compute:
+ description: trigger
+ condition:
+ constraint: utilization greater_than 50%
+ period: 60
+ evaluations: 1
+ method: average
+ properties:
+ min_instances: 2
+ max_instances: 10
+ default_instances: 3
+ increment: 1
diff --git a/tosca2heat/heat-translator/translator/tests/data/autoscaling/tosca_cluster_autoscaling.yaml b/tosca2heat/heat-translator/translator/tests/data/autoscaling/tosca_cluster_autoscaling.yaml
new file mode 100644
index 0000000..208c589
--- /dev/null
+++ b/tosca2heat/heat-translator/translator/tests/data/autoscaling/tosca_cluster_autoscaling.yaml
@@ -0,0 +1,62 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: >
+ Template for deploying servers based on policies.
+
+imports:
+ - ../custom_types/senlin_cluster_policies.yaml
+
+topology_template:
+ node_templates:
+ my_server_1:
+ type: tosca.nodes.Compute
+ capabilities:
+ host:
+ properties:
+ num_cpus: 2
+ disk_size: 10 GB
+ mem_size: 512 MB
+ os:
+ properties:
+ # host Operating System image properties
+ architecture: x86_64
+ type: Linux
+ distribution: RHEL
+ version: 6.5
+ my_port_1:
+ type: tosca.nodes.network.Port
+ requirements:
+ - link:
+ node: my_network_1
+ - binding:
+ node: my_server_1
+ my_network_1:
+ type: tosca.nodes.network.Network
+ properties:
+ network_name: net0
+ policies:
+ - cluster_scaling:
+ type: tosca.policies.Scaling.Cluster
+ description: Cluster node autoscaling
+ targets: [my_server_1]
+ triggers:
+ scale_out:
+ description: trigger
+ event_type:
+ type: tosca.events.resource.cpu.utilization
+ metrics: cpu_util
+ implementation: Ceilometer
+ condition:
+ constraint: utilization greater_than 50%
+ period: 60
+ evaluations: 1
+ method: average
+ action:
+ scale_out:
+ type: SCALE_OUT
+ implementation: Senlin.webhook
+ properties:
+ min_instances: 2
+ max_instances: 10
+ default_instances: 3
+ increment: 1
diff --git a/tosca2heat/heat-translator/translator/tests/data/custom_types/senlin_cluster_policies.yaml b/tosca2heat/heat-translator/translator/tests/data/custom_types/senlin_cluster_policies.yaml
new file mode 100644
index 0000000..c809ca0
--- /dev/null
+++ b/tosca2heat/heat-translator/translator/tests/data/custom_types/senlin_cluster_policies.yaml
@@ -0,0 +1,11 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: >
+ The TOSCA Policy Type definition that is used to govern
+ Senlin Policy of TOSCA nodes or groups of nodes
+
+policy_types:
+ tosca.policies.Scaling.Cluster:
+ derived_from: tosca.policies.Scaling
+ description: The TOSCA Policy Type definition that is used to govern
+ scaling of TOSCA nodes or groups of nodes. \ No newline at end of file
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/autoscaling/asg_res.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/autoscaling/asg_res.yaml
new file mode 100644
index 0000000..d3415ea
--- /dev/null
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/autoscaling/asg_res.yaml
@@ -0,0 +1,10 @@
+heat_template_version: 2013-05-23
+description: Tacker Scaling template
+resources:
+ my_server_1:
+ type: OS::Nova::Server
+ properties:
+ flavor: m1.medium
+ user_data_format: SOFTWARE_CONFIG
+ software_config_transport: POLL_SERVER_HEAT
+ image: rhel-6.5-test-image
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/autoscaling/hot_autoscaling.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/autoscaling/hot_autoscaling.yaml
new file mode 100644
index 0000000..1cd2c03
--- /dev/null
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/autoscaling/hot_autoscaling.yaml
@@ -0,0 +1,39 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Template for deploying servers based on policies.
+
+parameters: {}
+resources:
+ asg_group:
+ type: OS::Heat::AutoScalingGroup
+ properties:
+ min_size: 2
+ desired_capacity: 3
+ resource:
+ type: asg_res.yaml
+ max_size: 10
+ asg_scale_out:
+ type: OS::Heat::ScalingPolicy
+ properties:
+ auto_scaling_group_id:
+ get_resource: asg_group
+ adjustment_type: change_in_capacity
+ scaling_adjustment: 1
+ asg_scale_in:
+ type: OS::Heat::ScalingPolicy
+ properties:
+ auto_scaling_group_id:
+ get_resource: asg_group
+ adjustment_type: change_in_capacity
+ scaling_adjustment: -1
+ asg_alarm:
+ type: OS::Aodh::Alarm
+ properties:
+ meter_name: cpu_util
+ description: Simple node autoscaling
+ period: 60
+ statistic: avg
+ threshold: 1
+ comparison_operator: gt
+outputs: {} \ No newline at end of file
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/autoscaling/hot_cluster_autoscaling.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/autoscaling/hot_cluster_autoscaling.yaml
new file mode 100644
index 0000000..ca0fb3a
--- /dev/null
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/autoscaling/hot_cluster_autoscaling.yaml
@@ -0,0 +1,60 @@
+heat_template_version: 2016-04-08
+
+description: >
+ Template for deploying servers based on policies.
+
+parameters: {}
+resources:
+ my_server_1:
+ type: OS::Senlin::Profile
+ properties:
+ type: os.nova.server-1.0
+ properties:
+ flavor: m1.medium
+ image: rhel-6.5-test-image
+ networks:
+ - network: net0
+ cluster_scaling_scale_out:
+ type: OS::Senlin::Policy
+ properties:
+ bindings:
+ - cluster:
+ get_resource: my_server_1_cluster
+ type: senlin.policy.scaling-1.0
+ properties:
+ adjustment:
+ type: CHANGE_IN_CAPACITY
+ number: 1
+ event: CLUSTER_SCALE_OUT
+ my_server_1_cluster:
+ type: OS::Senlin::Cluster
+ properties:
+ profile:
+ get_resource: my_server_1
+ min_size: 2
+ max_size: 10
+ desired_capacity: 3
+ my_server_1_scale_out_receiver:
+ type: OS::Senlin::Receiver
+ properties:
+ action: CLUSTER_SCALE_OUT
+ cluster:
+ get_resource: my_server_1_cluster
+ type: webhook
+ scale_out_alarm:
+ type: OS::Aodh::Alarm
+ properties:
+ meter_name: cpu_util
+ alarm_actions:
+ - get_attr:
+ - my_server_1_scale_out_receiver
+ - channel
+ - alarm_url
+ description: Cluster node autoscaling
+ evaluation_periods: 1
+ repeat_actions: True
+ period: 60
+ statistic: avg
+ threshold: 50
+ comparison_operator: gt
+outputs: {}
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_artifact.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_artifact.yaml
index 6c4b477..ec5dad1 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_artifact.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_artifact.yaml
@@ -1,10 +1,25 @@
-heat_template_version: 2014-10-16
+heat_template_version: 2013-05-23
description: >
- TOSCA template to test artifact usage
+ TOSCA template to test file and Ansible Galaxy role artifacts
parameters: {}
resources:
+ customwebserver_install_roles_deploy:
+ type: OS::Heat::SoftwareDeployment
+ properties:
+ config:
+ get_resource: customwebserver_install_roles_config
+ server:
+ get_resource: server
+ signal_transport: HEAT_SIGNAL
+ customwebserver_install_roles_config:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ config: |
+ #!/bin/bash
+ ansible-galaxy install user.role
+ group: script
customwebserver_create_deploy:
type: OS::Heat::SoftwareDeployment
properties:
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_custom_type.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_custom_type.yaml
index e2b6855..f60a1bb 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_custom_type.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_custom_type.yaml
@@ -1,5 +1,5 @@
-heat_template_version: 2014-10-16
+heat_template_version: 2013-05-23
description: >
TOSCA template to test custom type with an interface defined on it
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_custom_type_with_override.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_custom_type_with_override.yaml
index 4408840..f973f58 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_custom_type_with_override.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_custom_type_with_override.yaml
@@ -1,4 +1,4 @@
-heat_template_version: 2014-10-16
+heat_template_version: 2013-05-23
description: >
TOSCA template to test custom type with an interface defined on it,
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_custom_type_with_param_override.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_custom_type_with_param_override.yaml
index 1b3c9ac..b1ce63c 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_custom_type_with_param_override.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_custom_type_with_param_override.yaml
@@ -1,4 +1,4 @@
-heat_template_version: 2014-10-16
+heat_template_version: 2013-05-23
description: >
TOSCA template to test custom type with an interface defined on it,
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_elk.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_elk.yaml
index dbfe69e..5dda261 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_elk.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_elk.yaml
@@ -1,4 +1,4 @@
-heat_template_version: 2014-10-16
+heat_template_version: 2013-05-23
description: >
This TOSCA simple profile deploys nodejs, mongodb, elasticsearch, logstash and
@@ -52,7 +52,9 @@ resources:
mongodb_ip:
get_attr:
- mongo_server
- - first_address
+ - networks
+ - private
+ - 0
server:
get_resource: app_server
signal_transport: HEAT_SIGNAL
@@ -111,7 +113,9 @@ resources:
mongodb_ip:
get_attr:
- mongo_server
- - first_address
+ - networks
+ - private
+ - 0
server:
get_resource: mongo_server
signal_transport: HEAT_SIGNAL
@@ -189,7 +193,9 @@ resources:
logstash_ip:
get_attr:
- logstash_server
- - first_address
+ - networks
+ - private
+ - 0
server:
get_resource: app_server
signal_transport: HEAT_SIGNAL
@@ -285,7 +291,9 @@ resources:
logstash_ip:
get_attr:
- logstash_server
- - first_address
+ - networks
+ - private
+ - 0
server:
get_resource: app_server
signal_transport: HEAT_SIGNAL
@@ -363,7 +371,9 @@ resources:
elasticsearch_ip:
get_attr:
- elasticsearch_server
- - first_address
+ - networks
+ - private
+ - 0
server:
get_resource: logstash_server
signal_transport: HEAT_SIGNAL
@@ -440,11 +450,15 @@ resources:
elasticsearch_ip:
get_attr:
- elasticsearch_server
- - first_address
+ - networks
+ - private
+ - 0
kibana_ip:
get_attr:
- kibana_server
- - first_address
+ - networks
+ - private
+ - 0
server:
get_resource: kibana_server
signal_transport: HEAT_SIGNAL
@@ -523,32 +537,43 @@ outputs:
value:
get_attr:
- app_server
- - first_address
+ - networks
+ - private
+ - 0
mongodb_url:
description: URL for the mongodb server.
value:
get_attr:
- mongo_server
- - first_address
+ - networks
+ - private
+ - 0
logstash_url:
description: URL for the logstash server.
value:
get_attr:
- logstash_server
- - first_address
+ - networks
+ - private
+ - 0
elasticsearch_url:
description: URL for the elasticsearch server.
value:
get_attr:
- elasticsearch_server
- - first_address
+ - networks
+ - private
+ - 0
kibana_url:
description: URL for the kibana server.
value:
get_attr:
- kibana_server
- - first_address
+ - networks
+ - private
+ - 0
+
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_elk_from_csar.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_elk_from_csar.yaml
index 258f3bf..d3ae8b1 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_elk_from_csar.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_elk_from_csar.yaml
@@ -1,4 +1,4 @@
-heat_template_version: 2014-10-16
+heat_template_version: 2013-05-23
description: >
This TOSCA simple profile deploys nodejs, mongodb, elasticsearch, logstash and
@@ -52,8 +52,9 @@ resources:
mongodb_ip:
get_attr:
- mongo_server
- - first_address
-
+ - networks
+ - private
+ - 0
server:
get_resource: app_server
signal_transport: HEAT_SIGNAL
@@ -112,8 +113,9 @@ resources:
mongodb_ip:
get_attr:
- mongo_server
- - first_address
-
+ - networks
+ - private
+ - 0
server:
get_resource: mongo_server
signal_transport: HEAT_SIGNAL
@@ -191,7 +193,9 @@ resources:
logstash_ip:
get_attr:
- logstash_server
- - first_address
+ - networks
+ - private
+ - 0
server:
get_resource: app_server
signal_transport: HEAT_SIGNAL
@@ -287,7 +291,9 @@ resources:
logstash_ip:
get_attr:
- logstash_server
- - first_address
+ - networks
+ - private
+ - 0
server:
get_resource: app_server
signal_transport: HEAT_SIGNAL
@@ -365,7 +371,9 @@ resources:
elasticsearch_ip:
get_attr:
- elasticsearch_server
- - first_address
+ - networks
+ - private
+ - 0
server:
get_resource: logstash_server
signal_transport: HEAT_SIGNAL
@@ -442,12 +450,15 @@ resources:
elasticsearch_ip:
get_attr:
- elasticsearch_server
- - first_address
+ - networks
+ - private
+ - 0
kibana_ip:
get_attr:
- kibana_server
- - first_address
-
+ - networks
+ - private
+ - 0
server:
get_resource: kibana_server
signal_transport: HEAT_SIGNAL
@@ -526,32 +537,43 @@ outputs:
value:
get_attr:
- app_server
- - first_address
+ - networks
+ - private
+ - 0
mongodb_url:
description: URL for the mongodb server.
value:
get_attr:
- mongo_server
- - first_address
+ - networks
+ - private
+ - 0
logstash_url:
description: URL for the logstash server.
value:
get_attr:
- logstash_server
- - first_address
+ - networks
+ - private
+ - 0
elasticsearch_url:
description: URL for the elasticsearch server.
value:
get_attr:
- elasticsearch_server
- - first_address
+ - networks
+ - private
+ - 0
kibana_url:
description: URL for the kibana server.
value:
get_attr:
- kibana_server
- - first_address
+ - networks
+ - private
+ - 0
+
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_exchange_public_ssh_key.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_exchange_public_ssh_key.yaml
index f3a3cc0..e90289d 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_exchange_public_ssh_key.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_exchange_public_ssh_key.yaml
@@ -1,4 +1,4 @@
-heat_template_version: 2014-10-16
+heat_template_version: 2013-05-23
description: >
TOSCA template to test get_operation_output by exchanging ssh public key
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_flavor_and_image.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_flavor_and_image.yaml
index 715ee3f..cb337d1 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_flavor_and_image.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_flavor_and_image.yaml
@@ -1,4 +1,4 @@
-heat_template_version: 2014-10-16
+heat_template_version: 2013-05-23
description: >
Template for deploying a server with custom properties for image, flavor and key_name.
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_flavor_and_image_params.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_flavor_and_image_params.yaml
index 311da65..3de636d 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_flavor_and_image_params.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_flavor_and_image_params.yaml
@@ -1,4 +1,4 @@
-heat_template_version: 2014-10-16
+heat_template_version: 2013-05-23
description: >
Template for deploying a server with custom properties for image, flavor and key_name.
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_get_functions_semantic.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_get_functions_semantic.yaml
index 25ad5a7..fcba383 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_get_functions_semantic.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_get_functions_semantic.yaml
@@ -1,4 +1,4 @@
-heat_template_version: 2014-10-16
+heat_template_version: 2013-05-23
description: >
TOSCA template to test get_* functions semantic
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_hello_world.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_hello_world.yaml
index f6b3e8f..59a4f88 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_hello_world.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_hello_world.yaml
@@ -1,4 +1,4 @@
-heat_template_version: 2014-10-16
+heat_template_version: 2013-05-23
description: >
Template for deploying a single server with predefined properties.
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_hello_world_userkey.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_hello_world_userkey.yaml
index 8798eb9..79fe30d 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_hello_world_userkey.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_hello_world_userkey.yaml
@@ -1,4 +1,4 @@
-heat_template_version: 2014-10-16
+heat_template_version: 2013-05-23
description: >
Template for deploying a single server with predefined properties.
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_host_assignment.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_host_assignment.yaml
index 85c5be4..ff657cb 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_host_assignment.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_host_assignment.yaml
@@ -1,4 +1,4 @@
-heat_template_version: 2014-10-16
+heat_template_version: 2013-05-23
description: >
A template to test host assignment for translated hot resources.
@@ -61,7 +61,9 @@ resources:
logstash_ip:
get_attr:
- logstash_server
- - first_address
+ - networks
+ - private
+ - 0
server:
get_resource: app_server
signal_transport: HEAT_SIGNAL
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_nodejs_mongodb_two_instances.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_nodejs_mongodb_two_instances.yaml
index 6b416c1..4cdfcfb 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_nodejs_mongodb_two_instances.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_nodejs_mongodb_two_instances.yaml
@@ -1,4 +1,4 @@
-heat_template_version: 2014-10-16
+heat_template_version: 2013-05-23
description: >
TOSCA simple profile with nodejs and mongodb.
@@ -46,7 +46,9 @@ resources:
mongodb_ip:
get_attr:
- mongo_server
- - first_address
+ - networks
+ - private
+ - 0
server:
get_resource: mongo_server
signal_transport: HEAT_SIGNAL
@@ -122,7 +124,9 @@ resources:
mongodb_ip:
get_attr:
- mongo_server
- - first_address
+ - networks
+ - private
+ - 0
server:
get_resource: app_server
signal_transport: HEAT_SIGNAL
@@ -177,10 +181,14 @@ outputs:
value:
get_attr:
- mongo_server
- - first_address
+ - networks
+ - private
+ - 0
nodejs_url:
description: URL for the nodejs server, http://<IP>:3000
value:
get_attr:
- app_server
- - first_address
+ - networks
+ - private
+ - 0
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_script_types.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_script_types.yaml
index 7f2bc2c..f0f7021 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_script_types.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_script_types.yaml
@@ -1,4 +1,4 @@
-heat_template_version: 2014-10-16
+heat_template_version: 2013-05-23
description: >
TOSCA template to test usage of different script types like Ansible and Puppet
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_instance_wordpress.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_instance_wordpress.yaml
index 1922fee..a85a34b 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_instance_wordpress.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_instance_wordpress.yaml
@@ -1,4 +1,4 @@
-heat_template_version: 2014-10-16
+heat_template_version: 2013-05-23
description: >
TOSCA simple profile with wordpress, web server and mysql on the same server.
@@ -213,4 +213,6 @@ outputs:
value:
get_attr:
- server
- - first_address
+ - networks
+ - private
+ - 0
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_instance_wordpress_from_csar.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_instance_wordpress_from_csar.yaml
index 62671b1..b51710e 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_instance_wordpress_from_csar.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_instance_wordpress_from_csar.yaml
@@ -1,4 +1,4 @@
-heat_template_version: 2014-10-16
+heat_template_version: 2013-05-23
description: >
TOSCA simple profile with wordpress, web server and mysql on the same server.
@@ -211,4 +211,6 @@ outputs:
value:
get_attr:
- server
- - first_address
+ - networks
+ - private
+ - 0
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_object_store.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_object_store.yaml
index 2f25b65..91491e3 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_object_store.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_object_store.yaml
@@ -1,4 +1,4 @@
-heat_template_version: 2014-10-16
+heat_template_version: 2013-05-23
description: >
Tosca template for creating an object storage service.
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_server.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_server.yaml
index 3ed6d3a..f1d5a17 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_server.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_server.yaml
@@ -1,4 +1,4 @@
-heat_template_version: 2014-10-16
+heat_template_version: 2013-05-23
description: >
TOSCA simple profile that just defines a single compute instance and selects a
@@ -32,4 +32,6 @@ outputs:
value:
get_attr:
- my_server
- - first_address
+ - networks
+ - private
+ - 0
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_server_with_defaults_with_input.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_server_with_defaults_with_input.yaml
index df404f9..23835c2 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_server_with_defaults_with_input.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_server_with_defaults_with_input.yaml
@@ -1,4 +1,4 @@
-heat_template_version: 2014-10-16
+heat_template_version: 2013-05-23
description: >
TOSCA simple profile that just defines a single compute instance and selects a
@@ -32,4 +32,6 @@ outputs:
value:
get_attr:
- my_server
- - first_address
+ - networks
+ - private
+ - 0
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_server_with_defaults_without_input.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_server_with_defaults_without_input.yaml
index c3a8196..d8a0c58 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_server_with_defaults_without_input.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_server_with_defaults_without_input.yaml
@@ -1,4 +1,4 @@
-heat_template_version: 2014-10-16
+heat_template_version: 2013-05-23
description: >
TOSCA simple profile that just defines a single compute instance and selects a
@@ -32,4 +32,6 @@ outputs:
value:
get_attr:
- my_server
- - first_address
+ - networks
+ - private
+ - 0
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_server_without_tosca_os_version.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_server_without_tosca_os_version.yaml
index 2f13052..b0b2e02 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_server_without_tosca_os_version.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_server_without_tosca_os_version.yaml
@@ -1,4 +1,4 @@
-heat_template_version: 2014-10-16
+heat_template_version: 2013-05-23
description: >
TOSCA simple profile that just defines a single compute instance and selects a
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_software_component.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_software_component.yaml
index f676a8b..41663c6 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_software_component.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_software_component.yaml
@@ -1,4 +1,4 @@
-heat_template_version: 2014-10-16
+heat_template_version: 2013-05-23
description: >
TOSCA simple profile with a software component.
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_software_component_multiple_hosts.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_software_component_multiple_hosts.yaml
new file mode 100644
index 0000000..ebe9728
--- /dev/null
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_software_component_multiple_hosts.yaml
@@ -0,0 +1,75 @@
+heat_template_version: 2013-05-23
+
+description: >
+ TOSCA simple profile with a software component.
+
+parameters:
+ cpus:
+ type: number
+ description: Number of CPUs for the server.
+ default: 1
+ constraints:
+ - allowed_values:
+ - 1
+ - 2
+ - 4
+ - 8
+
+resources:
+ server1:
+ type: OS::Nova::Server
+ properties:
+ flavor: m1.small
+ image: ubuntu-software-config-os-init
+ user_data_format: SOFTWARE_CONFIG
+ software_config_transport: POLL_SERVER_HEAT
+
+ server2:
+ type: OS::Nova::Server
+ properties:
+ flavor: m1.small
+ image: ubuntu-software-config-os-init
+ user_data_format: SOFTWARE_CONFIG
+ software_config_transport: POLL_SERVER_HEAT
+
+ my_software_create_deploy:
+ type: OS::Heat::SoftwareDeploymentGroup
+ properties:
+ config:
+ get_resource: my_software_create_config
+ signal_transport: HEAT_SIGNAL
+ servers:
+ server1:
+ get_resource: server1
+ server2:
+ get_resource: server2
+
+ my_software_create_config:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ config:
+ get_file: software_install.sh
+ group: script
+
+ my_software_start_deploy:
+ type: OS::Heat::SoftwareDeploymentGroup
+ properties:
+ config:
+ get_resource: my_software_start_config
+ signal_transport: HEAT_SIGNAL
+ servers:
+ server1:
+ get_resource: server1
+ server2:
+ get_resource: server2
+ depends_on:
+ - my_software_create_deploy
+
+ my_software_start_config:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ config:
+ get_file: software_start.sh
+ group: script
+
+outputs: {}
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_vRNC.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_vRNC.yaml
index 904189b..b6de70f 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_vRNC.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_vRNC.yaml
@@ -491,25 +491,33 @@ outputs:
value:
get_attr:
- MM_Active_Host
- - first_address
+ - networks
+ - private
+ - 0
private_ip_of_CM:
description: The private IP address of the CM.
value:
get_attr:
- CM_Active_Host
- - first_address
+ - networks
+ - private
+ - 0
private_ip_of_DM:
description: The private IP address of the DM.
value:
get_attr:
- DM_Host
- - first_address
+ - networks
+ - private
+ - 0
private_ip_of_LB:
description: The private IP address of the LB.
value:
get_attr:
- LB_Host
- - first_address
+ - networks
+ - private
+ - 0
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_web_application.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_web_application.yaml
index cf372d7..278031b 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_web_application.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_web_application.yaml
@@ -1,4 +1,4 @@
-heat_template_version: 2014-10-16
+heat_template_version: 2013-05-23
description: >
TOSCA simple profile with a web application.
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_interface_on_compute.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/interfaces/hot_interface_on_compute.yaml
index b863ac7..f085b9d 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_interface_on_compute.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/interfaces/hot_interface_on_compute.yaml
@@ -1,4 +1,4 @@
-heat_template_version: 2014-10-16
+heat_template_version: 2013-05-23
description: >
TOSCA template to test Compute node with interface
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/network/hot_custom_network_nodes.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/network/hot_custom_network_nodes.yaml
index 5676566..a2f1e4a 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/network/hot_custom_network_nodes.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/network/hot_custom_network_nodes.yaml
@@ -1,4 +1,4 @@
-heat_template_version: 2014-10-16
+heat_template_version: 2013-05-23
description: >
Template for deploying a single server with predefined properties.
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/network/hot_one_server_one_network.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/network/hot_one_server_one_network.yaml
index 9eb80fb..67653e6 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/network/hot_one_server_one_network.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/network/hot_one_server_one_network.yaml
@@ -1,4 +1,4 @@
-heat_template_version: 2014-10-16
+heat_template_version: 2013-05-23
description: >
TOSCA simple profile with 1 server bound to a new network
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/network/hot_one_server_three_networks.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/network/hot_one_server_three_networks.yaml
index bba7c58..81f69d1 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/network/hot_one_server_three_networks.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/network/hot_one_server_three_networks.yaml
@@ -1,4 +1,4 @@
-heat_template_version: 2014-10-16
+heat_template_version: 2013-05-23
description: >
TOSCA simple profile with 1 server bound to 3 networks
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/network/hot_server_on_existing_network.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/network/hot_server_on_existing_network.yaml
index 5116bcc..5b04831 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/network/hot_server_on_existing_network.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/network/hot_server_on_existing_network.yaml
@@ -1,4 +1,4 @@
-heat_template_version: 2014-10-16
+heat_template_version: 2013-05-23
description: >
TOSCA simple profile with 1 server bound to an existing network
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/network/hot_two_servers_one_network.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/network/hot_two_servers_one_network.yaml
index 6247282..64fc008 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/network/hot_two_servers_one_network.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/network/hot_two_servers_one_network.yaml
@@ -1,4 +1,4 @@
-heat_template_version: 2014-10-16
+heat_template_version: 2013-05-23
description: >
TOSCA simple profile with 2 servers bound to the 1 network
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/nfv/SP1_res.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/nfv/SP1_res.yaml
new file mode 100644
index 0000000..ca47df2
--- /dev/null
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/nfv/SP1_res.yaml
@@ -0,0 +1,39 @@
+heat_template_version: 2013-05-23
+description: Tacker Scaling template
+resources:
+ VDU1:
+ type: OS::Nova::Server
+ properties:
+ user_data_format: SOFTWARE_CONFIG
+ software_config_transport: POLL_SERVER_HEAT
+ availability_zone: nova
+ image: cirros-0.3.4-x86_64-uec
+ flavor: m1.tiny
+ networks:
+ - port: { get_resource: CP1 }
+ config_drive: false
+ CP1:
+ type: OS::Neutron::Port
+ properties:
+ anti_spoofing_protection: false
+ management: true
+ network: net_mgmt
+ CP2:
+ type: OS::Neutron::Port
+ properties:
+ anti_spoofing_protection: false
+ management: true
+ network: net_mgmt
+ VDU2:
+ type: OS::Nova::Server
+ properties:
+ user_data_format: SOFTWARE_CONFIG
+ software_config_transport: POLL_SERVER_HEAT
+ availability_zone: nova
+ image: cirros-0.3.4-x86_64-uec
+ flavor: m1.tiny
+ networks:
+ - port: { get_resource: CP2 }
+ config_drive: false
+ VL1:
+ type: OS::Neutron::Net
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_nfv_sample.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/nfv/hot_nfv_sample.yaml
index 3d431ae..e4ee44d 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_nfv_sample.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/nfv/hot_nfv_sample.yaml
@@ -1,19 +1,21 @@
-heat_template_version: 2014-10-16
+heat_template_version: 2013-05-23
description: >
Template for deploying a single server with predefined properties.
parameters: {}
resources:
+
VDU1:
type: OS::Nova::Server
properties:
- flavor: m1.tiny
+ flavor: m1.medium
image: rhel-6.5-test-image
networks:
- port: { get_resource: CP1 }
user_data_format: SOFTWARE_CONFIG
software_config_transport: POLL_SERVER_HEAT
+
depends_on:
- VDU2
- BlockStorage
@@ -21,7 +23,7 @@ resources:
VDU2:
type: OS::Nova::Server
properties:
- flavor: m1.tiny
+ flavor: m1.medium
image: rhel-6.5-test-image
networks:
- port: { get_resource: CP2 }
@@ -31,14 +33,14 @@ resources:
BlockStorage:
type: OS::Cinder::Volume
properties:
- size: 1
+ size: 10
tosca.relationships.attachesto_1:
type: OS::Cinder::VolumeAttachment
properties:
instance_uuid:
get_resource: VDU1
- mountpoint: /dev/vdb1
+ mountpoint: /data
volume_id:
get_resource: BlockStorage
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/nfv/hot_tosca_nfv_autoscaling.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/nfv/hot_tosca_nfv_autoscaling.yaml
new file mode 100644
index 0000000..7d1e2f6
--- /dev/null
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/nfv/hot_tosca_nfv_autoscaling.yaml
@@ -0,0 +1,30 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Template for deploying servers based on policies.
+
+parameters: {}
+resources:
+ SP1_scale_out:
+ type: OS::Heat::ScalingPolicy
+ properties:
+ auto_scaling_group_id:
+ get_resource: SP1_group
+ adjustment_type: change_in_capacity
+ scaling_adjustment: 1
+ SP1_group:
+ type: OS::Heat::AutoScalingGroup
+ properties:
+ min_size: 1
+ desired_capacity: 2
+ resource:
+ type: SP1_res.yaml
+ max_size: 3
+ SP1_scale_in:
+ type: OS::Heat::ScalingPolicy
+ properties:
+ auto_scaling_group_id:
+ get_resource: SP1_group
+ adjustment_type: change_in_capacity
+ scaling_adjustment: -1
+outputs: {} \ No newline at end of file
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_policies.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/policies/hot_policies.yaml
index d6ba13a..786a2e9 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_policies.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/policies/hot_policies.yaml
@@ -1,4 +1,4 @@
-heat_template_version: 2014-10-16
+heat_template_version: 2013-05-23
description: >
Template for deploying the nodes based on given policies.
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment.yaml
index a4396fa..60c81ae 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment.yaml
@@ -1,4 +1,4 @@
-heat_template_version: 2014-10-16
+heat_template_version: 2013-05-23
description: >
TOSCA simple profile with server and attached block storage using the normative
@@ -63,7 +63,9 @@ outputs:
value:
get_attr:
- my_server
- - first_address
+ - networks
+ - private
+ - 0
volume_id:
description: The volume id of the block storage instance.
value:
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation1_alt1.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation1_alt1.yaml
index a029f0c..069e03d 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation1_alt1.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation1_alt1.yaml
@@ -1,4 +1,4 @@
-heat_template_version: 2014-10-16
+heat_template_version: 2013-05-23
description: >
TOSCA simple profile with a Single Block Storage node shared by 2-Tier
@@ -77,13 +77,17 @@ outputs:
value:
get_attr:
- my_web_app_tier_1
- - first_address
+ - networks
+ - private
+ - 0
private_ip_2:
description: The private IP address of the applications second tier.
value:
get_attr:
- my_web_app_tier_2
- - first_address
+ - networks
+ - private
+ - 0
volume_id:
description: The volume id of the block storage instance.
value:
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation1_alt2.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation1_alt2.yaml
index 0aafd92..9114e12 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation1_alt2.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation1_alt2.yaml
@@ -1,4 +1,4 @@
-heat_template_version: 2014-10-16
+heat_template_version: 2013-05-23
description: >
TOSCA simple profile with a Single Block Storage node shared by 2-Tier
@@ -77,13 +77,17 @@ outputs:
value:
get_attr:
- my_web_app_tier_1
- - first_address
+ - networks
+ - private
+ - 0
private_ip_2:
description: The private IP address of the applications second tier.
value:
get_attr:
- my_web_app_tier_2
- - first_address
+ - networks
+ - private
+ - 0
volume_id:
description: The volume id of the block storage instance.
value:
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation2_alt1.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation2_alt1.yaml
index 87e6bd3..cd7a330 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation2_alt1.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation2_alt1.yaml
@@ -1,4 +1,4 @@
-heat_template_version: 2014-10-16
+heat_template_version: 2013-05-23
description: >
TOSCA simple profile with a single Block Storage node shared by 2-Tier
@@ -81,13 +81,17 @@ outputs:
value:
get_attr:
- my_web_app_tier_1
- - first_address
+ - networks
+ - private
+ - 0
private_ip_2:
description: The private IP address of the applications second tier.
value:
get_attr:
- my_web_app_tier_2
- - first_address
+ - networks
+ - private
+ - 0
volume_id:
description: The volume id of the block storage instance.
value:
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation2_alt2.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation2_alt2.yaml
index 45bb8b0..322a1f4 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation2_alt2.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation2_alt2.yaml
@@ -1,4 +1,4 @@
-heat_template_version: 2014-10-16
+heat_template_version: 2013-05-23
description: >
TOSCA simple profile with a single Block Storage node shared by 2-Tier
@@ -81,13 +81,17 @@ outputs:
value:
get_attr:
- my_web_app_tier_1
- - first_address
+ - networks
+ - private
+ - 0
private_ip_2:
description: The private IP address of the applications second tier.
value:
get_attr:
- my_web_app_tier_2
- - first_address
+ - networks
+ - private
+ - 0
volume_id:
description: The volume id of the block storage instance.
value:
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_custom_relationship_type.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_custom_relationship_type.yaml
index 4eec76c..2b7ee4b 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_custom_relationship_type.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_custom_relationship_type.yaml
@@ -1,4 +1,4 @@
-heat_template_version: 2014-10-16
+heat_template_version: 2013-05-23
description: >
TOSCA simple profile with server and attached block storage using a custom
@@ -64,7 +64,9 @@ outputs:
value:
get_attr:
- my_server
- - first_address
+ - networks
+ - private
+ - 0
volume_id:
description: The volume id of the block storage instance.
value:
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_relationship_template.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_relationship_template.yaml
index 13a7eee..3991bee 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_relationship_template.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_relationship_template.yaml
@@ -1,4 +1,4 @@
-heat_template_version: 2014-10-16
+heat_template_version: 2013-05-23
description: >
TOSCA simple profile with server and attached block storage using a named
@@ -57,7 +57,9 @@ outputs:
value:
get_attr:
- my_server
- - first_address
+ - networks
+ - private
+ - 0
volume_id:
description: The volume id of the block storage instance.
value:
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_multiple_blockstorage_with_attachment_alt1.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_multiple_blockstorage_with_attachment_alt1.yaml
index 4000324..a37bf92 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_multiple_blockstorage_with_attachment_alt1.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_multiple_blockstorage_with_attachment_alt1.yaml
@@ -1,4 +1,4 @@
-heat_template_version: 2014-10-16
+heat_template_version: 2013-05-23
description: >
TOSCA simple profile with 2 servers each with different attached block storage.
@@ -90,13 +90,17 @@ outputs:
value:
get_attr:
- my_server
- - first_address
+ - networks
+ - private
+ - 0
server_ip_2:
description: The private IP address of the applications second server.
value:
get_attr:
- my_server2
- - first_address
+ - networks
+ - private
+ - 0
volume_id_1:
description: The volume id of the first block storage instance.
value:
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_multiple_blockstorage_with_attachment_alt2.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_multiple_blockstorage_with_attachment_alt2.yaml
index 777f832..10b02a9 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_multiple_blockstorage_with_attachment_alt2.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_multiple_blockstorage_with_attachment_alt2.yaml
@@ -1,4 +1,4 @@
-heat_template_version: 2014-10-16
+heat_template_version: 2013-05-23
description: >
TOSCA simple profile with 2 servers each with different attached block storage.
@@ -90,13 +90,17 @@ outputs:
value:
get_attr:
- my_server
- - first_address
+ - networks
+ - private
+ - 0
server_ip_2:
description: The private IP address of the applications second server.
value:
get_attr:
- my_server2
- - first_address
+ - networks
+ - private
+ - 0
volume_id_1:
description: The volume id of the first block storage instance.
value:
diff --git a/tosca2heat/heat-translator/translator/tests/data/interfaces/test_tosca_interface_on_compute.yaml b/tosca2heat/heat-translator/translator/tests/data/interfaces/test_tosca_interface_on_compute.yaml
new file mode 100644
index 0000000..e033c3c
--- /dev/null
+++ b/tosca2heat/heat-translator/translator/tests/data/interfaces/test_tosca_interface_on_compute.yaml
@@ -0,0 +1,48 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: TOSCA template to test Compute node with interface
+
+node_types:
+ tosca.nodes.CustomCompute:
+ derived_from: tosca.nodes.Compute
+ properties:
+ install_path:
+ type: string
+ default: /opt
+ interfaces:
+ Standard:
+ create:
+ implementation: install.sh
+ inputs:
+ install_path: { get_property: [ SELF, install_path ] }
+
+topology_template:
+ node_templates:
+
+ softwarecomponent_without_behavior:
+ type: tosca.nodes.SoftwareComponent
+ requirements:
+ - host: server
+
+ softwarecomponent_depending_on_customcompute_install:
+ type: tosca.nodes.SoftwareComponent
+ interfaces:
+ Standard:
+ create:
+ implementation: post_install.sh
+ requirements:
+ - host: server
+
+ server:
+ type: tosca.nodes.CustomCompute
+ capabilities:
+ host:
+ properties:
+ num_cpus: 1
+ mem_size: 1 GB
+ os:
+ properties:
+ type: Linux
+ distribution: Ubuntu
+ version: 12.04
+ architecture: x86_64
diff --git a/tosca2heat/heat-translator/translator/tests/data/interfaces/test_tosca_script_types.yaml b/tosca2heat/heat-translator/translator/tests/data/interfaces/test_tosca_script_types.yaml
new file mode 100644
index 0000000..b54cbcb
--- /dev/null
+++ b/tosca2heat/heat-translator/translator/tests/data/interfaces/test_tosca_script_types.yaml
@@ -0,0 +1,48 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: >
+ TOSCA template to test usage of different script types like
+ Ansible and Puppet one.
+
+topology_template:
+
+ node_templates:
+ customwebserver:
+ type: tosca.nodes.WebServer
+ requirements:
+ - host: server
+ interfaces:
+ Standard:
+ create:
+ implementation: install.yaml
+ configure:
+ implementation: configure.yml
+ start:
+ implementation: start.pp
+
+ customwebserver2:
+ type: tosca.nodes.WebServer
+ requirements:
+ - host: server
+ interfaces:
+ Standard:
+ create:
+ implementation: install.sh
+ configure:
+ implementation: configure.py
+ start:
+ implementation: start.sh
+
+ server:
+ type: tosca.nodes.Compute
+ capabilities:
+ host:
+ properties:
+ num_cpus: 1
+ mem_size: 1 GB
+ os:
+ properties:
+ type: Linux
+ distribution: Ubuntu
+ version: 12.04
+ architecture: x86_64
diff --git a/tosca2heat/heat-translator/translator/tests/data/nfv/tacker_defs.yaml b/tosca2heat/heat-translator/translator/tests/data/nfv/tacker_defs.yaml
new file mode 100644
index 0000000..96b0d45
--- /dev/null
+++ b/tosca2heat/heat-translator/translator/tests/data/nfv/tacker_defs.yaml
@@ -0,0 +1,183 @@
+tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0
+
+data_types:
+ tosca.datatypes.tacker.ActionMap:
+ properties:
+ trigger:
+ type: string
+ required: true
+ action:
+ type: string
+ required: true
+ params:
+ type: map
+ entry_schema:
+ type: string
+ required: false
+
+ tosca.datatypes.tacker.MonitoringParams:
+ properties:
+ monitoring_delay:
+ type: int
+ required: false
+ count:
+ type: int
+ required: false
+ interval:
+ type: int
+ required: false
+ timeout:
+ type: int
+ required: false
+ retry:
+ type: int
+ required: false
+ port:
+ type: int
+ required: false
+
+ tosca.datatypes.tacker.MonitoringType:
+ properties:
+ name:
+ type: string
+ required: true
+ actions:
+ type: map
+ required: true
+ parameters:
+ type: tosca.datatypes.tacker.MonitoringParams
+ required: false
+
+ tosca.datatypes.compute_properties:
+ properties:
+ num_cpus:
+ type: integer
+ required: false
+ mem_size:
+ type: string
+ required: false
+ disk_size:
+ type: string
+ required: false
+ mem_page_size:
+ type: string
+ required: false
+ numa_node_count:
+ type: integer
+ constraints:
+ - greater_or_equal: 2
+ required: false
+ numa_nodes:
+ type: map
+ required: false
+ cpu_allocation:
+ type: map
+ required: false
+
+policy_types:
+ tosca.policies.tacker.Placement:
+ derived_from: tosca.policies.Root
+
+ tosca.policies.tacker.Failure:
+ derived_from: tosca.policies.Root
+ action:
+ type: string
+
+ tosca.policies.tacker.Failure.Respawn:
+ derived_from: tosca.policies.tacker.Failure
+ action: respawn
+
+ tosca.policies.tacker.Failure.Terminate:
+ derived_from: tosca.policies.tacker.Failure
+ action: log_and_kill
+
+ tosca.policies.tacker.Failure.Log:
+ derived_from: tosca.policies.tacker.Failure
+ action: log
+
+ tosca.policies.tacker.Monitoring:
+ derived_from: tosca.policies.Root
+ properties:
+ name:
+ type: string
+ required: true
+ parameters:
+ type: map
+ entry_schema:
+ type: string
+ required: false
+ actions:
+ type: map
+ entry_schema:
+ type: string
+ required: true
+
+ tosca.policies.tacker.Monitoring.NoOp:
+ derived_from: tosca.policies.tacker.Monitoring
+ properties:
+ name: noop
+
+ tosca.policies.tacker.Monitoring.Ping:
+ derived_from: tosca.policies.tacker.Monitoring
+ properties:
+ name: ping
+
+ tosca.policies.tacker.Monitoring.HttpPing:
+ derived_from: tosca.policies.tacker.Monitoring.Ping
+ properties:
+ name: http-ping
+
+ tosca.policies.tacker.Alarming:
+ derived_from: tosca.policies.Monitoring
+ triggers:
+ resize_compute:
+ event_type:
+ type: map
+ entry_schema:
+ type: string
+ required: true
+ metrics:
+ type: string
+ required: true
+ condition:
+ type: map
+ entry_schema:
+ type: string
+ required: false
+ action:
+ type: map
+ entry_schema:
+ type: string
+ required: true
+
+ tosca.policies.tacker.Scaling:
+ derived_from: tosca.policies.Scaling
+ description: Defines policy for scaling the given targets.
+ properties:
+ increment:
+ type: integer
+ required: true
+ description: Number of nodes to add or remove during the scale out/in.
+ targets:
+ type: list
+ entry_schema:
+ type: string
+ required: true
+ description: List of Scaling nodes.
+ min_instances:
+ type: integer
+ required: true
+ description: Minimum number of instances to scale in.
+ max_instances:
+ type: integer
+ required: true
+ description: Maximum number of instances to scale out.
+ default_instances:
+ type: integer
+ required: true
+ description: Initial number of instances.
+ cooldown:
+ type: integer
+ required: false
+ default: 120
+ description: Wait time (in seconds) between consecutive scaling operations. During the cooldown period...
diff --git a/tosca2heat/heat-translator/translator/tests/data/nfv/tacker_nfv_defs.yaml b/tosca2heat/heat-translator/translator/tests/data/nfv/tacker_nfv_defs.yaml
new file mode 100644
index 0000000..1387509
--- /dev/null
+++ b/tosca2heat/heat-translator/translator/tests/data/nfv/tacker_nfv_defs.yaml
@@ -0,0 +1,261 @@
+tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0
+
+data_types:
+ tosca.nfv.datatypes.pathType:
+ properties:
+ forwarder:
+ type: string
+ required: true
+ capability:
+ type: string
+ required: true
+
+ tosca.nfv.datatypes.aclType:
+ properties:
+ eth_type:
+ type: string
+ required: false
+ eth_src:
+ type: string
+ required: false
+ eth_dst:
+ type: string
+ required: false
+ vlan_id:
+ type: integer
+ constraints:
+ - in_range: [ 1, 4094 ]
+ required: false
+ vlan_pcp:
+ type: integer
+ constraints:
+ - in_range: [ 0, 7 ]
+ required: false
+ mpls_label:
+ type: integer
+ constraints:
+ - in_range: [ 16, 1048575]
+ required: false
+ mpls_tc:
+ type: integer
+ constraints:
+ - in_range: [ 0, 7 ]
+ required: false
+ ip_dscp:
+ type: integer
+ constraints:
+ - in_range: [ 0, 63 ]
+ required: false
+ ip_ecn:
+ type: integer
+ constraints:
+ - in_range: [ 0, 3 ]
+ required: false
+ ip_src_prefix:
+ type: string
+ required: false
+ ip_dst_prefix:
+ type: string
+ required: false
+ ip_proto:
+ type: integer
+ constraints:
+ - in_range: [ 1, 254 ]
+ required: false
+ destination_port_range:
+ type: string
+ required: false
+ source_port_range:
+ type: string
+ required: false
+ network_src_port_id:
+ type: string
+ required: false
+ network_dst_port_id:
+ type: string
+ required: false
+ network_id:
+ type: string
+ required: false
+ network_name:
+ type: string
+ required: false
+ tenant_id:
+ type: string
+ required: false
+ icmpv4_type:
+ type: integer
+ constraints:
+ - in_range: [ 0, 254 ]
+ required: false
+ icmpv4_code:
+ type: integer
+ constraints:
+ - in_range: [ 0, 15 ]
+ required: false
+ arp_op:
+ type: integer
+ constraints:
+ - in_range: [ 1, 25 ]
+ required: false
+ arp_spa:
+ type: string
+ required: false
+ arp_tpa:
+ type: string
+ required: false
+ arp_sha:
+ type: string
+ required: false
+ arp_tha:
+ type: string
+ required: false
+ ipv6_src:
+ type: string
+ required: false
+ ipv6_dst:
+ type: string
+ required: false
+ ipv6_flabel:
+ type: integer
+ constraints:
+ - in_range: [ 0, 1048575]
+ required: false
+ icmpv6_type:
+ type: integer
+ constraints:
+ - in_range: [ 0, 255]
+ required: false
+ icmpv6_code:
+ type: integer
+ constraints:
+ - in_range: [ 0, 7]
+ required: false
+ ipv6_nd_target:
+ type: string
+ required: false
+ ipv6_nd_sll:
+ type: string
+ required: false
+ ipv6_nd_tll:
+ type: string
+ required: false
+
+ tosca.nfv.datatypes.policyType:
+ properties:
+ type:
+ type: string
+ required: false
+ constraints:
+ - valid_values: [ ACL ]
+ criteria:
+ type: list
+ required: true
+ entry_schema:
+ type: tosca.nfv.datatypes.aclType
+
+node_types:
+ tosca.nodes.nfv.VDU.Tacker:
+ derived_from: tosca.nodes.nfv.VDU
+ capabilities:
+ nfv_compute:
+ type: tosca.datatypes.compute_properties
+ properties:
+ name:
+ type: string
+ required: false
+ image:
+# type: tosca.artifacts.Deployment.Image.VM
+ type: string
+ required: false
+ flavor:
+ type: string
+ required: false
+ availability_zone:
+ type: string
+ required: false
+ metadata:
+ type: map
+ entry_schema:
+ type: string
+ required: false
+ config_drive:
+ type: boolean
+ default: false
+ required: false
+
+ placement_policy:
+# type: tosca.policies.tacker.Placement
+ type: string
+ required: false
+
+ monitoring_policy:
+# type: tosca.policies.tacker.Monitoring
+# type: tosca.datatypes.tacker.MonitoringType
+ type: map
+ required: false
+
+ config:
+ type: string
+ required: false
+
+ mgmt_driver:
+ type: string
+ default: noop
+ required: false
+
+ service_type:
+ type: string
+ required: false
+
+ user_data:
+ type: string
+ required: false
+
+ user_data_format:
+ type: string
+ required: false
+
+ key_name:
+ type: string
+ required: false
+
+ tosca.nodes.nfv.CP.Tacker:
+ derived_from: tosca.nodes.nfv.CP
+ properties:
+ mac_address:
+ type: string
+ required: false
+ name:
+ type: string
+ required: false
+ management:
+ type: boolean
+ required: false
+ anti_spoofing_protection:
+ type: boolean
+ required: false
+ security_groups:
+ type: list
+ required: false
+ type:
+ type: string
+ required: false
+ constraints:
+ - valid_values: [ sriov, vnic ]
+
+ tosca.nodes.nfv.FP.Tacker:
+ derived_from: tosca.nodes.Root
+ properties:
+ id:
+ type: integer
+ required: false
+ policy:
+ type: tosca.nfv.datatypes.policyType
+ required: true
+ description: policy to use to match traffic for this FP
+ path:
+ type: list
+ required: true
+ entry_schema:
+ type: tosca.nfv.datatypes.pathType
diff --git a/tosca2heat/heat-translator/translator/tests/data/nfv/test_tosca_nfv_autoscaling.yaml b/tosca2heat/heat-translator/translator/tests/data/nfv/test_tosca_nfv_autoscaling.yaml
new file mode 100644
index 0000000..10c8074
--- /dev/null
+++ b/tosca2heat/heat-translator/translator/tests/data/nfv/test_tosca_nfv_autoscaling.yaml
@@ -0,0 +1,67 @@
+tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0
+
+description: >
+ Template for deploying servers based on policies.
+
+imports:
+ - tacker_defs.yaml
+ - tacker_nfv_defs.yaml
+
+topology_template:
+ node_templates:
+ VDU1:
+ type: tosca.nodes.nfv.VDU.Tacker
+ properties:
+ image: cirros-0.3.4-x86_64-uec
+ mgmt_driver: noop
+ availability_zone: nova
+ flavor: m1.tiny
+
+ CP1:
+ type: tosca.nodes.nfv.CP.Tacker
+ properties:
+ management: true
+ order: 0
+ anti_spoofing_protection: false
+ requirements:
+ - virtualLink:
+ node: VL1
+ - virtualBinding:
+ node: VDU1
+
+ VDU2:
+ type: tosca.nodes.nfv.VDU.Tacker
+ properties:
+ image: cirros-0.3.4-x86_64-uec
+ mgmt_driver: noop
+ availability_zone: nova
+ flavor: m1.tiny
+
+ CP2:
+ type: tosca.nodes.nfv.CP.Tacker
+ properties:
+ management: true
+ order: 0
+ anti_spoofing_protection: false
+ requirements:
+ - virtualLink:
+ node: VL1
+ - virtualBinding:
+ node: VDU2
+
+ VL1:
+ type: tosca.nodes.nfv.VL
+ properties:
+ network_name: net_mgmt
+ vendor: Tacker
+
+ policies:
+ - SP1:
+ type: tosca.policies.tacker.Scaling
+ targets: [VDU1, VDU2]
+ properties:
+ increment: 1
+ cooldown: 120
+ min_instances: 1
+ max_instances: 3
+ default_instances: 2
diff --git a/tosca2heat/heat-translator/translator/tests/data/nfv/test_tosca_nfv_sample.yaml b/tosca2heat/heat-translator/translator/tests/data/nfv/test_tosca_nfv_sample.yaml
new file mode 100644
index 0000000..5e938da
--- /dev/null
+++ b/tosca2heat/heat-translator/translator/tests/data/nfv/test_tosca_nfv_sample.yaml
@@ -0,0 +1,90 @@
+tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0
+
+description: Template for deploying a single server with predefined properties.
+
+topology_template:
+ node_templates:
+
+ VDU1:
+ type: tosca.nodes.nfv.VDU
+ capabilities:
+ host:
+ properties:
+ num_cpus: 2
+ disk_size: 10 GB
+ mem_size: 512 MB
+ # Guest Operating System properties
+ os:
+ properties:
+ # host Operating System image properties
+ architecture: x86_64
+ type: Linux
+ distribution: RHEL
+ version: 6.5
+ requirements:
+ - high_availability: VDU2
+ - local_storage:
+ node: BlockStorage
+ relationship:
+ type: tosca.relationships.AttachesTo
+ properties:
+ location: /data
+
+
+ BlockStorage:
+ type: tosca.nodes.BlockStorage
+ properties:
+ size: 10 GB
+
+ VDU2:
+ type: tosca.nodes.nfv.VDU
+ capabilities:
+ host:
+ properties:
+ num_cpus: 2
+ disk_size: 10 GB
+ mem_size: 512 MB
+ # Guest Operating System properties
+ os:
+ properties:
+ # host Operating System image properties
+ architecture: x86_64
+ type: Linux
+ distribution: RHEL
+ version: 6.5
+
+ CP1:
+ type: tosca.nodes.nfv.CP
+ properties:
+ ip_address: 192.168.0.55
+ requirements:
+ - virtualLink:
+ node: VL1
+# relationship: tosca.relationships.nfv.VirtualLinksTo
+ - virtualBinding:
+ node: VDU1
+ relationship: tosca.relationships.nfv.VirtualBindsTo
+
+ CP2:
+ type: tosca.nodes.nfv.CP
+ properties:
+ ip_address: 192.168.0.56
+ requirements:
+ - virtualLink:
+ node: VL1
+# relationship: tosca.relationships.nfv.VirtualLinksTo
+ - virtualBinding:
+ node: VDU2
+ relationship: tosca.relationships.nfv.VirtualBindsTo
+
+ VL1:
+ type: tosca.nodes.nfv.VL
+ properties:
+ vendor: ACME
+ cidr: '192.168.0.0/24'
+ start_ip: '192.168.0.50'
+ end_ip: '192.168.0.200'
+ gateway_ip: '192.168.0.1'
+ network_name: test_net
+ network_type: vxlan
+ segmentation_id: 100
diff --git a/tosca2heat/heat-translator/translator/tests/data/policies/tosca_policies.yaml b/tosca2heat/heat-translator/translator/tests/data/policies/tosca_policies.yaml
new file mode 100644
index 0000000..26417d3
--- /dev/null
+++ b/tosca2heat/heat-translator/translator/tests/data/policies/tosca_policies.yaml
@@ -0,0 +1,28 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: Template for deploying the nodes based on given policies.
+
+topology_template:
+ node_templates:
+ my_server:
+ type: tosca.nodes.Compute
+ capabilities:
+ # Host container properties
+ host:
+ properties:
+ num_cpus: 2
+ disk_size: 10 GB
+ mem_size: 512 MB
+ # Guest Operating System properties
+ os:
+ properties:
+ # host Operating System image properties
+ architecture: x86_64
+ type: Linux
+ distribution: RHEL
+ version: 6.5
+ policies:
+ - my_compute_placement_policy:
+ type: tosca.policies.Placement
+ description: Apply my placement policy to my application’s servers
+ targets: [ my_server ]
diff --git a/tosca2heat/heat-translator/translator/tests/data/test_tosca_artifact.yaml b/tosca2heat/heat-translator/translator/tests/data/test_tosca_artifact.yaml
index be2caca..161020c 100644
--- a/tosca2heat/heat-translator/translator/tests/data/test_tosca_artifact.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/test_tosca_artifact.yaml
@@ -1,11 +1,14 @@
tosca_definitions_version: tosca_simple_yaml_1_0
-description: TOSCA template to test artifact usage
+description: TOSCA template to test file and Ansible Galaxy role artifacts
node_types:
tosca.nodes.CustomWebServer:
derived_from: tosca.nodes.WebServer
artifacts:
+ my_galaxyansible_role:
+ file: user.role
+ type: tosca.artifacts.AnsibleGalaxy.role
web_content:
file: http://www.mycompany.org/content.tgz
type: tosca.artifacts.File
diff --git a/tosca2heat/heat-translator/translator/tests/data/test_tosca_flavor_and_image.yaml b/tosca2heat/heat-translator/translator/tests/data/test_tosca_flavor_and_image.yaml
index 3247589..e5af6e4 100644
--- a/tosca2heat/heat-translator/translator/tests/data/test_tosca_flavor_and_image.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/test_tosca_flavor_and_image.yaml
@@ -3,7 +3,7 @@ tosca_definitions_version: tosca_simple_yaml_1_0
description: Template for deploying a server with custom properties for image, flavor and key_name.
node_types:
- tosca.nodes.nfv.VDU:
+ tosca.nodes.nfv.MyType:
derived_from: tosca.nodes.Compute
properties:
key_name:
@@ -21,7 +21,7 @@ topology_template:
node_templates:
my_server:
- type: tosca.nodes.nfv.VDU
+ type: tosca.nodes.nfv.MyType
properties:
flavor: m1.medium
image: rhel-6.5-test-image
diff --git a/tosca2heat/heat-translator/translator/tests/data/test_tosca_get_functions_semantic.yaml b/tosca2heat/heat-translator/translator/tests/data/test_tosca_get_functions_semantic.yaml
index 2a76978..6a6a485 100644
--- a/tosca2heat/heat-translator/translator/tests/data/test_tosca_get_functions_semantic.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/test_tosca_get_functions_semantic.yaml
@@ -3,6 +3,12 @@ tosca_definitions_version: tosca_simple_yaml_1_0
description: TOSCA template to test get_* functions semantic
node_types:
+ tosca.capabilities.custom.Endpoint:
+ derived_from: tosca.capabilities.Endpoint
+ attributes:
+ credential:
+ type: tosca.datatypes.Credential
+
tosca.capabilities.MyFeature:
derived_from: tosca.capabilities.Root
properties:
@@ -25,6 +31,12 @@ node_types:
myfeature:
type: tosca.capabilities.MyFeature
+ tosca.nodes.custom.Compute:
+ derived_from: tosca.nodes.Compute
+ capabilities:
+ endpoint:
+ type: tosca.capabilities.custom.Endpoint
+
topology_template:
inputs:
map_val:
@@ -32,7 +44,7 @@ topology_template:
node_templates:
server:
- type: tosca.nodes.Compute
+ type: tosca.nodes.custom.Compute
capabilities:
host:
properties:
@@ -82,3 +94,7 @@ topology_template:
test_list_of_functions:
value: [ { get_property: [ myapp, myfeature, my_map, test_key ] }, { get_property: [ myapp, myfeature, my_map, test_key_static ] } ]
+
+ # should not be translated : complex type
+ credential:
+ value: { get_attribute: [server, endpoint, credential] }
diff --git a/tosca2heat/heat-translator/translator/tests/data/test_tosca_unsupported_type.yaml b/tosca2heat/heat-translator/translator/tests/data/test_tosca_unsupported_type.yaml
new file mode 100644
index 0000000..fdbb771
--- /dev/null
+++ b/tosca2heat/heat-translator/translator/tests/data/test_tosca_unsupported_type.yaml
@@ -0,0 +1,15 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: Template to test unsupported translation. Load Balancer is a
+ > valid TOSCA type but not supported in translator yet.
+
+topology_template:
+ node_templates:
+ simple_load_balancer:
+ type: tosca.nodes.LoadBalancer
+ capabilities:
+ client:
+ properties:
+ network_name: PUBLIC
+ floating: true
+ dns_name: http://mycompany.com/ \ No newline at end of file
diff --git a/tosca2heat/heat-translator/translator/tests/data/tosca_software_component_multiple_hosts.yaml b/tosca2heat/heat-translator/translator/tests/data/tosca_software_component_multiple_hosts.yaml
new file mode 100644
index 0000000..e8aefb7
--- /dev/null
+++ b/tosca2heat/heat-translator/translator/tests/data/tosca_software_component_multiple_hosts.yaml
@@ -0,0 +1,55 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: >
+ TOSCA simple profile with a software component.
+
+topology_template:
+ inputs:
+ cpus:
+ type: integer
+ description: Number of CPUs for the server.
+ constraints:
+ - valid_values: [ 1, 2, 4, 8 ]
+ default: 1
+
+ node_templates:
+ my_software:
+ type: tosca.nodes.SoftwareComponent
+ properties:
+ component_version: 1.0
+ requirements:
+ - host: server1
+ - host: server2
+ interfaces:
+ Standard:
+ create: software_install.sh
+ start: software_start.sh
+
+ server1:
+ type: tosca.nodes.Compute
+ capabilities:
+ host:
+ properties:
+ disk_size: 10 GB
+ num_cpus: { get_input: cpus }
+ mem_size: 1024 MB
+ os:
+ properties:
+ architecture: x86_64
+ type: Linux
+ distribution: Ubuntu
+ version: 14.04
+ server2:
+ type: tosca.nodes.Compute
+ capabilities:
+ host:
+ properties:
+ disk_size: 10 GB
+ num_cpus: { get_input: cpus }
+ mem_size: 1024 MB
+ os:
+ properties:
+ architecture: x86_64
+ type: Linux
+ distribution: Ubuntu
+ version: 14.04