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

Basic Idea about Scripting
https://3parug.com/viewtopic.php?f=17&t=1305
Page 1 of 1

Author:  kk2491 [ Thu May 14, 2015 2:41 am ]
Post subject:  Basic Idea about Scripting

Hi All,

Can anybody please give me the brief idea about the scripting in HP 3PAR.

I want to learn scripting in 3PAR.

It would be a great help if you provide some docs link which are easy to understand and simple.

Awaiting your response.

Regards,
KK

Author:  Richard Siemers [ Mon May 18, 2015 2:01 pm ]
Post subject:  Re: Basic Idea about Scripting

Use Google to find the following, along with the version number for your version of Inserv:

3PAR Command Line Interface Reference
3PAR Command Line Interface Administrators Manual

These 2 guides are a good start (and maybe the only one).

For example:
Google: 3PAR Command LIne Interface Reference 3.2

Author:  hdtvguy [ Mon Jun 08, 2015 2:00 pm ]
Post subject:  Re: Basic Idea about Scripting

The important thing is to look at some of the scripts posted on this forum to gain some insight on how to interact with the arry. With the CLI there are a few powerful concepts. You will want to save off password file for each array to allow for non-interactive authentication. You will also want to decide if you do Windows you will want to decide if you want to use environment varible to preset some parameters. If you have a single array this is nice, but I prefer to use command line parameters, while repetitive it allows for concurrency of scripts to run on the same system that may be interacting with different arrays.

Another important factor is to understand that 3par cli commends do not return results they way you may assume. Many commands will return only a failure code if the command itself fails to execute, this is different from the command actually running as expected. You can easily run cli commands that run "successfully" but do not produce the results you expect because the CLI does not care if the underlying command did what you expected, only that the command was a valid commend. This means that sometime you have to do more scripting to follow up your commands with additional commands that extract output to verify the command you executed had the intended outcome.

If you do Powershell scripting there is a powershell api the is on the roadmap and last I heard it was fairly imminent, as far as I know this is public knowledgae as it has been on roadmaps I was shown that were not NDA for months now.

Author:  jbonez [ Tue Jun 23, 2015 11:27 am ]
Post subject:  Re: Basic Idea about Scripting

Aside from learning the basic commands. What is the best scripting language to use for 3par.?

Author:  Richard Siemers [ Mon Jul 06, 2015 4:39 pm ]
Post subject:  Re: Basic Idea about Scripting

jbonez wrote:
Aside from learning the basic commands. What is the best scripting language to use for 3par.?


That's a loaded question, like Ford vs Chevy, or FC vs ISCSI... but I will bite.

The 3PAR commands are exactly the same if you SSH into the Inserv, run them from Windows, or from Linux.

If you're an old school windows guy who likes the DOS command line, use that. If you're a younger Windows guy, use the power shell (however, I am not sure that 100% of the 3PAR functionality exists there yet, haven't used powershel yet myself)... if you're a linix/unix guy the BASH shell probably be your best option. If you are none of the above and are ready to learn any of the 3, I suggest you first figure out where these scripts will run from in your environment. Will you run them from your windows PC or schedule them to run from a unix box in the datacenter?

I personally prefer bash shell, however, I do most of my work from a windows pc so I use DOS batch files the most.

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