2017-04-26 04:37 PM
I have used the ZAPI tool to generate the following XML:
<?xml version="1.0" encoding="UTF-8"?> <netapp xmlns="http://www.netapp.com/filer/admin" version="1.31"> <aggr-get-iter> <desired-attributes>...snipped for brevity...</desired-attributes> <query> <aggr-attributes> <aggr-raid-attributes> <is-root-aggregate>false</is-root-aggregate> </aggr-raid-attributes> </aggr-attributes> </query> </aggr-get-iter> </netapp>
Unfortunately, this still returns root aggregates (running against a CDOT 8.3.2P9 cluster). How can I get only non-root aggregates?
2017-04-26 05:44 PM
Not familiar with the API.. but have you tried looking for "ha_policy" of "cfo"? Only root aggregates have the ha_policy set to "cfo" (controller failover) - all others are sfo (storage failover).
2017-04-27 07:42 AM
Maybe check for aggr-raid-attributes -> has-local-root and aggr-raid-attributes -> has-partner-root to both be false. FWIW, your query works fine against my ONTAP 9.0 system.
2017-04-27 04:13 PM
Thanks for your suggestions, everyone.
Looks like it's actually an issue with the ZAPI tool - I can use the tool to generate the code, but if I try to execute it, it brings back the wrong results. If I copy the generated XML and run it outside of the tool, it works as expected.