def blade_idrac(name, idrac_password=None, idrac_ipmi=None,
                idrac_ip=None, idrac_netmask=None, idrac_gateway=None,
                idrac_dnsname=None,
                idrac_dhcp=None):

    ret = {'name': name,
           'result': True,
           'changes': {},
           'comment': ''}

    if not idrac_password:
        (username, password) = __salt__['chassis.chassis_credentials']()
    else:
        password = idrac_password

    module_network = __salt__['chassis.cmd']('network_info', module=name)
    current_idrac_ip = module_network['Network']['IP Address']

    if idrac_ipmi is not None:
        if idrac_ipmi is True or idrac_ipmi == 1:
            idrac_ipmi = '1'
        if idrac_ipmi is False or idrac_ipmi == 0:
            idrac_ipmi = '0'
        current_ipmi = __salt__['dracr.get_general']('cfgIpmiLan', 'cfgIpmiLanEnable',
                                                     host=current_idrac_ip, admin_username='root',
                                                     admin_password=password)

        if current_ipmi != idrac_ipmi:
            ch = {'Old': current_ipmi, 'New': idrac_ipmi}
            ret['changes']['IPMI'] = ch

    if idrac_dnsname is not None:
        dnsret = __salt__['dracr.get_dns_dracname'](host=current_idrac_ip,
                                                    admin_username='root',
                                                    admin_password=password)
        current_dnsname = dnsret['[Key=iDRAC.Embedded.1#NIC.1]']['DNSRacName']
        if current_dnsname != idrac_dnsname:
            ch = {'Old': current_dnsname,
                  'New': idrac_dnsname}
            ret['changes']['DNSRacName'] = ch

    if idrac_dhcp is not None or idrac_ip or idrac_netmask or idrac_gateway:
        if idrac_dhcp is True or idrac_dhcp == 1:
            idrac_dhcp = 1
        else:
            idrac_dhcp = 0
        if str(module_network['Network']['DHCP Enabled']) == '0' and idrac_dhcp == 1:
            ch = {'Old': module_network['Network']['DHCP Enabled'],
                  'New': idrac_dhcp}
            ret['changes']['DRAC DHCP'] = ch

        if idrac_dhcp == 0 and all([idrac_ip, idrac_netmask, idrac_netmask]):
            current_network = __salt__['chassis.cmd']('network_info',
                                                      module=name)
            old_ipv4 = {}
            new_ipv4 = {}
            if current_network['Network']['IP Address'] != idrac_ip:
                old_ipv4['ip'] = current_network['Network']['IP Address']
                new_ipv4['ip'] = idrac_ip
            if current_network['Network']['Subnet Mask'] != idrac_netmask:
                old_ipv4['netmask'] = current_network['Network']['Subnet Mask']
                new_ipv4['netmask'] = idrac_netmask
            if current_network['Network']['Gateway'] != idrac_gateway:
                old_ipv4['gateway'] = current_network['Network']['Gateway']
                new_ipv4['gateway'] = idrac_gateway

            if new_ipv4 != {}:
                ret['changes']['Network'] = {}
                ret['changes']['Network']['Old'] = old_ipv4
                ret['changes']['Network']['New'] = new_ipv4

    if ret['changes'] == {}:
        ret['comment'] = 'iDRAC on blade is already in the desired state.'
        return ret

    if __opts__['test'] and ret['changes'] != {}:
        ret['result'] = None
        ret['comment'] = 'iDRAC on blade will change.'
        return ret

    if 'IPMI' in ret['changes']:
        ipmi_result = __salt__['dracr.set_general']('cfgIpmiLan',
                                                    'cfgIpmiLanEnable',
                                                    idrac_ipmi,
                                                    host=current_idrac_ip,
                                                    admin_username='root',
                                                    admin_password=password)
        if not ipmi_result:
            ret['result'] = False
            ret['changes']['IPMI']['success'] = False

    if 'DNSRacName' in ret['changes']:
        dnsracname_result = __salt__['dracr.set_dns_dracname'](idrac_dnsname,
            host=current_idrac_ip,
            admin_username='root',
            admin_password=password)
        if dnsracname_result['retcode'] == 0:
            ret['changes']['DNSRacName']['success'] = True
        else:
            ret['result'] = False
            ret['changes']['DNSRacName']['success'] = False
            ret['changes']['DNSRacName']['return'] = dnsracname_result

    if 'DRAC DHCP' in ret['changes']:
        dhcp_result = __salt__['chassis.cmd']('set_niccfg', dhcp=idrac_dhcp)
        if dhcp_result['retcode']:
            ret['changes']['DRAC DHCP']['success'] = True
        else:
            ret['result'] = False
            ret['changes']['DRAC DHCP']['success'] = False
            ret['changes']['DRAC DHCP']['return'] = dhcp_result

    if 'Network' in ret['changes']:
        network_result = __salt__['chassis.cmd']('set_niccfg', ip=idrac_ip,
                                                 netmask=idrac_netmask,
                                                 gateway=idrac_gateway,
                                                 module=name)
        if network_result['retcode'] == 0:
            ret['changes']['Network']['success'] = True
        else:
            ret['result'] = False
            ret['changes']['Network']['success'] = False
            ret['changes']['Network']['return'] = network_result

    return ret
Try to change maximum number of threads.
dataset/ETHPy150Open saltstack/salt/salt/states/dellchassis.py/blade_idrac--crossover with--dataset/ETHPy150Open twisted/twisted/twisted/test/test_threads.py/ReactorThreadsTests.test_suggestThreadPoolSize