remove
The remove command deletes autogenerated Blitz action snippets from test
sections.
Basic usage
There are 3 main ways of using the remove command:
remove <NUMBER>: Deletes the last ‘n’ autogenerated snippets from the current test section.
remove -n <SECTION_NAME>: Deletes a specific test section and all its autogenerated snippets.
remove -a: Deletes all test sections and their autogenerated snippets.
remove <NUMBER>
This command deletes the last ‘n’ autogenerated Blitz action snippets from the current test section.
For example, after running any operator command, remove 1 would remove the
autogenerated Blitz action snippet for that command:
(lamp-host1) sleep 5
<TRUNCATED>
(lamp-host1) list 2
configure:
device: host1
command: no logging console
sleep:
sleep_time: 5
(lamp-host1)
(lamp-host1) remove 1
(lamp-host1)
(lamp-host1) list 2
configure:
device: host1
command: no logging console
(lamp-host1)
Note
remove <NUMBER> does not remove autogenerated Blitz action snippets
beyond the current test section.
Example highlighting this behavior:
(lamp-host1) list 3
configure:
device: host1
command: no logging console
sleep:
sleep_time: 2
execute:
device: host1
command: show ip route
include:
- 1.1.1.1
(lamp-host1)
(lamp-host1) test_section new
(lamp-host1)
(lamp-host1) remove 1
(lamp-host1)
(lamp-host1) list -n default
default:
- configure:
device: host1
command: no logging console
- sleep:
sleep_time: 2
- execute:
device: host1
command: show ip route
include:
- 1.1.1.1
(lamp-host1)
remove -n <SECTION_NAME>
This form of the command deletes a specific test section and all its autogenerated Blitz action snippets.
Example:
(lamp-host1) test_section default
(lamp-host1) configure no logging console
2024-07-29 16:55:45: %LAMP-INFO: +..............................................................................+
2024-07-29 16:55:45: %LAMP-INFO: : Configure 'no logging console' on 'host1' :
2024-07-29 16:55:45: %LAMP-INFO: +..............................................................................+
2024-07-29 16:55:45,867: %UNICON-INFO: +++ host1 with via 'a': configure +++
config term
Enter configuration commands, one per line. End with CNTL/Z.
host1(config)#no logging console
host1(config)#end
host1#
(lamp-host1) test_section new
(lamp-host1) configure no ip domain lookup
2024-07-29 17:09:21: %LAMP-INFO: +..............................................................................+
2024-07-29 17:09:21: %LAMP-INFO: : Configure 'no ip domain lookup' on 'host1' :
2024-07-29 17:09:21: %LAMP-INFO: +..............................................................................+
2024-07-29 17:09:21,303: %UNICON-INFO: +++ host1 with via 'a': configure +++
config term
Enter configuration commands, one per line. End with CNTL/Z.
host1(config)#no ip domain lookup
host1(config)#end
host1#
(lamp-host1) list -a
default:
- configure:
device: host1
command: no logging console
new:
- configure:
device: host1
command: no ip domain lookup
(lamp-host1) remove -n default
(lamp-host1) list -a
new:
- configure:
device: host1
command: no ip domain lookup
remove -a
This command deletes all test sections and their autogenerated Blitz action snippets.
Example:
(lamp-host1) list -a
default:
- configure:
device: host1
command: no logging console
new:
- configure:
device: host1
command: no ip domain lookup
(lamp-host1) remove -a
(lamp-host1) list -a
(lamp-host1)