PureStorage-Connect / PowerShellSDK2

Pure Storage FlashArray PowerShell Software Development Kit (SDK) version 2.
https://support.purestorage.com/Solutions/Microsoft_Platform_Guide
Apache License 2.0
8 stars 7 forks source link

Get-Pfa2Connection returns $null, verbose shows exception. #5

Closed ghost closed 1 year ago

ghost commented 2 years ago

Error: Exception "PureRestException: HttpStatusCode = '0', RestErrorCode = 'InternalError', Details = '', InnerException = 'Newtonsoft.Json.JsonReaderException: JSON integer 38654705917 is too large or small for an Int32. Path 'items[0].lun', line 1, position 193.

API returns value as Int64.

barkz commented 1 year ago

@saidbrandon I just tested this under SDK 2.16.12.0 and get the follow !=Verbose and =Verbose outputs:

PS C:\Users\barkz> Get-Pfa2Connection Host : @{Name='sn1-r720-f03-07'} HostGroup : Lun : 1 ProtocolEndpoint : Volume : @{Id='c7bc0a00-0133-631b-3986-5758aef1ee0a'; Name='Test'} Host : @{Name='sn1-r720-f04-03'} HostGroup : Lun : 1 ProtocolEndpoint : Volume : @{Id='c7bc0a00-0133-631b-3986-5758aef1ee0a'; Name='Test'}

PS C:\Users\barkz> Get-Pfa2Connection -Verbose VERBOSE: PureStorage.Rest Verbose: 13 : 2023-05-05T22:23:06.2118238Z 0.0.0.0: Get-Pfa2Connection (__AllParameterSets) Verbose=True VERBOSE: PureStorage.Rest Verbose: 10 : 2023-05-05T22:23:06.2308236Z GET https://0.0.0.0/api/2.20/connections VERBOSE: PureStorage.Rest Verbose: 11 : 2023-05-05T22:23:06.2590311Z GET https://0.0.0.0/api/2.20/connections 200 29ms {"continuation n_token":null,"items":[{"host":{"name":"sn1-r720-f03-07"},"lun":1,"volume":{"name":"Test","id":"c7bc0a00-0133-631b-3986-5758aef1ee0a"},"h ost_group":{"name": null},"protocol_endpoint":{"name":null,"id":null}},{"host":{"name":"sn1-r720-f04-03"},"lun":1,"volume":{"name":"Test", "id":"c7bc0a00-0133-631b-3986-5758aef1ee0a"},"host_group":{"name":null},"protocol_endpoint":{"name":null,"id":null}}],"more_items_remaini ng":false,"total_item_count":null} Host : @{Name='sn1-r720-f03-07'} HostGroup : Lun : 1 ProtocolEndpoint : Volume : @{Id='c7bc0a00-0133-631b-3986-5758aef1ee0a'; Name='Test'} Host : @{Name='sn1-r720-f04-03'} HostGroup : Lun : 1 ProtocolEndpoint : Volume : @{Id='c7bc0a00-0133-631b-3986-5758aef1ee0a'; Name='Test'}`

github-actions[bot] commented 1 year ago

Stale issue message