salt/states/dellchassis.py
def blade_idrac(idrac_password=None, idrac_ipmi=None,
                idrac_ip=None, idrac_netmask=None, idrac_gateway=None,
                idrac_dnsname=None,
                drac_dhcp=None):
    '''
    Set parameters for iDRAC in a blade.

    :param idrac_password: Password to establish for the iDRAC interface
    :param idrac_ipmi: Enable/Disable IPMI over LAN
    :param idrac_ip: Set IP address for iDRAC
    :param idrac_netmask: Set netmask for iDRAC
    :param idrac_gateway: Set gateway for iDRAC
    :param drac_dhcp: Turn on DHCP for iDRAC (True turns on, False does nothing
      becaause setting a static IP will disable DHCP).
    :return: A standard Salt changes dictionary
    '''

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

    if not idrac_password:
        password = __pillar__['proxy']['admin_password']
    else:
        password = idrac_password

    if idrac_ipmi:
        if idrac_ipmi is True:
            idrac_ipmi = '1'
        if idrac_ipmi is False:
            idrac_ipmi = '0'
        current_ipmi = __salt__['dracr.get_general']('cfgIpmiLan', 'cfgIpmiLanEnable',
                                                     host=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:
        dnsret = __salt__['dracr.get_dns_dracname'](host=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

    return ret

    Set parameters for iDRAC in a blade.

    :param idrac_password: Password to establish for the iDRAC interface
    :param idrac_ipmi: Enable/Disable IPMI over LAN
    :param idrac_ip: Set IP address for iDRAC
    :param idrac_netmask: Set netmask for iDRAC
    :param idrac_gateway: Set gateway for iDRAC
    :param drac_dhcp: Turn on DHCP for iDRAC (True turns on, False does nothing
      becaause setting a static IP will disable DHCP).
    :return: A standard Salt changes dictionary
    
Set parameters for iDRAC in a blade.
Set parameters for iDRAC in a blade .
def blade_idrac(idrac_password=None, idrac_ipmi=None,
                idrac_ip=None, idrac_netmask=None, idrac_gateway=None,
                idrac_dnsname=None,
                drac_dhcp=None):
    ret = {'result': True,
           'changes': {},
           'comment': ''}
    if not idrac_password:
        password = __pillar__['proxy']['admin_password']
    else:
        password = idrac_password
    if idrac_ipmi:
        if idrac_ipmi is True:
            idrac_ipmi = '1'
        if idrac_ipmi is False:
            idrac_ipmi = '0'
        current_ipmi = __salt__['dracr.get_general']('cfgIpmiLan', 'cfgIpmiLanEnable',
                                                     host=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:
        dnsret = __salt__['dracr.get_dns_dracname'](host=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
    return ret
def blade_idrac ( idrac_password = None , idrac_ipmi = None , idrac_ip = None , idrac_netmask = None , idrac_gateway = None , idrac_dnsname = None , drac_dhcp = None ) : ret = { 'result' : True , 'changes' : { } , 'comment' : '' } if not idrac_password : password = __pillar__ [ 'proxy' ] [ 'admin_password' ] else : password = idrac_password if idrac_ipmi : if idrac_ipmi is True : idrac_ipmi = '1' if idrac_ipmi is False : idrac_ipmi = '0' current_ipmi = __salt__ [ 'dracr.get_general' ] ( 'cfgIpmiLan' , 'cfgIpmiLanEnable' , host = 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 : dnsret = __salt__ [ 'dracr.get_dns_dracname' ] ( host = 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 return ret
Set parameters for iDRAC in a blade.
Set parameters for iDRAC in a blade .
'''
    Set parameters for iDRAC in a blade.

    :param idrac_password: Password to establish for the iDRAC interface
    :param idrac_ipmi: Enable/Disable IPMI over LAN
    :param idrac_ip: Set IP address for iDRAC
    :param idrac_netmask: Set netmask for iDRAC
    :param idrac_gateway: Set gateway for iDRAC
    :param drac_dhcp: Turn on DHCP for iDRAC (True turns on, False does nothing
      becaause setting a static IP will disable DHCP).
    :return: A standard Salt changes dictionary
    '''
A standard Salt changes dictionary
A standard Salt changes dictionary
idrac_password
Password to establish for the iDRAC interface
Password to establish for the iDRAC interface
idrac_ipmi
Enable/Disable IPMI over LAN
Enable / Disable IPMI over LAN
idrac_ip
Set IP address for iDRAC
Set IP address for iDRAC
idrac_netmask
Set netmask for iDRAC
Set netmask for iDRAC
idrac_gateway
Set gateway for iDRAC
Set gateway for iDRAC
idrac_dnsname
drac_dhcp
Turn on DHCP for iDRAC (True turns on, False does nothing
becaause setting a static IP will disable DHCP).
Turn on DHCP for iDRAC ( True turns on False does nothing becaause setting a static IP will disable DHCP ) .