Giter VIP home page Giter VIP logo

hpe3par_pstoolkit's Introduction

HPE Alletra 9000 and Primera and 3PAR PowerShell Toolkit

The HPE Alletra 9000 and Primera and 3PAR PowerShell Toolkit supports cmdlets, which are wrappers around the native HPE Alletra 9000 or HPE Primera or HPE 3PAR storage CLI commands and Web Services API (WSAPI).

Features of HPE Alletra 9000 and Primera and 3PAR PowerShell Toolkit

The latest HPE Alletra 9000 and Primera and 3PAR PowerShell Toolkit works with PowerShell 3.0 and later up to PowerShell 5.1, PowerShell Core 6.x, and PowerShell 7.

It can be used in the following two ways:

With Native HPE Alletra 9000 or HPE Primera or HPE 3PAR storage CLI command

When you run the cmdlets, the following actions take place:

  1. A secure connection to the HPE Alletra 9000 or HPE Primera or HPE 3PAR storage is established over a secure shell.
  2. The native HPE Alletra 9000 or HPE Primera or HPE 3PAR storage CLI command and parameters are formed based on the PowerShell cmdlet and parameters.
  3. The native HPE Alletra 9000 or HPE Primera or HPE 3PAR storage CLI command are executed.
  4. The output of the cmdlets is returned as PowerShell objects. This output can be piped to other PowerShell cmdlets for further processing.

NOTE: PowerShell Core 6.x and PowerShell 7 are supported only for CLI and WSAPI connections. Not supported for PoshSSH Connection.

With HPE Alletra 9000 or HPE Primera or HPE 3PAR storage Web Service API (WSAPI 1.6.4 and 1.7)

When you run the cmdlets, the following actions take place:

  1. A secure connection using WSAPI is established as a session key (credential). Unused session keys expire after 15 minutes.
  2. The WSAPI and parameters are formed based on the PowerShell cmdlet and parameters.
  3. The WSAPI uses the HTTPS protocol to enable programmatic management of HPE Alletra 9000 or HPE Primera or HPE 3PAR storage servers and provides client access to web services at specified HTTPS locations. Clients communicate with the WSAPI server using HTTPS methods and data structures represented with JSON.
  4. The output of the cmdlets is returned as PowerShell objects. This output can be piped to other PowerShell cmdlets for search.

Product support

The HPE Alletra 9000 and Primera and 3PAR PowerShell Toolkit supports PowerShell 3.0 and later up to PowerShell 5.1, PowerShell Core 6.x and PowerShell 7. This Toolkit provides cmdlets to manage the following operations:

  • Views and manages
    • Common Provisioning Group (CPG)
    • VVols
    • Virtual Volume sets
    • Hosts
    • Host sets
    • Virtual Logical Unit Number (vLUN)
    • Physical copy
    • Virtual copy (Snapshots)
    • Ports
    • Tasks
    • Disk Enclosure
    • Performance Management
    • Spares
    • CIM
  • Support for
    • System Reporter Cmdlets
    • Remote Copy Cmdlets
    • Compression-related Cmdlets
    • Asynchronous streaming replication
    • Deduplication-related Cmdlets
    • Storage Federation related Cmdlets
    • Smart SAN Enhancements (iSCSI) related Cmdlets.
    • Adaptive Optimization (AO)
    • Domain Management
    • Flash cache
    • Health and Alert Management
    • Node Subsystem Management
    • Service Cmdlets
    • CIM Cmdlets
    • HPE Primera and HPE 3PAR Web Services API

Supported Host operating systems and PowerShell versions

HPE Alletra 9000 and Primera and 3PAR PowerShell Toolkit works with PowerShell 3.0 and later up to PowerShell 5.1, PowerShell Core 6.x, and PowerShell 7. You can use this Toolkit in the following environments:

  • Microsoft Windows 2019
  • Microsoft Windows Server 2016
  • Microsoft Windows Server 2012 R2
  • Microsoft Windows Server 2012
  • Microsoft Windows Server 2008 R2 SP1
  • Microsoft Windows Server 2008 R2
  • Microsoft Windows Server 2008 SP1
  • Microsoft Windows 10
  • Microsoft Windows 8
  • Microsoft Windows 7 SP1
  • Microsoft Windows 7

Supported Storage Platforms

HPE Alletra 9000

Supported firmware for HPE Alletra 9000 is 9.3.0

HPE Primera 630, 650 and 670 series

Supported firmware for HPE Primera are 4.0.0, 4.1.0, 4.2.0 and 4.3.0

HPE 3PAR storage 7000, 8000, 9000, 10000, & 20000 series

Supported firmware for HPE 3PAR storage are:

  • 3.3.1 (MU1, MU2, MU3, MU4 & MU5)
  • 3.3.1 (MU1, MU2, and MU3)
  • 3.2.2 (including all MUs)
  • 3.2.1 (including all MUs)

PowerShell Toolkit cmdlets Flow

We can perform the following operations using PowerShell Toolkit CLI cmdlets.

  • Create/Add
  • Update/Set
  • Delete/Remove
  • Get

hpe3par_pstoolkit's People

Contributors

harikumar-r avatar manjuramakrishna avatar mohd-aslam-shaikh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hpe3par_pstoolkit's Issues

Close-WSAPIConnection always asks for confirmation

Hi, no matter how I use it, Close-WSAPIConnection always asks for confirmation prior to closing the connection:

Close-WSAPIConnection
Close-WSAPIConnection -WsapiConnection $connection
Close-WSAPIConnection -WsapiConnection $connection -confirm (asking for confirmation is expected behaviour here)

Is there any way to close a connection within a script w/o the module asking for confirmation?

Update-3PARHost_WSAPI missing WindowsServer and AIX_ALUA

Missing persona for WindowServer and AIX_ALUA in function Update-3PARHost_WSAPI
Could you please add those 2 to the if statements? Alternatively use the follwing switch:

switch ($Persona.ToUpper())
{
    'GENERIC' 
        { $body["persona"] = 1 }
    'GENERIC_ALUA' 
        { $body["persona"] = 2 }
    'GENERIC_LEGACY' 
        { $body["persona"] = 3 }
    'HPUX_LEGACY' 
        { $body["persona"] = 4 }
    'AIX_LEGACY' 
        { $body["persona"] = 5 }
    'EGENERA' 
        { $body["persona"] = 6 }
    'ONTAP_LEGACY' 
        { $body["persona"] = 7 }
    'VMWARE' 
        { $body["persona"] = 8 }
    'OPENVMS' 
        { $body["persona"] = 9 }
    'HPUX'    
        { $body["persona"] = 10 }
    'WINDOWSSERVER' 
        { $body["persona"] = 11 }
    'AIX_ALUA' 
        { $body["persona"] = 12 }
    default 
	{
		return "Persona : $Persona value is incorrect please use [ GENERIC | GENERIC_ALUA | GENERIC_LEGACY | HPUX_LEGACY | AIX_LEGACY | EGENERA | ONTAP_LEGACY | VMWARE | OPENVMS | HPUX | WindowsServer | AIX_ALUA] " 
	}
}	

New-VV -tdvv failure

Hello,

I get an error when trying to create a new VV using the -tdvv parameter:

New-VV -vvName $name -Size $size -CPGName $CPG -SANConnection $Connection -tdvv

FAILURE : While creating vv Dev_App

Using the Get-Help command i noticed, that -tdvv is deprecated an that I should use the -dedup parameter.

But trying this, my Powershell tells me there is no -dedup parameter for the New-VV cmdlet.

I am using the POSH method

What type of connection shall i use when starting now

At the moment it seems that there are three different Options on how to connect to 3Par / Primera.

  1. 3parCLI
  2. POSH
  3. WSAPI

Is there one target you are heading and what will it be if so?
Just asking as object piping seems only be supported when using 3parcli like

PS > Get-3parvv | Remove-3parvv
FAILURE : Invalid cli type

I try to keep dependencys as low as possible and tried using POSH method

Powershell Took kit example commands not working

Hi All,
i am using the 3PAR powershell toolkit and running following which is in the example list and it doesnt seem to work

tried several of such commands from pwoershell toolkit and examples, looks like compareby or NoofRecords doesnt seem to work. has anyone used this ?

example from the toolkit:

-------------------------- EXAMPLE 10 --------------------------
PS C:>Get-3PARCacheMemoryStatisticsDataReports_WSAPI -VersusTime -Frequency_Hires -Compareby top -NoOfRecords 2 -ComparebyField hitIORead

error when we run on system:

C:\HPE3PARPSToolkit> Get-3PARCacheMemoryStatisticsDataReports_WSAPI -VersusTime -Frequency_Hires -Compareby top -NoOfRecords 2 -ComparebyField onlyCompareby
URL = /systemreporter/vstime/cachememorystatistics/hires;compareby:top,2,onlyCompareby
The array send an error message: Invalid system reporter parameter name or its value.

Status: ProtocolError
Error code: 296
HTTP Error code: 400
Message: Invalid system reporter parameter name or its value

FAILURE : While Execute Get-3PARCacheMemoryStatisticsDataReports_WSAPI.

CLI commands hitting PoshSSH 60 second timeout

Hi,

When running any CLI command that takes longer than 60 seconds to complete, we hit a default 60 second timeout in PoshSSH. For example:

`>Get-StatVV -iteration 60 -SANConnection $Connection

Exception calling "EndExecute" with "1" argument(s): "Command 'statvv -iter 60 ' has timed out."`

$Result = Invoke-SSHCommand -Command $Cmds -SessionId $Connection.SessionId

PoshSSH Invoke-SSHCommand does provide a -TimeOut param to change the default, but there is now way to pass this down through the toolset cmdlets to reach Invoke-CLICommand and then to PoshSSH.

I have a workaround: edit the param default directly in Posh-SSH.psm1. Ideally it would be possible to be able to pass a timeout value though the cmdlets, or it may be simpler to set the timeout per session when creating the connection with New-PoshSshConnection.

Thanks!

bug in delete host from hostset

it seems like when i want to delete a specific host from a hostset, it tries to delete the hostset, which seems not to be good :p.

it deleted the host from the hostset correctly, but returns something weird

updated to the latest version -> still the same problem, opened an SR as well

S C:\PPD\CONF\BIN> $hostset = Get-3parHostSet | Where-Object Members -EQ $3parhosttodelete.Name

PS C:\PPD\CONF\BIN> $hostset

ID Name Members


39 BE_CCM_POC_MA ESX_s2s005aq_POC

PS C:\PPD\CONF\BIN> Remove-3parHostSet $hostset.Name -hostName $hostset.Members
FAILURE : no -force option selected to remove hostset

PS C:\PPD\CONF\BIN> Remove-3parHostSet $hostset.Name -hostName $hostset.Members -force
FAILURE : While removing hostset BE_CCM_POC_MA

PS C:\PPD\CONF\BIN> $hostset

ID Name Members


39 BE_CCM_POC_MA ESX_s2s005aq_POC

PS C:\PPD\CONF\BIN> $hostset = Get-3parHostSet | Where-Object Members -EQ $3parhosttodelete.Name

PS C:\PPD\CONF\BIN> $hostset

Certificate expired on the module?

I cannot download this module from the PS gallery.

I get the error "Cannot be installed or updated because the authenticode signature of the file 'HPEStoragePowerShellToolkit.psd1' is not valid".

Get-3ParCage –sf

  1. Bug 1 :
    Get-3ParCage –sf
    Scenario : While Executing the above command the actual command is Get-3ParCage –sfp
    Actual : If we give like - Get-3ParCage –sf it is proceeding further and giving the output.

Powershell & CLI Ouput --> Refer Screenshot:
Expected
Cage -sfp
: Get-3ParCage –sf should raise Invalid Cage name as per CLI output.
: Get-3parHostPorts -sf also is taking -sf and also -sfp , kindly check

Get-3ParVVList -Hist Expiration & Retention times incorrect

When running Get-3ParVVList against a snapshot with Retention and Creation date/times applied these dates and times are not displayed correctly in the returned Powershell object. Listed below is output from 3Par CLI of the snapshot and firmware of 3Par in question, below that is the Powershell object.

3Parcli% showvv -hist Test_Snap
   Id Name              Prov Type  ------CreationTime------ ----RetentionEndTime---- -----ExpirationTime----- -SpaceCalcTime- -EfficiencyUpdateTime- -UnrefSpaceFreedTime- -Comment-
13946 Test_Snap         snp  vcopy 2020-09-24 08:09:29 ACST 2020-09-24 09:09:30 ACST 2020-09-24 09:12:07 ACST --              --                     --                    --
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    1 total

3Parcli% showversion
Release version 3.2.2 (MU6)
Patches:  P99,P107,P119,P131,P135,P139,P149,P154,P160,P162,P165,P166,P167

Component Name                   Version
CLI Server                       3.2.2 (P165)
CLI Client                       3.2.2
System Manager                   3.2.2 (P165)
Kernel                           3.2.2 (MU6)
TPD Kernel Code                  3.2.2 (MU6)
TPD Kernel Patch                 3.2.2 (P165)

Below is out of Get-3ParVVList -Hist.

get-3parvvlist -sanconn $3par -vvname Test_Snap -hist

Id                     : 13946
Name                   : Test_Snap
Prov                   : snp
Type                   : vcopy
Date(Creation)         : 2020-09-24
Time(Creation)         : 08:09:29
Zone(Creation)         : ACST
-RetentionEndTime-     : 2020-09-24
-ExpirationTime-       : 09:09:30
Date                   : ACST
Time                   : 2020-09-24
Zone                   : 09:12:07
-EfficiencyUpdateTime- : ACST
-UnrefSpaceFreedTime-  : -
-Comment-              : -

Creating VVs, hosts or sets fail when multiple connections are used

In the New-xxx_WSAPI commands (VV, Host, HostSet, VVSet, vLUN, maybe more), just after creating stuff, a nested "get-xxx_WSAPI is called to return the properties of the currently created item.
Example: When creating a host, you get host-properties as a return value.

In that nested get-calls, the parameter -wsapiconnection $connectionname is omitted.

This works well with one connection, but in our case, when having two connections (to two different arrays, for remote copy management purposes) open, the nested get-call sometimes seems to be issued to the other connection, and fails.

I don't know why this happens. Does is always use the last connection that was created when the -wsapiconnection parameter is not set?

This means, when creating a host, the host get's created, but an api error is returned afterwards, because the get after the new... fails (you create the host on array A, but ask array B about the host properties afterwards).

After appending "-WsapiConnection $WsapiConnection" to the nested get-calls, everything works.

Examples:
Line 414 in StorageVolumes.psm1
Line 167 in VirtualLUNs.psm1
Line 155 in HostSetsandVirtualVolumeSets.psm1 (HostSets)
Line 869 in HostSetsandVirtualVolumeSets.psm1 (VVSets)

This seems to be a problem with 3PAR arrays only, when working with primeras it works without the appended -wsapiconnection - parameter.

[Edit] Clarification

support matrix need an update

There seems to be something incorrect with the supported Storage platform below (on the dev portal). Shouldn’t it be 3.3.1, 3.2.2, 3.2.1, etc?

HPE 3PAR StoreServ 7000, 8000, 10000, and 20000 series.
Supported firmware for HPE 3PAR StoreServ Storage are:
• 3.1 (MU1, MU2, MU3 & MU4)
• 3.1 (MU1, MU2, and MU3)
• 2.2 (including all MUs)
• 2.1 (including all MUs)

PSTK 3.0 : WSAPI Post or Put operations are failing

From: Wilhelmi, William (QLytix Training Development, external) [email protected]
Sent: Thursday, July 16, 2020 5:28 PM
To: Snell, Chris [email protected]
Subject: Primera/3PAR PowerShell Toolkit fails POST/PUT ops

Hi Chris,

I have revised some customer training to reflect usage of the latest Primera/3par PowerShell Toolkit with PowerShell 7.0.2 on Windows Server 2016 . WSAPI version 1.7 on Primera OS 4.1.

I get vv creation failure in PowerShell and need some assistance on how to proceed. It seems GET operations succeed. POST and PUT operations fail. Do you know what could cause this? Do you have any ideas about how I can resolve it?

PS C:> Get-VV_WSAPI | select name

Cmdlet executed successfully

name

admin
.srdata
.mgmtdata
vv-501-D-01

**PS C:> New-VV_WSAPI -VVName vv-501-A-05 -CpgName SSD_r6 -SizeMiB 100 -WsapiConnection
Show-RequestException: C:\Windows\system32\WindowsPowerShell\v1.0\Modules\hpe3par_pstoolkit-master\GLOBAL\VS-Functions.psm1:595
Line |
595 | Show-RequestException -Exception $_
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Method invocation failed because [System.Net.Http.HttpResponseMessage] does not contain a method named 'GetResponseStream'.

FAILURE : While creating Volumes: vv-501-A-05**

Is the PS Toolkit still supported and developed?

Hello,

it feels like this project is abandoned. No news, no new releases supporting stuff like active peer persistence or other new features. Issues and bugs neither fixed nor acknowledged.

Can you please give a status update?

Get-3parEventLog , Get-3parHealth

While executing Get-3parEventLog , Get-3parHealth getting timeout exception since output data is huge. Since raised as a concern for which Aslam needs to fix it.

Raising Bug for the same.

No way of getting Add-VvToRCopyGroup_WSAPI to work

Hi, I can't find a way to use Add-VvToRCopyGroup_WSAPI:
Add-VvToRCopyGroup_WSAPI -GroupName mygroupname -VolumeName myvolumeonprimaryname -VolumeAutoCreation 1 -TargetName rcopytargetname -SecVolumeName myvolumeonprimaryname

and

Add-VvToRCopyGroup_WSAPI -GroupName mygroupname -VolumeName myvolumeonprimaryname -VolumeAutoCreation $true -TargetName rcopytargetname -SecVolumeName myvolumeonprimaryname

and, with a secondary volume with the same name as on primary created on my own,

Add-VvToRCopyGroup_WSAPI -GroupName mygroupname -VolumeName myvolumeonprimaryname -TargetName rcopytargetname -SecVolumeName myvolumeonprimaryname

all return

 The array sends an error message: invalid input: some or all required parameters are missing.

 Status: ProtocolError
 Error code: 40
 HTTP Error code: 400
 Message: invalid input: some or all required parameters are missing
 
 
 FAILURE : While Admitting a volume into a Remote Copy group : myvolumeonprimaryname

If I really omit a parameter, it does not return this error but asks for the missing parameter.

The RCGroup is stopped.

Does anybody know what's wrong here, or does anybody use this command successfully?

I'm using PSToolkit 3.1.

New-3PARVLun_WSAPI & Get-3PARVLun_WSAPI are not handling LUNID 0 correct

The 2 functions New-3PARVLun_WSAPI and Get-3PARVLun_WSAPI are not handling LUNID=0 correctly.
"if ($LUNID)" on line 8067 will always be false for LUNID 0 which prevents creation of LUNID 0 through WSAPI as it doesnt get added into the request. The same is true in function Get-3PARVLun_WSAPI on line 8339.

A better way to handle this would be "if ($LUNID -le 0)"

Get-3parCage -CageName cage

If we are passing wrong parameter the expected result should throw Failure.
Ex: Get -3parCage –CageName cage3543
Expected : Failure
Actual Result : Yes throwing Failure.
Result : Working as expected.

But Here if we pass the keyword cage as parameter it is returning Success.
Ex : Get -3parCage –CageName cage
Expected : Should throw a Failure
Actual Result : RETURNING SUCCESS
Result : Not Working as expected.
Bug_CageName

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.