Restoring The Poap Personality; Poap Personality Sample Script - Cisco Nexus 9000 Series Configuration Manual

Nx-os fundamentals configuration guide
Hide thumbs Also See for Nexus 9000 Series:
Table of Contents

Advertisement

Restoring the POAP Personality

Restoring the POAP Personality
During the POAP script execution phase, the personality module in the script restores the POAP personality,
provided that the currently booted switch image is Cisco NX-OS Release 7.0(3)I4(1) or later. If necessary,
upgrade the switch to the correct software image.
A personality restore is done with the same software image used for the personality backup. Upgrading
Note
to a newer image is not supported through the POAP personality feature. To upgrade to a newer image,
use the regular POAP script.
If the personality script fails to execute for any reason (such as not enough space in the bootflash or a
Note
script execution failure), the POAP process returns to the DHCP discovery phase.
The restore process performs the following actions:
1 Untars and unzips the personality file in the bootflash.
2 Validates the personality file.
3 Reads the configuration and package list files from the personality file to make a list of the binaries to be
downloaded.
4 If the current image or patches are not the same as specified in the personality file, downloads the binaries
to the bootflash (if not present) and reboots with the correct image and then applies the packages or patches.
5 Unzips or untars the user data files relative to "/".
6 Copies the configuration file in the POAP personality to the startup configuration.
7 Reboots the switch.

POAP Personality Sample Script

The following sample POAP script (poap.py) includes the personality feature:
#md5sum="b00a7fffb305d13a1e02cd0d342afca3"
# The above is the (embedded) md5sum of this file taken without this line, # can be # created
this way:
# f=poap.py ; cat $f | sed '/^#md5sum/d' > $f.md5 ; sed -i "s/^#md5sum=.*/#md5sum=$(md5sum
$f.md5 | sed 's/ .*//')/" $f # This way this script's integrity can be checked in case you
do not trust # tftp's ip checksum. This integrity check is done by /isan/bin/poap.bin).
# The integrity of the files downloaded later (images, config) is checked # by downloading
the corresponding file with the .md5 extension and is # done by this script itself.
from poap.personality import POAPPersonality import os
# Location to download system image files, checksums, etc.
download_path = "/var/lib/tftpboot"
# The path to the personality tarball used for restoration personality_tarball =
"/var/lib/tftpboot/foo.tar"
# The protocol to use to download images/config protocol = "scp"
# The username to download images, the personality tarball, and the # patches and RPMs
during restoration username = "root"
# The password for the above username
password = "passwd754"
Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x
40
Using PowerOn Auto Provisioning

Advertisement

Table of Contents
loading

Table of Contents