configure
The configure command applies configuration on the device loaded in LAMP
shell and automatically generates a pyATS Blitz ‘configure’ action snippet.
Basic usage
Config-prompt mode
Invoke configure to switch to config-prompt mode, which behaves
like the config prompt on a device console. Configs can be applied in this mode
as if at the device config prompt. Type ‘lamp’ to exit config-prompt mode
and return back to LAMP shell prompt.
Example:
(lamp-host2) configure
host2(config)# interface Loopback1
host2(config-if)# ip address 1.1.1.1 255.255.255.255
host2(config-if)# lamp
(lamp-host2)
After exiting, LAMP generates a Blitz ‘configure’ action snippet with all configs applied in this mode:
(lamp-host2) list 1
configure:
device: host2
command: |-
!
interface Loopback1
ip address 1.1.1.1 255.255.255.255
(lamp-host2)
Direct config application
Configs can also be applied directly by providing them as arguments to configure.
The config application on the device console always gets printed on the terminal screen.
Example:
(lamp-host2) configure no logging console
2024-07-27 13:29:34: %LAMP-INFO: +..............................................................................+
2024-07-27 13:29:34: %LAMP-INFO: : Configure 'no logging console' on 'host2' :
2024-07-27 13:29:34: %LAMP-INFO: +..............................................................................+
2024-07-27 13:29:34,884: %UNICON-INFO: +++ host2 with via 'a': configure +++
config term
Enter configuration commands, one per line. End with CNTL/Z.
host2(config)#no logging console
host2(config)#end
host2#
(lamp-host2)
The Blitz ‘configure’ action snippet is automatically generated by LAMP as shown below:
(lamp-host2) list 1
configure:
device: host2
command: no logging console
(lamp-host2)
To apply multiple configurations spanning sub-modes, use ‘+’ as delimiter between them.
Example:
(lamp-host2) configure interface Loopback1 + ip address 1.1.1.1 255.255.255.255
2024-07-27 13:32:21: %LAMP-INFO: +..............................................................................+
2024-07-27 13:32:21: %LAMP-INFO: : Configure ['interface Loopback1 ', ' ip address 1.1.1.1 255.255.255.255'] o :
2024-07-27 13:32:21: %LAMP-INFO: : n 'host2' :
2024-07-27 13:32:21: %LAMP-INFO: +..............................................................................+
2024-07-27 13:32:21,783: %UNICON-INFO: +++ host2 with via 'a': configure +++
config term
Enter configuration commands, one per line. End with CNTL/Z.
host2(config)#interface Loopback1
host2(config-if)# ip address 1.1.1.1 255.255.255.255
host2(config-if)#end
host2#
(lamp-host2) list 1
configure:
device: host2
command:
- 'interface Loopback1'
- 'ip address 1.1.1.1 255.255.255.255'
(lamp-host2)