Microsoft Virtualization Discussions

get-ncaggr is erroring

StevePutre
945 Views

Hi:

 

Wanted to make the developers aware of a situation I am experiencing.

 

I am starting to test with PSTK 9.13.1 and OnTAP 9.10.1P12.

PS E:\> $global:CurrentNcController

Name Address Vserver Version
---- ------- ------- -------
XXXXXXX 10.24.71.135 NetApp Release 9.10.1P12: Thu Apr 13 00:30:59 UTC 2023


PS E:\> get-module

ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Manifest 9.13.1.... netapp.ontap {Add-NaAggr, Add-NaCifsShare, Add-NaCredential, Add-NaFpolicyExtension...}

 

'get-ncaggr' throws an odd error when used with REST:


PS E:\> get-ncaggr
get-ncaggr : Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'DataONTAP.C.Types.Aggr.Store' because the type requires a JSON object (e.g.
{"name":"value"}) to deserialize correctly.
To fix this error either change the JSON to a JSON object (e.g. {"name":"value"}) or change the deserialized type to an array or a type that implements a
collection interface (e.g. ICollection, IList) like List<T> that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to force
it to deserialize from a JSON array.
Path 'cloud_storage.stores', line 114, position 15.
At line:1 char:1
+ get-ncaggr
+ ~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-NcAggr], ArgumentException
+ FullyQualifiedErrorId : Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'DataONTAP.C.Types.Aggr.Store' because the type requires a JSON
object (e.g. {"name":"value"}) to deserialize correctly.
To fix this error either change the JSON to a JSON object (e.g. {"name":"value"}) or change the deserialized type to an array or a type that implements a col
lection interface (e.g. ICollection, IList) like List<T> that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to forc
e it to deserialize from a JSON array.
Path 'cloud_storage.stores', line 114, position 15.,DataONTAP.C.PowerShell.SDK.Cmdlets.Aggr.GetNcAggr

 

Using ONTAPI it works fine

PS E:\> get-ncaggr -ontapi

Name State TotalSize Used Available Disks RaidType RaidSize Volumes
---- ----- --------- ---- --------- ----- -------- -------- -------
adclabnapc02_ssd_a001 online 8.0 TB 0% 8.0 TB 23 raid_dp, normal 24 9
adclabnapc02_ssd_a002 online 8.4 TB 0% 8.4 TB 24 raid_dp, normal 24 16
adclabnapc02n01_root online 159.9 GB 95% 7.7 GB 10 raid_dp, normal 24 1
adclabnapc02n02_root online 159.9 GB 95% 7.7 GB 10 raid_dp, normal 24 1

 

1 REPLY 1

AmmarMhowwala
833 Views

Hi,

Thanks for bringing this issue to our attention. We have acknowledged the issue and will address it in our next release.

Public