HPE Storage Users Group
https://www.3parug.com/

Macro Script
https://www.3parug.com/viewtopic.php?f=17&t=1403
Page 1 of 1

Author:  rafaelvecchio [ Thu Jul 02, 2015 10:53 am ]
Post subject:  Macro Script

Hi Everybody

Is it possible to run macro scripts at 3par box?

cli -sys x.x.x.x -pwf file myscript.sh

Author:  Richard Siemers [ Mon Jul 06, 2015 3:40 pm ]
Post subject:  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.

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/