print "\n\n *** Sample ZTP Day0 Python Script *** \n\n" # Importing cli module import cli print "\n\n *** Executing show platform *** \n\n" cli_command = "show platform" cli.executep(cli_command) print "\n\n *** Executing show version *** \n\n" cli_command = "show version" cli.executep(cli_command) print "\n\n *** Configuring Interfaces *** \n\n" cli.configurep(["interface loop 100", "ip address 172.22.1.1 255.255.255.255", "end"]) cli.configurep(["interface gi4/0/5", "switchport mode access", "switchport access VLAN 10" "end"]) cli.configurep(["interface gi4/0/6", "switchport mode trunk", "switchport trunk native VLAN 10", "switchport trunk allowed vlan 10,20,30", "end"]) cli.configurep(["hostname Remote-B-SW01", "no ip domain-lookup"]) cli.configurep(["VLAN 10", "VLAN 20", "VLAN 30","end"]) print "\n\n *** Executing show ip interface brief *** \n\n" cli_command = "sh ip int brief" cli.executep(cli_command) print "\n\n *** ZTP Day0 Python Script Execution Complete *** \n\n"