summaryrefslogtreecommitdiffstats
path: root/tosca2heat/heat-translator/translator/tests/data/hot_output/network
diff options
context:
space:
mode:
authorshangxdy <shang.xiaodong@zte.com.cn>2016-04-07 14:08:49 -0400
committershangxdy <shang.xiaodong@zte.com.cn>2016-04-07 14:59:30 -0400
commitc8201c119ec686e79797721156767685fe848aca (patch)
treecce6aa15ded38d89c18a14b76c21f21e0b1a24f7 /tosca2heat/heat-translator/translator/tests/data/hot_output/network
parent4e4c86a06d58b1816c074c7f9da4c58bbf10368c (diff)
Update tosca lib to version 0.5
Use tosca-parser and heat-translator to analyze to the basic nfv-tosca type definitions, and use simple tosca new feature such as policy, group and trigger, which are now supported by the latest version of tosca-parser and heat-translator. JIRA:PARSER-18 Change-Id: I797bcacbb5b32005d0aeb0f3f32851ac96e30f01 Signed--off-by: shangxdy <shang.xiaodong@zte.com.cn> Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
Diffstat (limited to 'tosca2heat/heat-translator/translator/tests/data/hot_output/network')
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/network/hot_custom_network_nodes.yaml33
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/network/hot_one_server_one_network.yaml44
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/network/hot_one_server_three_networks.yaml71
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/network/hot_server_on_existing_network.yaml27
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/network/hot_two_servers_one_network.yaml72
5 files changed, 247 insertions, 0 deletions
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
new file mode 100644
index 0000000..556dcf4
--- /dev/null
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/network/hot_custom_network_nodes.yaml
@@ -0,0 +1,33 @@
+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.medium
+ image: rhel-6.5-test-image
+ networks:
+ - port: { get_resource: CP1 }
+ user_data_format: SOFTWARE_CONFIG
+ CP1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: VL1 }
+ VL1:
+ type: OS::Neutron::Net
+ VL1_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ ip_version: 4
+ allocation_pools:
+ - end: 192.168.0.200
+ start: 192.168.0.50
+ gateway_ip: 192.168.0.1
+ cidr: 192.168.0.0/24
+ network: { get_resource: VL1 }
+outputs: {}
+
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
new file mode 100644
index 0000000..cfcd290
--- /dev/null
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/network/hot_one_server_one_network.yaml
@@ -0,0 +1,44 @@
+heat_template_version: 2013-05-23
+
+description: >
+ TOSCA simple profile with 1 server bound to a new network
+
+parameters:
+ network_name:
+ type: string
+ description: Network name
+ default: private_net
+
+resources:
+ my_server:
+ type: OS::Nova::Server
+ properties:
+ flavor: m1.small
+ image: cirros-0.3.2-x86_64-uec
+ networks:
+ - port: { get_resource: my_port }
+ user_data_format: SOFTWARE_CONFIG
+
+ my_network:
+ type: OS::Neutron::Net
+ properties:
+ name:
+ get_param: network_name
+
+ my_network_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ allocation_pools:
+ - end: 192.168.0.200
+ start: 192.168.0.50
+ cidr: 192.168.0.0/24
+ gateway_ip: 192.168.0.1
+ ip_version: 4
+ network: { get_resource: my_network }
+
+ my_port:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: my_network }
+
+outputs: {}
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
new file mode 100644
index 0000000..f8674e1
--- /dev/null
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/network/hot_one_server_three_networks.yaml
@@ -0,0 +1,71 @@
+heat_template_version: 2013-05-23
+
+description: >
+ TOSCA simple profile with 1 server bound to 3 networks
+
+parameters: {}
+
+resources:
+ my_server:
+ type: OS::Nova::Server
+ properties:
+ flavor: m1.small
+ image: cirros-0.3.2-x86_64-uec
+ networks:
+ - port: { get_resource: my_port1 }
+ - port: { get_resource: my_port2 }
+ - port: { get_resource: my_port3 }
+ user_data_format: SOFTWARE_CONFIG
+
+ my_network1:
+ type: OS::Neutron::Net
+ properties:
+ name: net1
+
+ my_network2:
+ type: OS::Neutron::Net
+ properties:
+ name: net2
+
+ my_network3:
+ type: OS::Neutron::Net
+ properties:
+ name: net3
+
+ my_network1_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ cidr: 192.168.1.0/24
+ ip_version: 4
+ network: { get_resource: my_network1 }
+
+ my_network2_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ cidr: 192.168.2.0/24
+ ip_version: 4
+ network: { get_resource: my_network2 }
+
+ my_network3_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ cidr: 192.168.3.0/24
+ ip_version: 4
+ network: { get_resource: my_network3 }
+
+ my_port1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: my_network1 }
+
+ my_port2:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: my_network2 }
+
+ my_port3:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: my_network3 }
+
+outputs: {}
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
new file mode 100644
index 0000000..b8282b5
--- /dev/null
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/network/hot_server_on_existing_network.yaml
@@ -0,0 +1,27 @@
+heat_template_version: 2013-05-23
+
+description: >
+ TOSCA simple profile with 1 server bound to an existing network
+
+parameters:
+ network_name:
+ type: string
+ description: Network name
+ default: private_net
+
+resources:
+ my_server:
+ type: OS::Nova::Server
+ properties:
+ flavor: m1.small
+ image: cirros-0.3.2-x86_64-uec
+ networks:
+ - port: { get_resource: my_port }
+ user_data_format: SOFTWARE_CONFIG
+
+ my_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: network_name}
+
+outputs: {}
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
new file mode 100644
index 0000000..21157bb
--- /dev/null
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/network/hot_two_servers_one_network.yaml
@@ -0,0 +1,72 @@
+heat_template_version: 2013-05-23
+
+description: >
+ TOSCA simple profile with 2 servers bound to the 1 network
+
+parameters:
+ network_name:
+ type: string
+ description: Network name
+ default: my_private_net
+ network_cidr:
+ type: string
+ description: CIDR for the network
+ default: 10.0.0.0/24
+ network_start_ip:
+ type: string
+ description: Start IP for the allocation pool
+ default: 10.0.0.100
+ network_end_ip:
+ type: string
+ description: End IP for the allocation pool
+ default: 10.0.0.150
+
+resources:
+ my_server:
+ type: OS::Nova::Server
+ properties:
+ flavor: m1.small
+ image: cirros-0.3.2-x86_64-uec
+ networks:
+ - port: { get_resource: my_port }
+ user_data_format: SOFTWARE_CONFIG
+
+ my_server2:
+ type: OS::Nova::Server
+ properties:
+ flavor: m1.small
+ image: cirros-0.3.2-x86_64-uec
+ networks:
+ - port: { get_resource: my_port2 }
+ user_data_format: SOFTWARE_CONFIG
+
+ my_network:
+ type: OS::Neutron::Net
+ properties:
+ name:
+ get_param: network_name
+
+ my_network_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ allocation_pools:
+ - end:
+ get_param: network_end_ip
+ start:
+ get_param: network_start_ip
+ cidr:
+ get_param: network_cidr
+ ip_version: 4
+ network: { get_resource: my_network }
+
+ my_port:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: my_network }
+
+ my_port2:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: my_network }
+
+outputs: {}