diff --git a/nailgun/nailgun/network/neutron.py b/nailgun/nailgun/network/neutron.py index dabcc45..22c7fc7 100644 --- a/nailgun/nailgun/network/neutron.py +++ b/nailgun/nailgun/network/neutron.py @@ -455,10 +455,10 @@ class NeutronManager70( # actions are for ethernet interfaces. A bond sub-interface added # via add-port will NOT exist in the database at this point and is # not an ethernet interface so no NIC will be found. - if values['type'] == consts.NETWORK_INTERFACE_TYPES.ether \ - and not is_sub_iface: + if values['type'] == consts.NETWORK_INTERFACE_TYPES.ether: nic = objects.Node.get_nic_by_name(node, iface) - node_ifaces[iface]['id'] = nic.id + if nic: + node_ifaces[iface]['id'] = nic.id node_data = { 'id': node.id,