HPE Primera Storage
1748268 Members
3601 Online
108760 Solutions
New Discussion юеВ

Re: Problems with PSToolkit

 
SOLVED
Go to solution
apol
Frequent Advisor

Problems with PSToolkit

Hi, I'm trying to get used to the Powershell Toolkit Wrapper for WSAPI.

All CmdLets that Get stuff work, but I'm completely unable to change or create something on my arrays. Yes, I tried another user: 3paradm and my LDAP/AD User with super rights both have the same problem: All update- und new-cmdlets return

FAILURE : While creating Host:testhost02
or
FAILURE : While Updating Host : testhost01.
or
FAILURE : While Updating Host Set: testhostset

I tried wrapping host- or host set names in "", but that does not help.

Does anybody use the PSToolkit V3 on a Primera (4.2.2)? Any ideas what's going wrong here?

4 REPLIES 4
sbhat09
HPE Pro

Re: Problems with PSToolkit

Hello Apol,

I couldn't completely get the procedure you are following. However please check if the below linked document is useful for you.

PS toolkit for Primera and 3PAR - userguide - https://support.hpe.com/hpesc/public/docDisplay?docLocale=en_US&docId=a00085686en_us

Regards,
Srinivas Bhat

If you feel this was helpful please click the KUDOS! thumb below!


I am an HPE Employee

Accept or Kudo

apol
Frequent Advisor

Re: Problems with PSToolkit

Hi, thank you. But: this does not solve my problem, I already use this guide.

My procedure:

PS> Import-Module <path to pstoolkit>

PS> $connection = New-WSAPIConnection -ArrayFQDNorIPAddress <primera_ip> -SANUserName 3paradm -SANPassword <PWfor3paradm> -Arraytype primera

Cmdlet executed successfully

PS> Get-Host_WSAPI -HostName <hostname> -WsapiConnection $connection

Cmdlet executed successfully
<host-Data here>

PS> Update-Host_WSAPI -HostName <hostname> -NewName <unused_new_hostname> -WsapiConnection $connection

FAILURE : While Updating Host : MEINTESTHOST1003.

Same for ALL other cmdlets that change something. All Get-cmdlets work.

 

apol
Frequent Advisor

Re: Problems with PSToolkit

I tried creating new hosts (resulting in a POST request), editing an existing host (resulting in a PU request), addig a host to a host set and removing a host from a host set. In the WSAPI log file, there's always the same error:

05/07/2021 12:34:10 DEBUG: Running: Creation of the body hash
05/07/2021 12:34:10 DEBUG: Request: Request Invoke-3parWSAPI URL : /hosts TYPE : POST
05/07/2021 12:34:10 DEBUG: Running: Constructing header.
05/07/2021 12:34:10 DEBUG: Request: Invoke-WebRequest for Data, Request Type : POST
05/07/2021 12:34:10 DEBUG: Stop: Exception Occurs
05/07/2021 12:34:10 DEBUG: End: Show-RequestException
05/07/2021 12:34:10 INFO: FAILURE : While creating Host:<new_hostname>

05/07/2021 12:32:37 DEBUG: Running: Creation of the body hash
05/07/2021 12:32:37 DEBUG: Request: Request to Update-Host_WSAPI(Invoke-3parWSAPI).
05/07/2021 12:32:37 DEBUG: Request: Request Invoke-3parWSAPI URL : /hosts/<existing_hostname> TYPE : PUT
05/07/2021 12:32:37 DEBUG: Running: Constructing header.
05/07/2021 12:32:37 DEBUG: Request: Invoke-WebRequest for Data, Request Type : PUT
05/07/2021 12:32:37 DEBUG: Stop: Exception Occurs
05/07/2021 12:32:37 DEBUG: End: Show-RequestException
05/07/2021 12:32:37 INFO: FAILURE : Updating Host : <existing_hostname>.

apol
Frequent Advisor
Solution

Re: Problems with PSToolkit

This seems to be a bug in the WSAPI CmdLets  of the PSToolkit 3.0 release. I downloaded latest master from the github project's site, and it works with that one. It's still called 3.0 (Get-Module says so).

 

Still broken in this version for WSAPI CmdLets:

Descriptors of existing hosts can't be changed (comment and os)

Manual is a mess