HPE Storage Users Group

A Storage Administrator Community




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Macro Script
PostPosted: Thu Jul 02, 2015 10:53 am 

Joined: Thu Jul 02, 2015 10:41 am
Posts: 1
Hi Everybody

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

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


Top
 Profile  
Reply with quote  
 Post subject: Re: Macro Script
PostPosted: Mon Jul 06, 2015 3:40 pm 
Site Admin
User avatar

Joined: Tue Aug 18, 2009 10:35 pm
Posts: 1328
Location: Dallas, Texas
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.

_________________
Richard Siemers
The views and opinions expressed are my own and do not necessarily reflect those of my employer.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 


Who is online

Users browsing this forum: No registered users and 33 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group | DVGFX2 by: Matt