Basic Idea about Scripting

Post Reply
kk2491
Posts: 169
Joined: Fri Dec 05, 2014 6:42 am

Basic Idea about Scripting

Post 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
User avatar
Richard Siemers
Site Admin
Posts: 1333
Joined: Tue Aug 18, 2009 10:35 pm
Location: Dallas, Texas

Re: Basic Idea about Scripting

Post 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
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: Basic Idea about Scripting

Post 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.
jbonez
Posts: 1
Joined: Tue Jun 23, 2015 11:21 am

Re: Basic Idea about Scripting

Post by jbonez »

Aside from learning the basic commands. What is the best scripting language to use for 3par.?
User avatar
Richard Siemers
Site Admin
Posts: 1333
Joined: Tue Aug 18, 2009 10:35 pm
Location: Dallas, Texas

Re: Basic Idea about Scripting

Post 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.
Richard Siemers
The views and opinions expressed are my own and do not necessarily reflect those of my employer.
Post Reply