salt.proxy.cimc

Proxy Minion interface module for managing Cisco Integrated Management Controller devices

New in version 2018.3.0.

codeauthor:

Spencer Ervin <spencer_ervin@hotmail.com>

maturity:

new

depends:

none

platform:

unix

This proxy minion enables Cisco Integrated Management Controller devices (hereafter referred to as simply 'cimc' devices to be treated individually like a Salt Minion.

The cimc proxy leverages the XML API functionality on the Cisco Integrated Management Controller. The Salt proxy must have access to the cimc on HTTPS (tcp/443).

More in-depth conceptual reading on Proxy Minions can be found in the Proxy Minion section of Salt's documentation.

Configuration

To use this integration proxy module, please configure the following:

Pillar

Proxy minions get their configuration from Salt's Pillar. Every proxy must have a stanza in Pillar and a reference in the Pillar top-file that matches the ID.

proxy:
  proxytype: cimc
  host: <ip or dns name of cimc host>
  username: <cimc username>
  password: <cimc password>
  verify_ssl: True

proxytype

The proxytype key and value pair is critical, as it tells Salt which interface to load from the proxy directory in Salt's install hierarchy, or from /srv/salt/_proxy on the Salt Master (if you have created your own proxy module, for example). To use this cimc Proxy Module, set this to cimc.

host

The location, or ip/dns, of the cimc host. Required.

username

The username used to login to the cimc host. Required.

password

The password used to login to the cimc host. Required.

salt.proxy.cimc.get_config_resolver_class(cid=None, hierarchical=False)

The configResolveClass method returns requested managed object in a given class.

salt.proxy.cimc.grains()

Get the grains from the proxied device

salt.proxy.cimc.grains_refresh()

Refresh the grains from the proxied device

salt.proxy.cimc.init(opts)

This function gets called when the proxy starts up.

salt.proxy.cimc.initialized()

Since grains are loaded in many different places and some of those places occur before the proxy can be initialized, return whether our init() function has been called

salt.proxy.cimc.logon()

Logs into the cimc device and returns the session cookie.

salt.proxy.cimc.logout(cookie=None)

Closes the session with the device.

salt.proxy.cimc.ping()

Returns true if the device is reachable, else false.

salt.proxy.cimc.prepare_return(x)

Converts the etree to dict

salt.proxy.cimc.set_config_modify(dn=None, inconfig=None, hierarchical=False)

The configConfMo method configures the specified managed object in a single subtree (for example, DN).

salt.proxy.cimc.shutdown()

Shutdown the connection to the proxy device. For this proxy, shutdown is a no-op.