Get rid of ipv4- prefix when looking for sys-interfaces
bifrost is composing network ids with ipv4+mac, while sys_interfaces is just a dict with mac:nic values. Get rid of that ipv4 prefix when searching for the right interface to create the bridge. We will be trying first to retrieve the original id, then get rid of ipv4- as a fallback. Change-Id: I78ac1e6b735cbc2cc120c92f6c9bf1492924f5e4
This commit is contained in:
parent
988c4d7e74
commit
d14693bde4
@ -166,7 +166,8 @@ def main():
|
||||
interfaces = get_config_drive_interfaces(network_info)
|
||||
if len(interfaces) == 1:
|
||||
interface = interfaces[interfaces.keys()[0]]
|
||||
interface_name = sys_interfaces[interface['id']]
|
||||
interface_name = sys_interfaces.get(
|
||||
interface['id'], interface['id'].replace('ipv4-', ''))
|
||||
else:
|
||||
interface = interfaces[[i for i in interfaces.keys()
|
||||
if 'vlan_id' in interfaces[i]][0]]
|
||||
|
Loading…
x
Reference in New Issue
Block a user