Hi Everybody
Is it possible to run macro scripts at 3par box?
cli -sys x.x.x.x -pwf file myscript.sh
Macro Script
- Richard Siemers
- Site Admin
- Posts: 1333
- Joined: Tue Aug 18, 2009 10:35 pm
- Location: Dallas, Texas
Re: Macro Script
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.
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.
Richard Siemers
The views and opinions expressed are my own and do not necessarily reflect those of my employer.
The views and opinions expressed are my own and do not necessarily reflect those of my employer.