Merge "Clean up driver_factory.enabled_supported_interfaces"
This commit is contained in:
commit
c58e601ba3
@ -347,14 +347,12 @@ def enabled_supported_interfaces(hardware_type):
|
|||||||
mapping = dict()
|
mapping = dict()
|
||||||
for interface_type in driver_base.ALL_INTERFACES:
|
for interface_type in driver_base.ALL_INTERFACES:
|
||||||
supported = set()
|
supported = set()
|
||||||
enabled = set()
|
|
||||||
supported_ifaces = getattr(hardware_type,
|
supported_ifaces = getattr(hardware_type,
|
||||||
'supported_%s_interfaces' % interface_type)
|
'supported_%s_interfaces' % interface_type)
|
||||||
for name, iface in interfaces(interface_type).items():
|
for name, iface in interfaces(interface_type).items():
|
||||||
enabled.add(name)
|
|
||||||
if iface.__class__ in supported_ifaces:
|
if iface.__class__ in supported_ifaces:
|
||||||
supported.add(name)
|
supported.add(name)
|
||||||
mapping[interface_type] = enabled.intersection(supported)
|
mapping[interface_type] = supported
|
||||||
return mapping
|
return mapping
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user