Software Development Kit (SDK) and API Discussions

API for getting information about HA Pair

ALEX_BARANOV
4,135 Views

 

Is there any DATA ONTAP API for 7-Mode for getting information about HA Pair?

 

For example, I connected to NetApp 7-mode. How can I determine that this storage is one node of HA Pair?

How can I get another nodes of HA Pair ? Their IP addresses or DNS names?

 

Thank you!

1 ACCEPTED SOLUTION

madden
4,008 Views

Hi,

 

You can use the 'system-get-info' API which includes something like this in the result:

<partner-system-id>015172222998</partner-system-id>
<partner-system-name>sdt-fas1b</partner-system-name>

 

You can also use the 'cf-get-partner' API which has this in the results:

<partner>sdt-fas1b</partner>

 

I haven't see a way to find the IP addresses of the partner and I suspect there isn't one.  The best I can think of is to use the 'net-resolve' API passing the partner hostname to get the IP of it from the controller perspective.  That still gives no guarantee it will resolve, or resolve with an IP address that is reachable from the API caller machine, but is a start.


Good luck!

 

Chris Madden
Storage Architect, NetApp EMEA

 

 

View solution in original post

3 REPLIES 3

madden
4,009 Views

Hi,

 

You can use the 'system-get-info' API which includes something like this in the result:

<partner-system-id>015172222998</partner-system-id>
<partner-system-name>sdt-fas1b</partner-system-name>

 

You can also use the 'cf-get-partner' API which has this in the results:

<partner>sdt-fas1b</partner>

 

I haven't see a way to find the IP addresses of the partner and I suspect there isn't one.  The best I can think of is to use the 'net-resolve' API passing the partner hostname to get the IP of it from the controller perspective.  That still gives no guarantee it will resolve, or resolve with an IP address that is reachable from the API caller machine, but is a start.


Good luck!

 

Chris Madden
Storage Architect, NetApp EMEA

 

 

ALEX_BARANOV
3,956 Views

Is <cf-get-partner> API returns the same hostname that is in reply of command <system-get-info> in <system-info><system-name>?

 

So, e.g. I have connections to two NetApp nodes and can execute any ONTAP commands on them.  

I need to determine is they are HA pair.

 

I'll execute <cf-get-partner> on each of them.

And compare output of <cf-get-partner> and <system-get-info>?

Is it right?

 

madden
3,948 Views

Yes, that should work!

Public