HP StorageWorks Command View XP Command Line Interface (CLI) reference guide (B9357-96161, January 2006)
192 Batch processing
Multiple set operations
Consecutive related commands in a batch file are grouped together and sent to the Command View server
for execution simultaneously. The following groups are the ones under which the commands are grouped.
• LIST: Contains all the list commands.
• LUN MANAGEMENT: Contains create lun, create luse, modify host_mode, modify
cmd_device, modify fibre_topology, modify fibre_address, delete lun, and
delete luse commands.
• LUN SECURITY: Contains create wwn, create host_group, modify host_group, modify
lun_security, modify wwn, delete host_group, and delete wwn commands.
• CREATE CUSTOM LDEV: Contains only create custom_ldev commands.
• DELETE LDEV: Contains only delete ldev commands.
• INITIALIZE: Contains only volume initialize commands.
• INSTALL LICENSE KEY: Contains only install license_key commands.
• UNINSTALL LICENSE KEY: Contains only uninstall license_key commands.
• ADD IP SECURITY: Contains only add ipsecurity commands.
• DELETE IP SECURITY: Contains only delete ipsecurity commands.
When the execution of any group fails, the CLI stops further execution of the file.
All list commands are executed, even when there is no data available for a list command.
Sequence of operations
The entire input file is first parsed for syntax errors. If a syntax error is found, all the errors are displayed
with their respective line number. The commands in the file are not executed.
After a successful syntax validation, the consecutive commands in the file are grouped according to the
groups above. Each group is sent to the Command View management station for execution. The execution
of each group has to complete before the next group is executed.
If the execution of any group fails, the execute command is stopped and there is no further execution.
The output and error messages for each command can be sent to a file using the -o option. If you don’t
specify the -o option, the output is displayed on the screen.
Scenario 1
A file containing syntax errors:
line#1: list port -port 1A
line#2: list ldev -port 1A
line#3: list prt -port 1A
Output
line 2: Invalid command syntax
line 3: Invalid command
Scenario 2
A file containing valid commands with invalid data:
line#1: #list commands
line#2: list port -port 1A
line#3: list ldev -cu 0 -o ldev.out
line#4:
line#5: #modify commands for lun management
line#6: create luse 0,0 - continuous 2
line#7: modify fibre_address 1A,2
line#8:
line#9: #modify command for lun security
line#10: delete wwn 1A,nick1,wwnnick2
line#11:
line#12: #some more list commands
line#13: list luse
line#14: list wwn -o wwn.out