Parametrize ironic VM mac addresses
Since baremetal simulator is going to be deployed
on 3 baremetal nodes - ironic VM mac addresses
should be unique across nodes otherwise ironic ports
won`t be created. This patch parametrizes the first 3
octets (vendor id) of mac adress hence it can be set on
reclass node level
Change-Id: Ib7f39c63f5e61b16609ca23a463b2e25c92b3954
Related-PROD: PROD-24887
diff --git a/metadata/service/nodes_flat.yml b/metadata/service/nodes_flat.yml
index d36fdbd..ef90931 100644
--- a/metadata/service/nodes_flat.yml
+++ b/metadata/service/nodes_flat.yml
@@ -1,6 +1,8 @@
applications:
- baremetal_simulator
parameters:
+ _param:
+ openstack_baremetal_simulator_mac_vendor: "aa:bb:cc"
ironic:
client:
enabled: true
@@ -22,8 +24,8 @@
deploy_ramdisk: http://${_param:single_baremetal_address}/${baremetal_simulator:deploy_ramdisk_file}
deploy_kernel: http://${_param:single_baremetal_address}/${baremetal_simulator:deploy_kernel_file}
ports:
- - address: aa:bb:cc:dd:00:00
- - address: aa:bb:cc:dd:00:01
+ - address: "${_param:openstack_baremetal_simulator_mac_vendor}:dd:00:00"
+ - address: "${_param:openstack_baremetal_simulator_mac_vendor}:dd:00:01"
- name: ${linux:network:hostname}-n1
driver: pxe_ipmitool
microversion: '1.9'
@@ -40,7 +42,7 @@
deploy_ramdisk: http://${_param:single_baremetal_address}/${baremetal_simulator:deploy_ramdisk_file}
deploy_kernel: http://${_param:single_baremetal_address}/${baremetal_simulator:deploy_kernel_file}
ports:
- - address: aa:bb:cc:dd:01:00
+ - address: "${_param:openstack_baremetal_simulator_mac_vendor}:dd:01:00"
deployment_profile:
network:
fixed_ips:
@@ -62,4 +64,4 @@
deploy_ramdisk: http://${_param:single_baremetal_address}/${baremetal_simulator:deploy_ramdisk_file}
deploy_kernel: http://${_param:single_baremetal_address}/${baremetal_simulator:deploy_kernel_file}
ports:
- - address: aa:bb:cc:dd:02:00
+ - address: "${_param:openstack_baremetal_simulator_mac_vendor}:dd:02:00"
diff --git a/metadata/service/nodes_neutron.yml b/metadata/service/nodes_neutron.yml
index 495813f..0e26a09 100644
--- a/metadata/service/nodes_neutron.yml
+++ b/metadata/service/nodes_neutron.yml
@@ -1,6 +1,8 @@
applications:
- baremetal_simulator
parameters:
+ _param:
+ openstack_baremetal_simulator_mac_vendor: "aa:bb:cc"
ironic:
client:
enabled: true
@@ -23,13 +25,13 @@
network_interface: 'neutron'
microversion: '1.20'
ports:
- - address: aa:bb:cc:dd:00:00
+ - address: "${_param:openstack_baremetal_simulator_mac_vendor}:dd:00:00"
local_link_connection:
switch_id: 00:00:00:00:00:00
switch_info: br-simulator
port_id: tap-bmt-n0i1
microversion: '1.19'
- - address: aa:bb:cc:dd:00:01
+ - address: "${_param:openstack_baremetal_simulator_mac_vendor}:dd:00:01"
local_link_connection:
switch_id: 00:00:00:00:00:00
switch_info: br-simulator
@@ -52,7 +54,7 @@
network_interface: 'neutron'
microversion: '1.20'
ports:
- - address: aa:bb:cc:dd:01:00
+ - address: "${_param:openstack_baremetal_simulator_mac_vendor}:dd:01:00"
local_link_connection:
switch_id: 00:00:00:00:00:00
switch_info: br-simulator
@@ -80,7 +82,7 @@
network_interface: 'neutron'
microversion: '1.20'
ports:
- - address: aa:bb:cc:dd:02:00
+ - address: "${_param:openstack_baremetal_simulator_mac_vendor}:dd:02:00"
local_link_connection:
switch_id: 00:00:00:00:00:00
switch_info: br-simulator