Comware 7 autodeploy supports Python scripts

I recently discovered that the Comware auto-configuration feature also supports Python scripts. In the traditional auto configuration setup, a TFTP server and TFTP boot filename are used to deploy a (basic initial) configuration to the network devices.

This configuration boot file had to be a classic configuration file, as it would exist on the normal CLI.

With Comware 7 devices, an administrator can also make a Python script and save this script on a Web server. Using the DHCP boot file option (same as for the TFTP boot file), the administrator can point to the URL of the script file.

On a Linux dhcp server, this example configures a DHCP host static reservation and sets the boot file name (typically used for a TFTP boot file) to the Python file as HTTP download.

host vsr-sc-r1 {
 hardware ethernet      00:50:56:a1:59:66;
 fixed-address          10.254.1.115;
 filename              "http://10.254.1.1/autodeploy.py";
}

When the factory default device boots, it will get the IP address, then it will download and execute the Python script. The setup was tested using a VSR router, which will use the G1/0 (first interface of the VM) as the management interface.

This entry was posted in Comware7 and tagged , , , , . Bookmark the permalink.

One Response to Comware 7 autodeploy supports Python scripts

  1. Remi Batist says:

    Thanks for the tip Peter,

    It really works great!
    I use it to deploy HP5130 Switches in combination with HP iMC.

    https://github.com/networkingdvi/HPN-Scripting/blob/master/5130_irf-config.py

    Remi

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s