Add an ability pass interface info via metadata
The patch adds an ability to pass interface information including
pci_info, MAC and IP addresses via metadata in wait condition
response.
Related-PRODX: PRODX-9016
Change-Id: I984ecd8630706179ec6fae6dcf1867f4def708a8
diff --git a/de/heat-templates/fragments/NetworkPrvFl.yaml b/de/heat-templates/fragments/NetworkPrvFl.yaml
index 26bb882..f122682 100644
--- a/de/heat-templates/fragments/NetworkPrvFl.yaml
+++ b/de/heat-templates/fragments/NetworkPrvFl.yaml
@@ -18,7 +18,7 @@
default: ''
data_network_vsrx_ip:
type: string
- tf_data_network:
+ tun_network:
type: string
resources:
diff --git a/de/heat-templates/fragments/NetworkPrvFlVSRX.yaml b/de/heat-templates/fragments/NetworkPrvFlVSRX.yaml
index 00d7bcf..847a256 100644
--- a/de/heat-templates/fragments/NetworkPrvFlVSRX.yaml
+++ b/de/heat-templates/fragments/NetworkPrvFlVSRX.yaml
@@ -15,7 +15,7 @@
type: string
data_network_vsrx_ip:
type: string
- tf_data_network:
+ tun_network:
type: string
resources:
@@ -49,10 +49,10 @@
fixed_ips:
- ip_address: { get_param: private_floating_network_gateway}
- tf_data_server_port:
+ tun_server_port:
type: OS::Neutron::Port
properties:
- network_id: { get_param: tf_data_network }
+ network_id: { get_param: tun_network }
port_security_enabled: false
fixed_ips:
- ip_address: { get_param: data_network_vsrx_ip}
@@ -67,7 +67,7 @@
networks:
- port: { get_resource: accessible_server_port }
- port: { get_resource: private_floating_server_port }
- - port: { get_resource: tf_data_server_port }
+ - port: { get_resource: tun_server_port }
outputs:
private_floating_network_id:
diff --git a/de/heat-templates/fragments/NetworkTFData.yaml b/de/heat-templates/fragments/NetworkTFData.yaml
deleted file mode 100644
index a98b510..0000000
--- a/de/heat-templates/fragments/NetworkTFData.yaml
+++ /dev/null
@@ -1,30 +0,0 @@
-heat_template_version: queens
-
-parameters:
- tf_data_network_cidr:
- type: string
- tf_data_network_pool_start:
- type: string
- tf_data_network_pool_end:
- type: string
-
-resources:
-
- network:
- type: OS::Neutron::Net
- subnet:
- type: OS::Neutron::Subnet
- properties:
- network: { get_resource: network }
- enable_dhcp: false
- cidr: { get_param: tf_data_network_cidr }
- gateway_ip: ~
- allocation_pools:
- - start: { get_param: tf_data_network_pool_start }
- end: { get_param: tf_data_network_pool_end }
-
-outputs:
- tf_data_network_id:
- value: { get_resource: network }
- tf_data_subnet_id:
- value: { get_resource: subnet }
diff --git a/de/heat-templates/fragments/NetworkTun.yaml b/de/heat-templates/fragments/NetworkTun.yaml
new file mode 100644
index 0000000..0b122ac
--- /dev/null
+++ b/de/heat-templates/fragments/NetworkTun.yaml
@@ -0,0 +1,30 @@
+heat_template_version: queens
+
+parameters:
+ tun_network_cidr:
+ type: string
+ tun_network_pool_start:
+ type: string
+ tun_network_pool_end:
+ type: string
+
+resources:
+
+ network:
+ type: OS::Neutron::Net
+ subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ network: { get_resource: network }
+ enable_dhcp: false
+ cidr: { get_param: tun_network_cidr }
+ gateway_ip: ~
+ allocation_pools:
+ - start: { get_param: tun_network_pool_start }
+ end: { get_param: tun_network_pool_end }
+
+outputs:
+ tun_network_id:
+ value: { get_resource: network }
+ tun_subnet_id:
+ value: { get_resource: subnet }
diff --git a/de/heat-templates/fragments/SrvInstancesBMCephOSD.yaml b/de/heat-templates/fragments/SrvInstancesBMCephOSD.yaml
index 162da83..8ed2d5a 100644
--- a/de/heat-templates/fragments/SrvInstancesBMCephOSD.yaml
+++ b/de/heat-templates/fragments/SrvInstancesBMCephOSD.yaml
@@ -58,9 +58,9 @@
type: boolean
tungstenfabric_enabled:
type: boolean
- tf_data_network:
+ tun_network:
type: string
- tf_data_subnet_id:
+ tun_subnet_id:
type: string
functions_override:
type: string
@@ -84,10 +84,6 @@
description: The content of lab metadata.
type: string
-conditions:
- create_tf_data_network_res:
- get_param: tungstenfabric_enabled
-
resources:
software_config:
@@ -190,14 +186,13 @@
fixed_ips:
- subnet: { get_param: ironic_baremetal_subnet_id }
- tf_data_server_port:
+ tun_server_port:
type: OS::Neutron::Port
- condition: create_tf_data_network_res
properties:
- network_id: { get_param: tf_data_network }
+ network_id: { get_param: tun_network }
port_security_enabled: false
fixed_ips:
- - subnet: { get_param: tf_data_subnet_id }
+ - subnet: { get_param: tun_subnet_id }
wait_handle:
type: OS::Heat::WaitConditionHandle
@@ -220,8 +215,7 @@
value: { get_attr: [ironic_baremetal_server_port, fixed_ips, 0, ip_address] }
server_tf_data_ip:
description: IP address of server in tf data network
- value: { get_attr: [tf_data_server_port, fixed_ips, 0, ip_address] }
- condition: create_tf_data_network_res
+ value: { get_attr: [tun_server_port, fixed_ips, 0, ip_address] }
server_public_ip:
description: Floating IP address of server in public network
value: { get_attr: [server, networks, { get_param: accessible_network}, 0]}
diff --git a/de/heat-templates/fragments/SrvInstancesVMCephOSD.yaml b/de/heat-templates/fragments/SrvInstancesVMCephOSD.yaml
index 1af557e..4e15338 100644
--- a/de/heat-templates/fragments/SrvInstancesVMCephOSD.yaml
+++ b/de/heat-templates/fragments/SrvInstancesVMCephOSD.yaml
@@ -58,9 +58,9 @@
type: boolean
tungstenfabric_enabled:
type: boolean
- tf_data_network:
+ tun_network:
type: string
- tf_data_subnet_id:
+ tun_subnet_id:
type: string
functions_override:
type: string
@@ -98,10 +98,6 @@
default: '0,0'
type: string
-conditions:
- create_tf_data_network_res:
- get_param: tungstenfabric_enabled
-
resources:
software_config:
@@ -166,19 +162,12 @@
key_name: { get_param: key_name }
availability_zone: nova
networks:
- if:
- - "create_tf_data_network_res"
- - - port: { get_resource: accessible_server_port }
- - port: { get_resource: private_floating_server_port }
- - port: { get_resource: storage_frontend_server_port }
- - port: { get_resource: storage_backend_server_port }
- - port: { get_resource: ironic_baremetal_server_port }
- - port: { get_resource: tf_data_server_port }
- - - port: { get_resource: accessible_server_port }
- - port: { get_resource: private_floating_server_port }
- - port: { get_resource: storage_frontend_server_port }
- - port: { get_resource: storage_backend_server_port }
- - port: { get_resource: ironic_baremetal_server_port }
+ - port: { get_resource: accessible_server_port }
+ - port: { get_resource: private_floating_server_port }
+ - port: { get_resource: storage_frontend_server_port }
+ - port: { get_resource: storage_backend_server_port }
+ - port: { get_resource: ironic_baremetal_server_port }
+ - port: { get_resource: tun_server_port }
user_data_format: SOFTWARE_CONFIG
user_data: { get_resource: install_config_agent}
metadata: { get_param: metadata }
@@ -229,14 +218,13 @@
fixed_ips:
- subnet: { get_param: ironic_baremetal_subnet_id }
- tf_data_server_port:
+ tun_server_port:
type: OS::Neutron::Port
- condition: create_tf_data_network_res
properties:
- network_id: { get_param: tf_data_network }
+ network_id: { get_param: tun_network }
port_security_enabled: false
fixed_ips:
- - subnet: { get_param: tf_data_subnet_id }
+ - subnet: { get_param: tun_subnet_id }
wait_handle:
type: OS::Heat::WaitConditionHandle
@@ -258,8 +246,7 @@
value: { get_attr: [ironic_baremetal_server_port, fixed_ips, 0, ip_address] }
server_tf_data_ip:
description: IP address of server in tf data network
- value: { get_attr: [tf_data_server_port, fixed_ips, 0, ip_address] }
- condition: create_tf_data_network_res
+ value: { get_attr: [tun_server_port, fixed_ips, 0, ip_address] }
server_public_ip:
description: Floating IP address of server in public network
value: { get_attr: [ server_floating_ip, floating_ip_address ] }