def NetConfigDevice(dev_config, if_manager): ''' Class dispatcher ''' if is_nm_managed(dev_config, if_manager): return nm_type_class_mapping[dev_config["type"]](dev_config, if_manager) else: return type_class_mapping[dev_config["type"]](dev_config, if_manager)
def NetConfigDeviceType(netdev, config): ''' Class dispatcher for classmethods ''' if is_nm_managed(netdev, config): return nm_type_class_mapping[netdev["type"]] else: return type_class_mapping[netdev["type"]]
def NetConfigDevice(netdev, config): ''' Class dispatcher ''' if is_nm_managed(netdev, config): return nm_type_class_mapping[netdev["type"]](netdev, config) else: return type_class_mapping[netdev["type"]](netdev, config)