From f6f78606e24b9c6eea62ad3f3f8d0c78315479f6 Mon Sep 17 00:00:00 2001 From: Allen Robel Date: Fri, 22 Dec 2023 08:10:49 -1000 Subject: [PATCH] Add docs for dcnm_image_uupgrade --- README.md | 1 + docs/cisco.dcnm.dcnm_image_upgrade_module.rst | 1053 +++++++++++++++++ 2 files changed, 1054 insertions(+) create mode 100644 docs/cisco.dcnm.dcnm_image_upgrade_module.rst diff --git a/README.md b/README.md index 8f94dcbfd..e5837625f 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,7 @@ Name | Description ### Modules Name | Description --- | --- +[cisco.dcnm.dcnm_image_upgrade](https://github.com/CiscoDevNet/ansible-dcnm/blob/main/docs/cisco.dcnm.dcnm_image_upgrade_module.rst)|Image management for Nexus switches [cisco.dcnm.dcnm_interface](https://github.com/CiscoDevNet/ansible-dcnm/blob/main/docs/cisco.dcnm.dcnm_interface_module.rst)|DCNM Ansible Module for managing interfaces. [cisco.dcnm.dcnm_inventory](https://github.com/CiscoDevNet/ansible-dcnm/blob/main/docs/cisco.dcnm.dcnm_inventory_module.rst)|Add and remove Switches from a DCNM managed VXLAN fabric. [cisco.dcnm.dcnm_links](https://github.com/CiscoDevNet/ansible-dcnm/blob/main/docs/cisco.dcnm.dcnm_links_module.rst)|DCNM ansible module for managing Links. diff --git a/docs/cisco.dcnm.dcnm_image_upgrade_module.rst b/docs/cisco.dcnm.dcnm_image_upgrade_module.rst new file mode 100644 index 000000000..4055f1b60 --- /dev/null +++ b/docs/cisco.dcnm.dcnm_image_upgrade_module.rst @@ -0,0 +1,1053 @@ +.. _cisco.dcnm.dcnm_image_upgrade_module: + + +***************************** +cisco.dcnm.dcnm_image_upgrade +***************************** + +**Image management for Nexus switches** + + +Version added: 0.9.0 + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- +- Stage, validate, upgrade images. +- Attach, detach, image policies. +- Query device issu details. + + + + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ config + +
+ dictionary + / required +
+
+ +
A dictionary containing the image policy configuration.
+
+
+ options + +
+ dictionary +
+
+ +
A dictionary containing options for each of the upgrade types
+
+
+ epld + +
+ dictionary +
+
+ +
A dictionary containing epld upgrade options
+
+
+ golden + +
+ boolean +
+
+
    Choices: +
  • no ←
  • +
  • yes
  • +
+
+
Enable (True) or disable (False) reverting to the golden EPLD image
+
+
+ module + +
+ string +
+
+ Default:
"ALL"
+
+
The switch module to upgrade
+
Choose between ALL, or integer values
+
+
+ nxos + +
+ dictionary +
+
+ +
A dictionary containing nxos upgrade options
+
+
+ bios_force + +
+ boolean +
+
+
    Choices: +
  • no ←
  • +
  • yes
  • +
+
+
Force BIOS upgrade
+
+
+ mode + +
+ string +
+
+ Default:
"distruptive"
+
+
nxos upgrade mode
+
Choose between distruptive, non_disruptive, force_non_disruptive
+
+
+ package + +
+ dictionary +
+
+ +
A dictionary containing package upgrade options
+
+
+ install + +
+ boolean +
+
+
    Choices: +
  • no ←
  • +
  • yes
  • +
+
+
Install the package
+
+
+ uninstall + +
+ boolean +
+
+
    Choices: +
  • no ←
  • +
  • yes
  • +
+
+
Uninstall the package
+
+
+ reboot + +
+ dictionary +
+
+ +
A dictionary containing reboot options
+
+
+ config_reload + +
+ boolean +
+
+
    Choices: +
  • no ←
  • +
  • yes
  • +
+
+
Reload the configuration
+
+
+ write_erase + +
+ boolean +
+
+
    Choices: +
  • no ←
  • +
  • yes
  • +
+
+
Erase the startup configuration
+
+
+ policy + +
+ string + / required +
+
+ +
Image policy name
+
+
+ reboot + +
+ boolean +
+
+
    Choices: +
  • no ←
  • +
  • yes
  • +
+
+
Reboot the switch after upgrade
+
+
+ stage + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes ←
  • +
+
+
Stage (True) or unstage (False) an image policy
+
+
+ switches + +
+ list + / elements=dictionary + / required +
+
+ +
A list of devices to attach the image policy to.
+
+
+ ip_address + +
+ string + / required +
+
+ +
The IP address of the device to which the policy will be attached.
+
+
+ options + +
+ dictionary +
+
+ +
A dictionary containing options for each of the upgrade types
+
+
+ epld + +
+ dictionary +
+
+ +
A dictionary containing epld upgrade options
+
+
+ golden + +
+ boolean +
+
+
    Choices: +
  • no ←
  • +
  • yes
  • +
+
+
Enable (True) or disable (False) reverting to the golden EPLD image
+
+
+ module + +
+ string +
+
+ Default:
"ALL"
+
+
The switch module to upgrade
+
Choose between ALL, or integer values
+
+
+ nxos + +
+ dictionary +
+
+ +
A dictionary containing nxos upgrade options
+
+
+ bios_force + +
+ boolean +
+
+
    Choices: +
  • no ←
  • +
  • yes
  • +
+
+
Force BIOS upgrade
+
+
+ mode + +
+ string +
+
+ Default:
"distruptive"
+
+
nxos upgrade mode
+
Choose between distruptive, non_disruptive, force_non_disruptive
+
+
+ package + +
+ dictionary +
+
+ +
A dictionary containing package upgrade options
+
+
+ install + +
+ boolean +
+
+
    Choices: +
  • no ←
  • +
  • yes
  • +
+
+
Install the package
+
+
+ uninstall + +
+ boolean +
+
+
    Choices: +
  • no ←
  • +
  • yes
  • +
+
+
Uninstall the package
+
+
+ reboot + +
+ dictionary +
+
+ +
A dictionary containing reboot options
+
+
+ config_reload + +
+ boolean +
+
+
    Choices: +
  • no ←
  • +
  • yes
  • +
+
+
Reload the configuration
+
+
+ write_erase + +
+ boolean +
+
+
    Choices: +
  • no ←
  • +
  • yes
  • +
+
+
Erase the startup configuration
+
+
+ policy + +
+ string + / required +
+
+ +
Image policy name
+
+
+ reboot + +
+ boolean +
+
+
    Choices: +
  • no ←
  • +
  • yes
  • +
+
+
Reboot the switch after upgrade
+
+
+ stage + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes ←
  • +
+
+
Stage (True) or unstage (False) an image policy
+
+
+ upgrade + +
+ dictionary +
+
+ +
A dictionary containing upgrade toggles for nxos and epld
+
+
+ epld + +
+ boolean +
+
+
    Choices: +
  • no ←
  • +
  • yes
  • +
+
+
Enable (True) or disable (False) EPLD upgrade
+
If upgrade.nxos is false, epld and packages cannot both be true
+
If epld is true, nxos_option must be disruptive
+
+
+ nxos + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes ←
  • +
+
+
Enable (True) or disable (False) image upgrade
+
+
+ validate + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes ←
  • +
+
+
Validate (True) or do not validate (False) the image
+
after staging
+
+
+ upgrade + +
+ dictionary +
+
+ +
A dictionary containing upgrade toggles for nxos and epld
+
+
+ epld + +
+ boolean +
+
+
    Choices: +
  • no ←
  • +
  • yes
  • +
+
+
Enable (True) or disable (False) EPLD upgrade
+
If upgrade.nxos is false, epld and packages cannot both be true
+
If epld is true, nxos_option must be disruptive
+
+
+ nxos + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes ←
  • +
+
+
Enable (True) or disable (False) image upgrade
+
+
+ validate + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes ←
  • +
+
+
Validate (True) or do not validate (False) the image
+
after staging
+
+
+ state + +
+ string +
+
+
    Choices: +
  • merged ←
  • +
  • deleted
  • +
  • query
  • +
+
+
The state of the feature or object after module completion.
+
merged, deleted, and query states are supported.
+
+
+ + + + +Examples +-------- + +.. code-block:: yaml + + # This module supports the following states: + # + # merged: + # Attach image policy to one or more devices. + # Stage image on one or more devices. + # Validate image on one or more devices. + # Upgrade image on one or more devices. + # + # query: + # Return ISSU details for one or more devices. + # + # deleted: + # Delete image policy from one or more devices + # + + # Attach image policy NR3F to two devices + # Stage and validate the image on two devices but do not upgrade + - name: stage/validate images + cisco.dcnm.dcnm_image_upgrade: + state: merged + config: + policy: NR3F + stage: true + validate: true + upgrade: + nxos: false + epld: false + switches: + - ip_address: 192.168.1.1 + - ip_address: 192.168.1.2 + + # Attach image policy NR1F to device 192.168.1.1 + # Attach image policy NR2F to device 192.168.1.2 + # Stage the image on device 192.168.1.1, but do not upgrade + # Stage the image and upgrade device 192.168.1.2 + - name: stage/upgrade devices + cisco.dcnm.dcnm_image_upgrade: + state: merged + config: + validate: false + stage: false + upgrade: + nxos: false + epld: false + options: + nxos: + type: disruptive + epld: + module: ALL + golden: false + switches: + - ip_address: 192.168.1.1 + policy: NR1F + stage: true + validate: true + upgrade: + nxos: true + epld: false + - ip_address: 192.168.1.2 + policy: NR2F + stage: true + validate: true + upgrade: + nxos: true + epld: true + options: + nxos: + type: disruptive + epld: + module: ALL + golden: false + + # Detach image policy NR3F from two devices + - name: stage/upgrade devices + cisco.dcnm.dcnm_image_upgrade: + state: deleted + config: + policy: NR3F + switches: + - ip_address: 192.168.1.1 + - ip_address: 192.168.1.2 + + # Query ISSU details for three devices + - name: query switch ISSU status + cisco.dcnm.dcnm_image_upgrade: + state: query + config: + policy: KMR5 + switches: + - ip_address: 192.168.1.1 + policy: OR1F + - ip_address: 192.168.1.2 + policy: NR2F + - ip_address: 192.168.1.3 # will query policy KMR5 + register: result + - name: print result + ansible.builtin.debug: + var: result + + + + +Status +------ + + +Authors +~~~~~~~ + +- Allen Robel (@quantumonion)