Accepted Solution

Raid TEC get-aggr-iter

I seem to have run into a problem where I can't scan any raid tec aggregates using NMSDK.  The call I'm making against the cluster goes like this:


NaServer server = net NaServer("mycluster");

naServer.setApiVersion(1, 100);




naServer.setAdminUser("myuser", "mypassword");


NaElement request = new NaElement("aggr-get-iter");

response = server.invokeElem(request);



And it works fine; except it has no output for any aggregate that's raid-tec.  Has anyone run into this?


I've upgrade to manageontap-5.6.jar which is the latest I could find with the same problem.  I've also tried different versions of setApiVersion, all with the same problem.

Re: Raid TEC get-aggr-iter

What version of ONTAP are you using?


For what it's worth, I'm not having any trouble with PowerShell (which uses the .NET SDK) or Python.


Get-NcAggr -Query @{ AggrRaidAttributes = @{ RaidType = "raid_tec" } }



from NaServer import *

server = NaServer("my.cluster", 1, 100)
server.set_admin_user("admin", "password")

response = server.invoke("aggr-get-iter").child_get("attributes-list").children_get()

for a in response:
    print "%s uses %s" % (a.child_get_string("aggregate-name"), a.child_get('aggr-raid-attributes').child_get_string('raid-type'))

Have you looked at the raw ZAPI response to validate that nothing is being returned?



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

Re: Raid TEC get-aggr-iter

Super big thanks for the note back, and so quickly.  Given your success, you prompted me to try a couple of things, first using zedi, which showed the exact same problem, and to try more clusters.  I've got 3 with raid tec all running ontap 9.0P1.  Two of them fail, and one works just fine, so that's no good, however, it did lead me to the actual problem.  The raid tec aggregates are new, and on two clusters, they just so happen to be the 21st+ aggregates.  By default, aggr-get-iter returns only 20 aggregates.  I added a max-records and it's all good.


If anyone else happens to run into the problem, the solution is shown below:


request = new NaElement("aggr-get-iter");

request.addNewChild("max-records", "1000");

response = server.invokeElem(request);

Re: Raid TEC get-aggr-iter

I posted an example of using the -iter APIs with Python here if you're interested.  Hope that helps!



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