Convert network MTU to an integer
This seems to be required for the seed VM, if an MTU is specified. Change-Id: I49d7893ab6900b3bd66eec1f6b03cf89c917e5bd
This commit is contained in:
parent
d23658aaf6
commit
983ce3dae2
@ -123,7 +123,14 @@ def net_vlan(context, name, inventory_hostname=None):
|
||||
return net_attr(context, name, 'vlan', inventory_hostname)
|
||||
|
||||
|
||||
net_mtu = _make_attr_filter('mtu')
|
||||
@jinja2.contextfilter
|
||||
def net_mtu(context, name, inventory_hostname=None):
|
||||
mtu = net_attr(context, name, 'mtu', inventory_hostname)
|
||||
if mtu is not None:
|
||||
mtu = int(mtu)
|
||||
return mtu
|
||||
|
||||
|
||||
net_routes = _make_attr_filter('routes')
|
||||
net_rules = _make_attr_filter('rules')
|
||||
net_physical_network = _make_attr_filter('physical_network')
|
||||
|
Loading…
Reference in New Issue
Block a user