Some basic scripting help

Post Reply
hdtvguy
Posts: 576
Joined: Sun Jul 29, 2012 9:30 am

Some basic scripting help

Post by hdtvguy »

OK I have not scripted in forever, and never scripted remote devices like. I have a great deal of scripts I need to write for the 3par and am struggling with the basic, not the actual tasks. First am I better off scripting to the cli or invoking like putty/plink scripts? Then I am struggling with the basics, how to actually get the communications invoked to the unit using the cli in a script and then any advise or sample on basic framework would be helpful, the basic communications, then how to trap the results or error condition in the cli to act upon. Any help would be greatly appreciated as I have been hounding my 3par sales team for months and they can't find anything. I'd love to go to a class on scripting the 3par if they had one. THANKS!
User avatar
Richard Siemers
Site Admin
Posts: 1333
Joined: Tue Aug 18, 2009 10:35 pm
Location: Dallas, Texas

Re: Some basic scripting help

Post by Richard Siemers »

I prefer to do my scripting from a windows box, using the old school "DOS" shell, or whatever the cool kids call it these days. This requires the 3PAR CLI to be installed. This way each 3par command's return code gets passed back to the DOS session for logic purposes.

Check out my sample script for doing D.O. in this sub forum for examples. The 3PAR Cli for Windows documentation is also helpful for listing all the possible environmental variables it can use, and how to create a secure encrypted password file, etc.

viewtopic.php?f=17&t=215
Richard Siemers
The views and opinions expressed are my own and do not necessarily reflect those of my employer.
User avatar
Richard Siemers
Site Admin
Posts: 1333
Joined: Tue Aug 18, 2009 10:35 pm
Location: Dallas, Texas

Re: Some basic scripting help

Post by Richard Siemers »

PS - Here is a good resource for learning DOS scripting:

http://technet.microsoft.com/en-us/libr ... 3121120120
Richard Siemers
The views and opinions expressed are my own and do not necessarily reflect those of my employer.
hdtvguy
Posts: 576
Joined: Sun Jul 29, 2012 9:30 am

Re: Some basic scripting help

Post by hdtvguy »

Perfect, DOS scripting I get, it was how to call the 3par I needed, I see the variables get set and then I assume you have the CLI directory in the path and go from there, thanks!
Post Reply