Page 1 of 1
Macro Script
Posted: Thu Jul 02, 2015 10:53 am
by rafaelvecchio
Hi Everybody
Is it possible to run macro scripts at 3par box?
cli -sys x.x.x.x -pwf file myscript.sh
Re: Macro Script
Posted: Mon Jul 06, 2015 3:40 pm
by Richard Siemers
Yes and no...
You would first setup a password file (see the manual for the setpassword command) and your write your macro as a DOS or BASH script, (or even powershell) calling the individual cli commands. This will allow you to use higher level logic like (if, else, while, find, grep etc etc) commands and logic within your "macro".
Also be sure to read the section of the CLI guide on variables, it may save you a lot of time with commands... here are some examples I found useful:
TPDSYSNAME is the name of the 3par system being managed
TPDPWFILE is the location of the pwfile created with "setpassword -saveonly -file X"
TPDCSVTABLE=1 Makes the output a csv table instead of formatted text.