Module to provide Cisco UCS compatibility to Salt
Spencer Ervin <spencer_ervin@hotmail.com>
new
none
unix
This module accepts connection configuration details either as parameters, or as configuration settings in pillar as a Salt proxy. Options passed into opts will be ignored if options are passed into pillar.
See also
This execution module was designed to handle connections to a Cisco UCS server. This module adds support to send connections directly to the device through the rest API.
salt.modules.cimc.
activate_backup_image
(reset=False)¶Activates the firmware backup image.
CLI Example:
reset (bool) -- Reset the CIMC device on activate.
salt '*' cimc.activate_backup_image
salt '*' cimc.activate_backup_image reset=True
salt.modules.cimc.
create_user
(uid=None, username=None, password=None, priv=None)¶Create a CIMC user with username and password.
CLI Example:
salt '*' cimc.create_user 11 username=admin password=foobar priv=admin
salt.modules.cimc.
get_bios_defaults
()¶Get the default values of BIOS tokens.
CLI Example:
salt '*' cimc.get_bios_defaults
salt.modules.cimc.
get_bios_settings
()¶Get the C240 server BIOS token values.
CLI Example:
salt '*' cimc.get_bios_settings
salt.modules.cimc.
get_boot_order
()¶Retrieves the configured boot order table.
CLI Example:
salt '*' cimc.get_boot_order
salt.modules.cimc.
get_cpu_details
()¶Get the CPU product ID details.
CLI Example:
salt '*' cimc.get_cpu_details
salt.modules.cimc.
get_disks
()¶Get the HDD product ID details.
CLI Example:
salt '*' cimc.get_disks
salt.modules.cimc.
get_ethernet_interfaces
()¶Get the adapter Ethernet interface details.
CLI Example:
salt '*' cimc.get_ethernet_interfaces
salt.modules.cimc.
get_fibre_channel_interfaces
()¶Get the adapter fibre channel interface details.
CLI Example:
salt '*' cimc.get_fibre_channel_interfaces
salt.modules.cimc.
get_firmware
()¶Retrieves the current running firmware versions of server components.
CLI Example:
salt '*' cimc.get_firmware
salt.modules.cimc.
get_hostname
()¶Retrieves the hostname from the device.
New in version 2019.2.0.
CLI Example:
salt '*' cimc.get_hostname
salt.modules.cimc.
get_ldap
()¶Retrieves LDAP server details.
CLI Example:
salt '*' cimc.get_ldap
salt.modules.cimc.
get_management_interface
()¶Retrieve the management interface details.
CLI Example:
salt '*' cimc.get_management_interface
salt.modules.cimc.
get_memory_token
()¶Get the memory RAS BIOS token.
CLI Example:
salt '*' cimc.get_memory_token
salt.modules.cimc.
get_memory_unit
()¶Get the IMM/Memory unit product ID details.
CLI Example:
salt '*' cimc.get_memory_unit
salt.modules.cimc.
get_network_adapters
()¶Get the list of network adapaters and configuration details.
CLI Example:
salt '*' cimc.get_network_adapters
salt.modules.cimc.
get_ntp
()¶Retrieves the current running NTP configuration.
CLI Example:
salt '*' cimc.get_ntp
salt.modules.cimc.
get_pci_adapters
()¶Get the PCI adapter product ID details.
CLI Example:
salt '*' cimc.get_disks
salt.modules.cimc.
get_power_configuration
()¶Get the configuration of the power settings from the device. This is only available on some C-Series servers.
New in version 2019.2.0.
CLI Example:
salt '*' cimc.get_power_configuration
salt.modules.cimc.
get_power_supplies
()¶Retrieves the power supply unit details.
CLI Example:
salt '*' cimc.get_power_supplies
salt.modules.cimc.
get_snmp_config
()¶Get the snmp configuration details.
CLI Example:
salt '*' cimc.get_snmp_config
salt.modules.cimc.
get_syslog
()¶Get the Syslog client-server details.
CLI Example:
salt '*' cimc.get_syslog
salt.modules.cimc.
get_syslog_settings
()¶Get the Syslog configuration settings from the system.
New in version 2019.2.0.
CLI Example:
salt '*' cimc.get_syslog_settings
salt.modules.cimc.
get_system_info
()¶Get the system information.
CLI Example:
salt '*' cimc.get_system_info
salt.modules.cimc.
get_users
()¶Get the CIMC users.
CLI Example:
salt '*' cimc.get_users
salt.modules.cimc.
get_vic_adapters
()¶Get the VIC adapter general profile details.
CLI Example:
salt '*' cimc.get_vic_adapters
salt.modules.cimc.
get_vic_uplinks
()¶Get the VIC adapter uplink port details.
CLI Example:
salt '*' cimc.get_vic_uplinks
Mounts a remote file through a remote share. Currently, this feature is supported in version 1.5 or greater. The remote share can be either NFS, CIFS, or WWW.
Communication between mounted media and target stays local (inside datacenter) Media mounts can be scripted/automated No vKVM requirements for media connection Multiple share types supported Connections supported through all CIMC interfaces
Note: CIMC Mounted vMedia is enabled through BIOS configuration.
name (str) -- The name of the volume on the CIMC device.
remote_share (str) -- The file share link that will be used to mount the share. This can be NFS, CIFS, or WWW. This
be the directory path and not the full path to the remote file. (must) --
remote_file (str) -- The name of the remote file to mount. It must reside within remote_share.
mount_type (str) -- The type of share to mount. Valid options are nfs, cifs, and www.
username (str) -- An optional requirement to pass credentials to the remote share. If not provided, an
connection attempt will be made. (unauthenticated) --
password (str) -- An optional requirement to pass a password to the remote share. If not provided, an
connection attempt will be made. --
CLI Example:
salt '*' cimc.mount_share name=WIN7 remote_share=10.xxx.27.xxx:/nfs remote_file=sl1huu.iso
salt '*' cimc.mount_share name=WIN7 remote_share=10.xxx.27.xxx:/nfs remote_file=sl1huu.iso username=bob password=badpassword
salt.modules.cimc.
reboot
()¶Power cycling the server.
CLI Example:
salt '*' cimc.reboot
salt.modules.cimc.
set_hostname
(hostname=None)¶Sets the hostname on the server.
New in version 2019.2.0.
hostname (str) -- The new hostname to set.
CLI Example:
salt '*' cimc.set_hostname foobar
salt.modules.cimc.
set_logging_levels
(remote=None, local=None)¶Sets the logging levels of the CIMC devices. The logging levels must match the following options: emergency, alert, critical, error, warning, notice, informational, debug.
New in version 2019.2.0.
CLI Example:
salt '*' cimc.set_logging_levels remote=error local=notice
salt.modules.cimc.
set_ntp_server
(server1='', server2='', server3='', server4='')¶Sets the NTP servers configuration. This will also enable the client NTP service.
CLI Example:
salt '*' cimc.set_ntp_server 10.10.10.1
salt '*' cimc.set_ntp_server 10.10.10.1 foo.bar.com
salt.modules.cimc.
set_power_configuration
(policy=None, delayType=None, delayValue=None)¶Sets the power configuration on the device. This is only available for some C-Series servers.
New in version 2019.2.0.
policy (str) -- The action to be taken when chassis power is restored after
unexpected power loss. This can be one of the following (an) --
reset: The server is allowed to boot up normally when power is restored. The server can restart immediately or, optionally, after a fixed or random delay.
stay-off: The server remains off until it is manually restarted.
last-state: The server restarts and the system attempts to restore any processes that were running before power was lost.
delayType (str) -- If the selected policy is reset, the restart can be
with this option. This can be one of the following (delayed) --
fixed: The server restarts after a fixed delay.
random: The server restarts after a random delay.
delayValue (int) -- If a fixed delay is selected, once chassis power is
and the Cisco IMC has finished rebooting, the system waits for (restored) --
specified number of seconds before restarting the server. Enter an (the) --
between 0 and 240. (integer) --
CLI Example:
salt '*' cimc.set_power_configuration stay-off
salt '*' cimc.set_power_configuration reset fixed 0
salt.modules.cimc.
set_syslog_server
(server=None, type='primary')¶Set the SYSLOG server on the host.
CLI Example:
salt '*' cimc.set_syslog_server foo.bar.com
salt '*' cimc.set_syslog_server foo.bar.com primary
salt '*' cimc.set_syslog_server foo.bar.com secondary
salt.modules.cimc.
set_user
(uid=None, username=None, password=None, priv=None, status=None)¶Sets a CIMC user with specified configurations.
New in version 2019.2.0.
CLI Example:
salt '*' cimc.set_user 11 username=admin password=foobar priv=admin active
salt.modules.cimc.
tftp_update_bios
(server=None, path=None)¶Update the BIOS firmware through TFTP.
CLI Example:
salt '*' cimc.tftp_update_bios foo.bar.com HP-SL2.cap
salt.modules.cimc.
tftp_update_cimc
(server=None, path=None)¶Update the CIMC firmware through TFTP.
CLI Example:
salt '*' cimc.tftp_update_cimc foo.bar.com HP-SL2.bin