def enslave(ns, master_setting, device):
    capability = device.first_associator(ResultClass="LMI_IPNetworkConnectionCapabilities",
                                         AssocClass="LMI_IPNetworkConnectionElementCapabilities")
    result = capability.LMI_CreateSlaveSetting(MasterSettingData=master_setting)
    if result.rval != 0:
        raise LmiFailed("Unable to create setting: %s" % result.errorstr)
    LOG().info("Device %s enslaved to setting %s", device.ElementName, master_setting.Caption)
    return 0
Create slave setting of the master_setting with given device.
dataset/ETHPy150Open openlmi/openlmi-scripts/commands/networking/lmi/scripts/networking/__init__.py/enslave