Example #1
0
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)
Example #2
0
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)
Example #3
0
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"]]
Example #4
0
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)
Example #5
0
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"]]
Example #6
0
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)