Pass MTU configuration to seed VM's configdrive

This ensures that the seed VM honours any MTU configuration following its
initial provisioning.
This commit is contained in:
Mark Goddard 2018-01-16 17:53:04 +00:00
parent 856cbed057
commit dbb92fb42d

View File

@ -390,12 +390,14 @@ def net_configdrive_network_device(context, name, inventory_hostname=None):
netmask = net_mask(context, name, inventory_hostname)
gateway = net_gateway(context, name, inventory_hostname)
bootproto = 'static' if ip is not None else 'dhcp'
mtu = net_mtu(context, name, inventory_hostname)
interface = {
'device': device,
'address': ip,
'netmask': netmask,
'gateway': gateway,
'bootproto': bootproto,
'mtu': mtu,
}
interface = {k: v for k, v in interface.items() if v is not None}
return interface