diff --git a/neutron/db/port_hardware_offload_type_db.py b/neutron/db/port_hardware_offload_type_db.py index 21447e82f6d..9e1975e57ca 100644 --- a/neutron/db/port_hardware_offload_type_db.py +++ b/neutron/db/port_hardware_offload_type_db.py @@ -41,7 +41,7 @@ class PortHardwareOffloadTypeDbMixin(object): if hw_type not in capabilities: capabilities.append(hw_type) data[portbindings.PROFILE]['capabilities'] = capabilities - except KeyError: + except (AttributeError, KeyError): data[portbindings.PROFILE] = {'capabilities': [hw_type]} def _extend_port_dict(self, port_db, result): diff --git a/neutron/plugins/ml2/plugin.py b/neutron/plugins/ml2/plugin.py index 0a33526016b..b46fa42548e 100644 --- a/neutron/plugins/ml2/plugin.py +++ b/neutron/plugins/ml2/plugin.py @@ -43,7 +43,6 @@ from neutron_lib.api.definitions import network_mtu as mtu_apidef from neutron_lib.api.definitions import network_mtu_writable as mtuw_apidef from neutron_lib.api.definitions import port as port_def from neutron_lib.api.definitions import port_device_profile as pdp_def -from neutron_lib.api.definitions import port_hardware_offload_type as phot_def from neutron_lib.api.definitions import port_mac_address_override from neutron_lib.api.definitions import port_mac_address_regenerate from neutron_lib.api.definitions import port_numa_affinity_policy as pnap_def @@ -251,7 +250,6 @@ class Ml2Plugin(db_base_plugin_v2.NeutronDbPluginV2, port_mac_address_override.ALIAS, sg_default_rules_ext.ALIAS, sg_rules_default_sg.ALIAS, - phot_def.ALIAS, subnet_ext_net_def.ALIAS, ]