salt.modules.nxos_upgrade

Execution module to upgrade Cisco NX-OS Switches.

New in version 3001.

This module supports execution using a Proxy Minion or Native Minion:
  1. Proxy Minion: Connect over SSH or NX-API HTTP(S). See salt.proxy.nxos for proxy minion setup details.

  2. Native Minion: Connect over NX-API Unix Domain Socket (UDS). Install the minion inside the GuestShell running on the NX-OS device.

maturity:

new

platform:

nxos

codeauthor:

Michael G Wiebe

Note

To use this module over remote NX-API the feature must be enabled on the NX-OS device by executing feature nxapi in configuration mode.

This is not required for NX-API over UDS.

Configuration example:

switch# conf t
switch(config)# feature nxapi

To check that NX-API is properly enabled, execute show nxapi.

Output example:

switch# show nxapi
nxapi enabled
HTTPS Listen on port 443
salt.modules.nxos_upgrade.check_upgrade_impact(system_image, kickstart_image=None, issu=True, **kwargs)

Display upgrade impact information without actually upgrading the device.

system_image (Mandatory Option)

Path on bootflash: to system image upgrade file.

kickstart_image

Path on bootflash: to kickstart image upgrade file. (Not required if using combined system/kickstart image file) Default: None

issu

In Service Software Upgrade (non-disruptive). When True, the upgrade will abort if issu is not possible. When False: Force (disruptive) Upgrade/Downgrade. Default: True

timeout

Timeout in seconds for long running 'install all' impact command. Default: 900

error_pattern

Use the option to pass in a regular expression to search for in the output of the 'install all impact' command that indicates an error has occurred. This option is only used when proxy minion connection type is ssh and otherwise ignored.

salt 'n9k' nxos.check_upgrade_impact system_image=nxos.9.2.1.bin
salt 'n7k' nxos.check_upgrade_impact system_image=n7000-s2-dk9.8.1.1.bin \
    kickstart_image=n7000-s2-kickstart.8.1.1.bin issu=False
salt.modules.nxos_upgrade.upgrade(system_image, kickstart_image=None, issu=True, **kwargs)

Upgrade NX-OS switch.

system_image (Mandatory Option)

Path on bootflash: to system image upgrade file.

kickstart_image

Path on bootflash: to kickstart image upgrade file. (Not required if using combined system/kickstart image file) Default: None

issu

Set this option to True when an In Service Software Upgrade or non-disruptive upgrade is required. The upgrade will abort if issu is not possible. Default: True

timeout

Timeout in seconds for long running 'install all' upgrade command. Default: 900

error_pattern

Use the option to pass in a regular expression to search for in the output of the 'install all upgrade command that indicates an error has occurred. This option is only used when proxy minion connection type is ssh and otherwise ignored.

salt 'n9k' nxos.upgrade system_image=nxos.9.2.1.bin
salt 'n7k' nxos.upgrade system_image=n7000-s2-dk9.8.1.1.bin \
    kickstart_image=n7000-s2-kickstart.8.1.1.bin issu=False