277
Figure 52
Network diagram
Usage procedure
# Use a text editor on the PC to configure Python script
test.py
as follows:
#!usr/bin/python
import comware
comware.Transfer('tftp', '192.168.1.26', 'main.cfg', 'flash:/main.cfg')
comware.Transfer('tftp', '192.168.1.26', 'backup.cfg', 'flash:/backup.cfg')
comware.CLI('startup saved-configuration flash:/main.cfg main ;startup
saved-configuration flash:/backup.cfg backup')
# Use TFTP to download the script to the device.
<Sysname> tftp 192.168.1.26 get test.py
# Execute the script.
<Sysname> python flash:/test.py
<Sysname>startup saved-configuration flash:/main.cfg main
Please wait...... Done.
<Sysname>startup saved-configuration flash:/backup.cfg backup
Please wait...... Done.
Verifying the configuration
# Display startup configuration files.
<Sysname> display startup
Current startup saved-configuration file: flash:/startup.cfg
Next main startup saved-configuration file: flash:/main.cfg
Next backup startup saved-configuration file: flash:/backup.cfg
Internet
Device
PC
TFTP client
TFTP server
192.168.1.200/24
192.168.1.26/24
Summary of Contents for FlexNetwork 10500 Series
Page 139: ...130 Sysname display version ...