Software Development Kit (SDK) and API Discussions

Get-NcQosPolicy in PoSH Tools V4 (3.3) NOT working - Depreciated for Get-NcQosPolicyGroup or Broken?

Noel_Ashford
2,950 Views

All,

      Get-NcQosPolicy does not work in this version against 8.3.1 GA. I am in need of this for a WFA script urgently. Any help would be greatly appreciated. CDoT OnTap Dev Team - Where is this API? How did it get removed from 8.3.1 GA?!?

 

PS C:\temp\POSH> Get-NcQosPolicy
Get-NcQosPolicy : Unable to find API: qos-policy-get-iter
At line:1 char:1
+ Get-NcQosPolicy
+ ~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (x.x.x.x:NcController) [Get-NcQosPolicy], EAPINOTFOUND
+ FullyQualifiedErrorId : ApiException,DataONTAP.C.PowerShell.SDK.Cmdlets.Qos.GeNcQosPolicy

 

 

In CDoT:

 

LAB-DR::*> security login role show-user-capability -operation-api-name qos-*

ObjectName: qos.policy-group

OperationName Command ONTAPI
-------------------- ----------------------------- -------------------------
create qos policy-group create qos-policy-group-create
delete qos policy-group delete qos-policy-group-delete,qos-policy-group-delete-iter
modify qos policy-group modify qos-policy-group-modify,qos-policy-group-modify-iter
rename qos policy-group rename qos-policy-group-rename
show qos policy-group show qos-policy-group-get,qos-policy-group-get-iter

ObjectName: qos.settings.control

OperationName Command ONTAPI
-------------------- ----------------------------- -------------------------
modify qos settings control modify qos-settings-control-modify
show qos settings control show qos-settings-control-get

ObjectName: qos.settings.read-ahead

OperationName Command ONTAPI
-------------------- ----------------------------- -------------------------
create qos settings read-ahead create qos-settings-read-ahead-create
delete qos settings read-ahead delete qos-settings-read-ahead-destroy,qos-settings-read-ahead-destroy-iter
modify qos settings read-ahead modify qos-settings-read-ahead-modify,qos-settings-read-ahead-modify-iter
show qos settings read-ahead show qos-settings-read-ahead-get,qos-settings-read-ahead-get-iter

ObjectName: qos.workload

OperationName Command ONTAPI
-------------------- ----------------------------- -------------------------
delete qos workload delete qos-workload-delete,qos-workload-delete-iter
modify qos workload modify qos-workload-modify,qos-workload-modify-iter
show qos workload show qos-workload-get,qos-workload-get-iter
14 entries were displayed.

 

It seems this API really does NOT exist? Is there another API to use in it's place? If so, is it possible to manually redirect to another API from powershell commands that I am unaware of? That's a little shocking the entire API is not there.

 

In the PowerShell Modules Source Code for the DLL, I do see where to change it, however, I dont think the API even exists in CDoT. Senior Dev's??

 

[XmlRoot("qos-policy-get-iter")]
public class QosPolicyGetIter : NaApi<QosPolicyGetIterResult>
{
    // Fields
    private QosPolicyInfo[] DesiredAttributesField;
    private int? MaxRecordsField;
    [XmlIgnore]
    public bool MaxRecordsSpecified;
    private QosPolicyInfo[] QueryField;
    private string TagField;

    // Methods
    public QosPolicyGetIter();

    // Properties
    [XmlArray("desired-attributes"), XmlArrayItem("qos-policy-info")]
    public QosPolicyInfo[] DesiredAttributes { get; set; }
    [XmlElement("max-records"), Range((long) 1L, (long) 100L)]
    public int? MaxRecords { get; set; }
    [XmlArray("query"), XmlArrayItem("qos-policy-info")]
    public QosPolicyInfo[] Query { get; set; }
    [XmlElement("tag")]
    public string Tag { get; set; }
}


-Noel 

4 REPLIES 4

mbeattie
2,917 Views

Hi Noel,

 

Looking at the CmdLet help it does state it is unavailable from ONTAP 8.2...

 

PS C\> Get-Help Get-NcQosPolicy

DESCRIPTION
    Get a list of policies.

    This cmdlet is not available for Data ONTAP 8.2 and up.

 

Have you considered using the "Invoke-NcSsh" or "Invoke-NcSystemApi" CmdLet's as a workaround? In the intermin I'll have a look in the SDK and see if i can come up with a solution for you.

 

/matt

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

Noel_Ashford
2,911 Views

Ref not being supported after 8.2, not sure how i missed that... it would seem that we now need to use *-Get-NcQosPolicyGroup.

 

PS C:\POSH> New-NcQosPolicyGroup -Name Test -Vserver SVM01 -MaxThroughput 47Mbs

PolicyGroup MaxThroughput PolicyGroupClass Vserver
----------- ------------- ---------------- -------
Test 47MB/s user_defined SVM01

 

The Help file should perhaps state what to use in it's place post 8.2 if the API is depreciated.

 

I would also be interested to see your other solutions as well. Feel free to email me internally as well  (noela) or add me to jabber.

 

-Noel 

mbeattie
2,893 Views

Hi Noel,

 

Yes the help file should probably be updated...just FYI there is an easy method to determine which cmdlets are available (or unavailable) by using the Get-NcCommand CmdLet. EG from an 8.3 simulator:

 

PS C\> get-nccommand -ListUnavailable -Category qos

Name                                Category        Family               Api
----                                --------        ------               ---
Get-NcQosArchivedWorkloadConfigu... qos             {cluster}            {qos-settings-archived-workload-get}
Get-NcQosPolicy                     qos             {cluster}            {qos-policy-get-iter}
Get-NcQosPolicyReadAhead            qos             {cluster}            {qos-policy-read-ahead-get-iter, qos-settings-read-ahead-get-iter}
Get-NcQosStream                     qos             {cluster}            {qos-stream-get-iter}
New-NcQosPolicy                     qos             {cluster}            {qos-policy-create}
New-NcQosPolicyReadAhead            qos             {cluster}            {qos-policy-read-ahead-create, qos-settings-read-ahead-create}
New-NcQosStream                     qos             {cluster}            {qos-stream-create}
New-NcQosWorkload                   qos             {cluster}            {qos-workload-create}
Remove-NcQosPolicy                  qos             {cluster}            {qos-policy-destroy, qos-policy-destroy-iter}
Remove-NcQosPolicyReadAhead         qos             {cluster}            {qos-policy-read-ahead-destroy, qos-policy-read-ahead-destroy-iter, qos-settings-read-ahead-destroy
Remove-NcQosStream                  qos             {cluster}            {qos-stream-destroy, qos-stream-destroy-iter}
Remove-NcQosWorkload                qos             {cluster}            {qos-workload-destroy, qos-workload-destroy-iter, qos-workload-delete, qos-workload-delete-iter}
Set-NcQosArchivedWorkloadConfigu... qos             {cluster}            {qos-settings-archived-workload-modify}
Set-NcQosPolicy                     qos             {cluster}            {qos-policy-modify}
Set-NcQosPolicyReadAhead            qos             {cluster}            {qos-policy-read-ahead-modify, qos-settings-read-ahead-modify}
Update-NcQosPolicy                  qos             {cluster}            {qos-policy-modify-iter}
Update-NcQosPolicyReadAhead         qos             {cluster}            {qos-policy-read-ahead-modify-iter, qos-settings-read-ahead-modify-iter}


PS C:\> get-nccommand -ListAvailable -Category qos

Name                                Category        Family               Api
----                                --------        ------               ---
Get-NcQosControlConfiguration       qos             {cluster}            {qos-settings-control-get}
Get-NcQosPolicyGroup                qos             {cluster}            {qos-policy-group-get-iter}
Get-NcQosWorkload                   qos             {cluster}            {qos-workload-get-iter}
New-NcQosPolicyGroup                qos             {cluster}            {qos-policy-group-create}
Remove-NcQosPolicyGroup             qos             {cluster}            {qos-policy-group-delete}
Rename-NcQosPolicyGroup             qos             {cluster}            {qos-policy-group-rename}
Set-NcQosControlConfiguration       qos             {cluster}            {qos-settings-control-modify}
Set-NcQosPolicyGroup                qos             {cluster}            {qos-policy-group-modify}
Set-NcQosWorkload                   qos             {cluster}            {qos-workload-modify}
Update-NcQosPolicyGroup             qos             {cluster}            {qos-policy-group-modify-iter}
Update-NcQosWorkload                qos             {cluster}            {qos-workload-modify-iter}

 

This is useful to quick show which API the cmdlet's are associated with and what has been depreciated.

 

/matt

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

mbeattie
2,908 Views

Hi Noel,

 

The command is "qos policy-group create" EG:

 

cluster1> qos policy-group create -policy-group policy1 -vserver vserver1 -max-throughput 10GB

 

The cmdlet is "Get-NcQosPolicyGroup" EG:


PS C:\> Get-NcQosPolicyGroup -Vserver vserver

PolicyGroup                                          MaxThroughput PolicyGroupClass     Vserver
-----------                                          ------------- ----------------     -------
policy1                                              10GB/s        user_defined         vserver1

 

Assume you need WFA command to select a policy policy group to apply to a vserver?

 

/matt

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.
Public