Software Development Kit (SDK) and API Discussions

SDK - Get Non-Root Aggregates

stephzylstra

Hi,

 

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?

 

Thanks!

3 REPLIES 3

Re: SDK - Get Non-Root Aggregates

AlexDawson

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). 

Re: SDK - Get Non-Root Aggregates

asulliva

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.

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

Re: SDK - Get Non-Root Aggregates

stephzylstra

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.

Earn Rewards for Your Review!
GPI Review Banner
All Community Forums
Public