def get_applicable_devices(ns, setting):

    # Handle bridging/bonding master differently
    if setting.classname in ('LMI_BridgingMasterSettingData', 'LMI_BondingMasterSettingData'):
        # return bond/bridge device in the bond/bridge setting is active
        interface_name = setting.InterfaceName
        device = ns.LMI_IPNetworkConnection.first_instance({'ElementName': interface_name})
        if device:
            return [device]
        # return all devices associated with slave settings for bridge/bond if not active
        slave_class = None
        if setting.classname == 'LMI_BridgingMasterSettingData':
            slave_class = 'LMI_BridgingSlaveSettingData'
        elif setting.classname == 'LMI_BondingMasterSettingData':
            slave_class = 'LMI_BondingSlaveSettingData'
        if slave_class is not None:
            devices = []
        for slave_setting in setting.associators(AssocClass="LMI_OrderedIPAssignmentComponent", ResultClass=slave_class):
            devices += slave_setting.associators(AssocClass="LMI_IPElementSettingData")
        return devices

    return setting.associators(AssocClass="LMI_IPElementSettingData")
Get list of network devices that this setting can be applied to.
dataset/ETHPy150Open openlmi/openlmi-scripts/commands/networking/lmi/scripts/networking/__init__.py/get_applicable_devices