Fix the search algorithm
[samplevnf.git] / VNFs / DPPD-PROX / helper-scripts / rapid / rapid-openstack-server-2ports.yaml
1 heat_template_version: 2014-10-16
2
3 description: single server resource with 2 dataplane ports used by resource groups.
4
5 parameters:
6   PROX_public_net:
7     type: string
8   PROX_mgmt_net_id:
9     type: string
10   PROX_data_net_id:
11     type: string
12   PROX_data2_net_id:
13     type: string
14   PROX_server_name:
15     type: string
16   PROX_availability_zone:
17     type: string
18   PROX_security_group:
19     type: string
20   PROX_image:
21     type: string
22   PROX_key:
23     type: string
24   PROX_config:
25     type: string
26
27 resources:
28   PROX_instance:
29     type: OS::Nova::Server
30     properties:
31       name: { get_param: PROX_server_name }
32       availability_zone : {get_param: PROX_availability_zone}
33       flavor: {get_resource: PROX_flavor}
34       image: {get_param: PROX_image}
35       key_name: {get_param: PROX_key}
36       networks:
37         - port: {get_resource: mgmt_port }
38         - port: {get_resource: data_port }
39         - port: {get_resource: data2_port }
40       user_data: {get_param: PROX_config}    
41       user_data_format: RAW
42
43   PROX_flavor:
44     type: OS::Nova::Flavor
45     properties:
46       ram: 4096
47       vcpus: 4
48       disk: 80
49       extra_specs: {"hw:mem_page_size": "large","hw:cpu_policy": "dedicated","hw:cpu_thread_policy":"isolate"}
50
51   mgmt_port:
52     type: OS::Neutron::Port
53     properties:
54       network_id: { get_param: PROX_mgmt_net_id }
55       security_groups:
56         - {get_param: PROX_security_group}
57
58   floating_ip:
59     type: OS::Neutron::FloatingIP
60     properties:
61       floating_network: {get_param: PROX_public_net}
62       port_id: {get_resource: mgmt_port}
63
64   data_port:
65     type: OS::Neutron::Port
66     properties:
67       network_id: { get_param: PROX_data_net_id }
68       security_groups:
69         - {get_param: PROX_security_group}
70
71   data2_port:
72     type: OS::Neutron::Port
73     properties:
74       network_id: { get_param: PROX_data2_net_id }
75       security_groups:
76         - {get_param: PROX_security_group}
77
78 outputs:
79   name:
80     description: Name of the PROX instance
81     value: {get_attr: [PROX_instance, name]}
82   mngmt_ip:
83     description: Management IP of the VM
84     value: {get_attr: [floating_ip, floating_ip_address ]}
85   data_plane_ips:
86     description: List of DataPlane IPs of the VM
87     value:
88         - {get_attr: [data_port, fixed_ips, 0, ip_address]}
89         - {get_attr: [data2_port, fixed_ips, 0, ip_address]}
90   data_plane_mac:
91     description: List of DataPlane MACs of the VM
92     value:
93         - {get_attr: [data_port, mac_address]}
94         - {get_attr: [data2_port, mac_address]}