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