Page 1 of 1

Basic Idea about Scripting

Posted: Thu May 14, 2015 2:41 am
by kk2491
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

Re: Basic Idea about Scripting

Posted: Mon May 18, 2015 2:01 pm
by Richard Siemers
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

Re: Basic Idea about Scripting

Posted: Mon Jun 08, 2015 2:00 pm
by hdtvguy
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.

Re: Basic Idea about Scripting

Posted: Tue Jun 23, 2015 11:27 am
by jbonez
Aside from learning the basic commands. What is the best scripting language to use for 3par.?

Re: Basic Idea about Scripting

Posted: Mon Jul 06, 2015 4:39 pm
by Richard Siemers
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.