Manage Dell DRAC.
2015.8.2 新版功能.
salt.modules.dracr.
bare_rac_cmd
(cmd, host=None, admin_username=None, admin_password=None)¶salt.modules.dracr.
change_password
(username, password, uid=None, host=None, admin_username=None, admin_password=None, module=None)¶Change user's password
CLI Example:
salt dell dracr.change_password [USERNAME] [PASSWORD] uid=[OPTIONAL]
host=<remote DRAC> admin_username=<DRAC user>
admin_password=<DRAC PW>
salt dell dracr.change_password diana secret
Note that if only a username is specified then this module will look up details for all 16 possible DRAC users. This is time consuming, but might be necessary if one is not sure which user slot contains the one you want. Many late-model Dell chassis have 'root' as UID 1, so if you can depend on that then setting the password is much quicker. Raises an error if the supplied password is greater than 20 chars.
salt.modules.dracr.
create_user
(username, password, permissions, users=None, host=None, admin_username=None, admin_password=None)¶Create user accounts
CLI Example:
salt dell dracr.create_user [USERNAME] [PASSWORD] [PRIVELEGES]
salt dell dracr.create_user diana secret login,test_alerts,clear_logs
salt.modules.dracr.
delete_user
(username, uid=None, host=None, admin_username=None, admin_password=None)¶Delete a user
CLI Example:
salt dell dracr.delete_user [USERNAME] [UID - optional]
salt dell dracr.delete_user diana 4
salt.modules.dracr.
deploy_password
(username, password, host=None, admin_username=None, admin_password=None, module=None)¶Change the QuickDeploy password, used for switches as well
CLI Example:
salt dell dracr.deploy_password [USERNAME] [PASSWORD]
host=<remote DRAC> admin_username=<DRAC user>
admin_password=<DRAC PW>
salt dell dracr.change_password diana secret
Note that if only a username is specified then this module will look up details for all 16 possible DRAC users. This is time consuming, but might be necessary if one is not sure which user slot contains the one you want. Many late-model Dell chassis have 'root' as UID 1, so if you can depend on that then setting the password is much quicker.
salt.modules.dracr.
deploy_snmp
(snmp, host=None, admin_username=None, admin_password=None, module=None)¶Change the QuickDeploy SNMP community string, used for switches as well
CLI Example:
salt dell dracr.deploy_snmp SNMP_STRING
host=<remote DRAC or CMC> admin_username=<DRAC user>
admin_password=<DRAC PW>
salt dell dracr.deploy_password diana secret
salt.modules.dracr.
email_alerts
(action, host=None, admin_username=None, admin_password=None)¶Enable/Disable email alerts
CLI Example:
salt dell dracr.email_alerts True
salt dell dracr.email_alerts False
salt.modules.dracr.
get_chassis_datacenter
(host=None, admin_username=None, admin_password=None)¶Get the datacenter of the chassis.
CLI Example:
salt '*' dracr.set_chassis_location host=111.222.333.444
admin_username=root admin_password=secret
salt.modules.dracr.
get_chassis_location
(host=None, admin_username=None, admin_password=None)¶Get the location of the chassis.
CLI Example:
salt '*' dracr.set_chassis_location host=111.222.333.444
admin_username=root admin_password=secret
salt.modules.dracr.
get_chassis_name
(host=None, admin_username=None, admin_password=None)¶Get the name of a chassis.
CLI Example:
salt '*' dracr.get_chassis_name host=111.222.333.444
admin_username=root admin_password=secret
salt.modules.dracr.
get_dns_dracname
(host=None, admin_username=None, admin_password=None)¶salt.modules.dracr.
get_general
(cfg_sec, cfg_var, host=None, admin_username=None, admin_password=None)¶salt.modules.dracr.
get_slotname
(slot, host=None, admin_username=None, admin_password=None)¶Get the name of a slot number in the chassis.
CLI Example:
salt-call --local dracr.get_slotname 0 host=111.222.333.444
admin_username=root admin_password=secret
salt.modules.dracr.
idrac_general
(blade_name, command, idrac_password=None, host=None, admin_username=None, admin_password=None)¶Run a generic racadm command against a particular blade in a chassis. Blades are usually named things like 'server-1', 'server-2', etc. If the iDRAC has a different password than the CMC, then you can pass it with the idrac_password kwarg.
参数: |
|
---|---|
返回: | stdout if the retcode is 0, otherwise a standard cmd.run_all dictionary |
CLI Example:
salt fx2 chassis.cmd idrac_general server-1 'get BIOS.SysProfileSettings'
salt.modules.dracr.
inventory
(host=None, admin_username=None, admin_password=None)¶salt.modules.dracr.
list_slotnames
(host=None, admin_username=None, admin_password=None)¶List the names of all slots in the chassis.
CLI Example:
salt-call --local dracr.list_slotnames host=111.222.333.444
admin_username=root admin_password=secret
salt.modules.dracr.
list_users
(host=None, admin_username=None, admin_password=None, module=None)¶List all DRAC users
CLI Example:
salt dell dracr.list_users
salt.modules.dracr.
nameservers
(ns, host=None, admin_username=None, admin_password=None, module=None)¶Configure the nameservers on the DRAC
CLI Example:
salt dell dracr.nameservers [NAMESERVERS]
salt dell dracr.nameservers ns1.example.com ns2.example.com
admin_username=root admin_password=calvin module=server-1
host=192.168.1.1
salt.modules.dracr.
network_info
(host=None, admin_username=None, admin_password=None, module=None)¶Return Network Configuration
CLI Example:
salt dell dracr.network_info
salt.modules.dracr.
server_hardreset
(host=None, admin_username=None, admin_password=None, module=None)¶Performs a reset (reboot) operation on the managed server.
CLI Example:
salt dell dracr.server_hardreset
salt dell dracr.server_hardreset module=server-1
salt.modules.dracr.
server_power
(status, host=None, admin_username=None, admin_password=None, module=None)¶CLI Example:
salt dell dracr.server_reboot
salt dell dracr.server_reboot module=server-1
salt.modules.dracr.
server_poweroff
(host=None, admin_username=None, admin_password=None, module=None)¶Powers down the managed server.
CLI Example:
salt dell dracr.server_poweroff
salt dell dracr.server_poweroff module=server-1
salt.modules.dracr.
server_poweron
(host=None, admin_username=None, admin_password=None, module=None)¶Powers up the managed server.
CLI Example:
salt dell dracr.server_poweron
salt dell dracr.server_poweron module=server-1
salt.modules.dracr.
server_powerstatus
(host=None, admin_username=None, admin_password=None, module=None)¶return the power status for the passed module
CLI Example:
salt dell drac.server_powerstatus
salt.modules.dracr.
server_pxe
(host=None, admin_username=None, admin_password=None)¶Configure server to PXE perform a one off PXE boot
CLI Example:
salt dell dracr.server_pxe
salt.modules.dracr.
server_reboot
(host=None, admin_username=None, admin_password=None, module=None)¶Issues a power-cycle operation on the managed server. This action is similar to pressing the power button on the system's front panel to power down and then power up the system.
CLI Example:
salt dell dracr.server_reboot
salt dell dracr.server_reboot module=server-1
salt.modules.dracr.
set_chassis_datacenter
(location, host=None, admin_username=None, admin_password=None)¶Set the location of the chassis.
CLI Example:
salt '*' dracr.set_chassis_datacenter datacenter-name host=111.222.333.444
admin_username=root admin_password=secret
salt.modules.dracr.
set_chassis_location
(location, host=None, admin_username=None, admin_password=None)¶Set the location of the chassis.
CLI Example:
salt '*' dracr.set_chassis_location location-name host=111.222.333.444
admin_username=root admin_password=secret
salt.modules.dracr.
set_chassis_name
(name, host=None, admin_username=None, admin_password=None)¶Set the name of the chassis.
CLI Example:
salt '*' dracr.set_chassis_name my-chassis host=111.222.333.444
admin_username=root admin_password=secret
salt.modules.dracr.
set_dns_dracname
(name, host=None, admin_username=None, admin_password=None)¶salt.modules.dracr.
set_general
(cfg_sec, cfg_var, val, host=None, admin_username=None, admin_password=None)¶salt.modules.dracr.
set_network
(ip, netmask, gateway, host=None, admin_username=None, admin_password=None)¶Configure Network on the CMC or individual iDRAC.
Use set_niccfg
for blade and switch addresses.
CLI Example:
salt dell dracr.set_network [DRAC IP] [NETMASK] [GATEWAY]
salt dell dracr.set_network 192.168.0.2 255.255.255.0 192.168.0.1
admin_username=root admin_password=calvin host=192.168.1.1
salt.modules.dracr.
set_niccfg
(ip=None, netmask=None, gateway=None, dhcp=False, host=None, admin_username=None, admin_password=None, module=None)¶salt.modules.dracr.
set_nicvlan
(vlan=None, host=None, admin_username=None, admin_password=None, module=None)¶salt.modules.dracr.
set_permissions
(username, permissions, uid=None, host=None, admin_username=None, admin_password=None)¶Configure users permissions
CLI Example:
salt dell dracr.set_permissions [USERNAME] [PRIVELEGES]
[USER INDEX - optional]
salt dell dracr.set_permissions diana login,test_alerts,clear_logs 4
salt.modules.dracr.
set_slotname
(slot, name, host=None, admin_username=None, admin_password=None)¶Set the name of a slot in a chassis.
CLI Example:
salt '*' dracr.set_slotname 2 my-slotname host=111.222.333.444
admin_username=root admin_password=secret
salt.modules.dracr.
set_snmp
(community, host=None, admin_username=None, admin_password=None)¶Configure CMC or individual iDRAC SNMP community string.
Use deploy_snmp
for configuring chassis switch SNMP.
CLI Example:
salt dell dracr.set_snmp [COMMUNITY]
salt dell dracr.set_snmp public
salt.modules.dracr.
syslog
(server, enable=True, host=None, admin_username=None, admin_password=None, module=None)¶Configure syslog remote logging, by default syslog will automatically be enabled if a server is specified. However, if you want to disable syslog you will need to specify a server followed by False
CLI Example:
salt dell dracr.syslog [SYSLOG IP] [ENABLE/DISABLE]
salt dell dracr.syslog 0.0.0.0 False
salt.modules.dracr.
system_info
(host=None, admin_username=None, admin_password=None, module=None)¶Return System information
CLI Example:
salt dell dracr.system_info
salt.modules.dracr.
update_firmware
(filename, host=None, admin_username=None, admin_password=None)¶Updates firmware using local firmware file
salt dell dracr.update_firmware firmware.exe
This executes the following command on your FX2 (using username and password stored in the pillar data)
racadm update –f firmware.exe -u user –p pass
salt.modules.dracr.
update_firmware_nfs_or_cifs
(filename, share, host=None, admin_username=None, admin_password=None)¶Executes the following for CIFS (using username and password stored in the pillar data)
racadm update -f <updatefile> -u user –p pass -l //IP-Address/share
Or for NFS (using username and password stored in the pillar data)
racadm update -f <updatefile> -u user –p pass -l IP-address:/share
Salt command for CIFS:
salt dell dracr.update_firmware_nfs_or_cifs firmware.exe //IP-Address/share
Salt command for NFS:
salt dell dracr.update_firmware_nfs_or_cifs firmware.exe IP-address:/share