<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: OnTAP API - Can't seem to figure out how to show/list all VIF's in ONTAP Discussions</title>
    <link>https://community.netapp.com/t5/ONTAP-Discussions/OnTAP-API-Can-t-seem-to-figure-out-how-to-show-list-all-VIF-s/m-p/135700#M29809</link>
    <description>&lt;P&gt;Maybe this ruby implementation can help you:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;def get_data_interfaces(primary_or_secondary,protocol)&lt;BR /&gt;data_interfaces=[]&lt;/P&gt;&lt;P&gt;xcommand = NaElement.new("net-interface-get-iter")&lt;BR /&gt;netattribs_desired = NaElement.new("desired-attributes")&lt;BR /&gt;interfaceinfo_desired = NaElement.new("net-interface-info")&lt;BR /&gt;vserver_name_desired = NaElement.new("vserver")&lt;BR /&gt;dataprotocols_desired = NaElement.new("data-protocols")&lt;/P&gt;&lt;P&gt;dataprotocols_array_desired = NaElement.new("data-protocol")&lt;BR /&gt;dataprotocols_desired.child_add(dataprotocols_array_desired)&lt;/P&gt;&lt;P&gt;administrativestatus_desired = NaElement.new("administrative-status")&lt;/P&gt;&lt;P&gt;interfaceinfo_desired.child_add(vserver_name_desired)&lt;BR /&gt;interfaceinfo_desired.child_add(dataprotocols_desired)&lt;BR /&gt;interfaceinfo_desired.child_add(administrativestatus_desired)&lt;/P&gt;&lt;P&gt;netattribs_desired.child_add(interfaceinfo_desired)&lt;/P&gt;&lt;P&gt;netattribs_query = NaElement.new("query")&lt;BR /&gt;interfaceinfo_query = NaElement.new("net-interface-info")&lt;BR /&gt;&lt;BR /&gt;svm = ""&lt;BR /&gt;if primary_or_secondary.eql?("primary") then&lt;BR /&gt;svm = @primary_svm&lt;BR /&gt;else&lt;BR /&gt;svm = @secondary_svm&lt;BR /&gt;end&lt;/P&gt;&lt;P&gt;interfaceinfo_query.child_add_string("vserver",svm)&lt;/P&gt;&lt;P&gt;dataprotocols_query = NaElement.new("data-protocols")&lt;BR /&gt;dataprotocols_query.child_add_string("data-protocol",protocol)&lt;BR /&gt;interfaceinfo_query.child_add(dataprotocols_query)&lt;/P&gt;&lt;P&gt;netattribs_query.child_add(interfaceinfo_query)&lt;/P&gt;&lt;P&gt;xcommand.child_add(netattribs_desired)&lt;BR /&gt;xcommand.child_add(netattribs_query)&lt;/P&gt;&lt;P&gt;output = @connection.invoke_elem(xcommand)&lt;BR /&gt;if (output.results_status() == "failed") then&lt;BR /&gt;@logger.fatal "#{@config_name}: Unable to connect to #{svm} for getting data interfaces: #{output.results_reason()}"&lt;BR /&gt;return nil&lt;BR /&gt;end&lt;/P&gt;&lt;P&gt;result_count = output.child_get_int("num-records")&lt;/P&gt;&lt;P&gt;if result_count&amp;gt;0 then&lt;BR /&gt;info_interfaces = output.children_get()&lt;BR /&gt;info_interfaces.each { |interface_element_info|&lt;BR /&gt;if interface_element_info.class.name.eql?("NaElement") then&lt;BR /&gt;interface_info = interface_element_info.children_get()&lt;BR /&gt;interface_info.each{|interface|&lt;BR /&gt;data_interface = Hash.new&lt;BR /&gt;data_interface["interface-name"] = interface.child_get_string("interface-name")&lt;BR /&gt;data_interface["administrative-status"] = interface.child_get_string("administrative-status")&lt;BR /&gt;data_interface["data-protocol"] = protocol&lt;BR /&gt;data_interfaces.push(data_interface)&lt;BR /&gt;}&lt;BR /&gt;end&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;end # result_count&amp;gt;0 then&lt;BR /&gt;@logger.info "#{@config_name}: Retrieved data interfaces from #{svm} (#{primary_or_secondary}): #{data_interfaces.inspect}"&lt;BR /&gt;return data_interfaces&lt;BR /&gt;end # get_data_interfaces(primary_or_secondary)&lt;/P&gt;</description>
    <pubDate>Tue, 31 Oct 2017 13:27:36 GMT</pubDate>
    <dc:creator>AKOS_KUCZI</dc:creator>
    <dc:date>2017-10-31T13:27:36Z</dc:date>
    <item>
      <title>OnTAP API - Can't seem to figure out how to show/list all VIF's</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/OnTAP-API-Can-t-seem-to-figure-out-how-to-show-list-all-VIF-s/m-p/135692#M29806</link>
      <description>&lt;P&gt;Hello Community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First time posting, so hopefully its not a dumb question.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've looked up and down the OnTAP API but cannot figure out a way to list and identify all VIF's (virtual interfaces).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The CLI makes it incredibly easy, but I can't figure out how to get the relavent info via the API.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 14:25:32 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/OnTAP-API-Can-t-seem-to-figure-out-how-to-show-list-all-VIF-s/m-p/135692#M29806</guid>
      <dc:creator>akitsen</dc:creator>
      <dc:date>2025-06-04T14:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: OnTAP API - Can't seem to figure out how to show/list all VIF's</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/OnTAP-API-Can-t-seem-to-figure-out-how-to-show-list-all-VIF-s/m-p/135700#M29809</link>
      <description>&lt;P&gt;Maybe this ruby implementation can help you:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;def get_data_interfaces(primary_or_secondary,protocol)&lt;BR /&gt;data_interfaces=[]&lt;/P&gt;&lt;P&gt;xcommand = NaElement.new("net-interface-get-iter")&lt;BR /&gt;netattribs_desired = NaElement.new("desired-attributes")&lt;BR /&gt;interfaceinfo_desired = NaElement.new("net-interface-info")&lt;BR /&gt;vserver_name_desired = NaElement.new("vserver")&lt;BR /&gt;dataprotocols_desired = NaElement.new("data-protocols")&lt;/P&gt;&lt;P&gt;dataprotocols_array_desired = NaElement.new("data-protocol")&lt;BR /&gt;dataprotocols_desired.child_add(dataprotocols_array_desired)&lt;/P&gt;&lt;P&gt;administrativestatus_desired = NaElement.new("administrative-status")&lt;/P&gt;&lt;P&gt;interfaceinfo_desired.child_add(vserver_name_desired)&lt;BR /&gt;interfaceinfo_desired.child_add(dataprotocols_desired)&lt;BR /&gt;interfaceinfo_desired.child_add(administrativestatus_desired)&lt;/P&gt;&lt;P&gt;netattribs_desired.child_add(interfaceinfo_desired)&lt;/P&gt;&lt;P&gt;netattribs_query = NaElement.new("query")&lt;BR /&gt;interfaceinfo_query = NaElement.new("net-interface-info")&lt;BR /&gt;&lt;BR /&gt;svm = ""&lt;BR /&gt;if primary_or_secondary.eql?("primary") then&lt;BR /&gt;svm = @primary_svm&lt;BR /&gt;else&lt;BR /&gt;svm = @secondary_svm&lt;BR /&gt;end&lt;/P&gt;&lt;P&gt;interfaceinfo_query.child_add_string("vserver",svm)&lt;/P&gt;&lt;P&gt;dataprotocols_query = NaElement.new("data-protocols")&lt;BR /&gt;dataprotocols_query.child_add_string("data-protocol",protocol)&lt;BR /&gt;interfaceinfo_query.child_add(dataprotocols_query)&lt;/P&gt;&lt;P&gt;netattribs_query.child_add(interfaceinfo_query)&lt;/P&gt;&lt;P&gt;xcommand.child_add(netattribs_desired)&lt;BR /&gt;xcommand.child_add(netattribs_query)&lt;/P&gt;&lt;P&gt;output = @connection.invoke_elem(xcommand)&lt;BR /&gt;if (output.results_status() == "failed") then&lt;BR /&gt;@logger.fatal "#{@config_name}: Unable to connect to #{svm} for getting data interfaces: #{output.results_reason()}"&lt;BR /&gt;return nil&lt;BR /&gt;end&lt;/P&gt;&lt;P&gt;result_count = output.child_get_int("num-records")&lt;/P&gt;&lt;P&gt;if result_count&amp;gt;0 then&lt;BR /&gt;info_interfaces = output.children_get()&lt;BR /&gt;info_interfaces.each { |interface_element_info|&lt;BR /&gt;if interface_element_info.class.name.eql?("NaElement") then&lt;BR /&gt;interface_info = interface_element_info.children_get()&lt;BR /&gt;interface_info.each{|interface|&lt;BR /&gt;data_interface = Hash.new&lt;BR /&gt;data_interface["interface-name"] = interface.child_get_string("interface-name")&lt;BR /&gt;data_interface["administrative-status"] = interface.child_get_string("administrative-status")&lt;BR /&gt;data_interface["data-protocol"] = protocol&lt;BR /&gt;data_interfaces.push(data_interface)&lt;BR /&gt;}&lt;BR /&gt;end&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;end # result_count&amp;gt;0 then&lt;BR /&gt;@logger.info "#{@config_name}: Retrieved data interfaces from #{svm} (#{primary_or_secondary}): #{data_interfaces.inspect}"&lt;BR /&gt;return data_interfaces&lt;BR /&gt;end # get_data_interfaces(primary_or_secondary)&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2017 13:27:36 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/OnTAP-API-Can-t-seem-to-figure-out-how-to-show-list-all-VIF-s/m-p/135700#M29809</guid>
      <dc:creator>AKOS_KUCZI</dc:creator>
      <dc:date>2017-10-31T13:27:36Z</dc:date>
    </item>
    <item>
      <title>Re: OnTAP API - Can't seem to figure out how to show/list all VIF's</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/OnTAP-API-Can-t-seem-to-figure-out-how-to-show-list-all-VIF-s/m-p/135702#M29810</link>
      <description>&lt;P&gt;Well, with clustered ONTAP, you would use the&amp;nbsp;net-port-ifgrp-get API (if you're using PowerShell, use the&amp;nbsp;Get-NcNetPortIfgrp cmdlet).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For 7-mode, I'm not sure...I don't have any 7-mode systems to test with.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2017 14:04:20 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/OnTAP-API-Can-t-seem-to-figure-out-how-to-show-list-all-VIF-s/m-p/135702#M29810</guid>
      <dc:creator>asulliva</dc:creator>
      <dc:date>2017-10-31T14:04:20Z</dc:date>
    </item>
    <item>
      <title>Re: OnTAP API - Can't seem to figure out how to show/list all VIF's</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/OnTAP-API-Can-t-seem-to-figure-out-how-to-show-list-all-VIF-s/m-p/135704#M29812</link>
      <description>&lt;P&gt;If you don't have to use the API, have you considered creating a user account on the filer that uses ssh keys for authentication?&lt;/P&gt;&lt;P&gt;You could then do someting like&lt;/P&gt;&lt;P&gt;ssh user@filer net int show ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2017 15:02:26 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/OnTAP-API-Can-t-seem-to-figure-out-how-to-show-list-all-VIF-s/m-p/135704#M29812</guid>
      <dc:creator>MKELLYSCSC</dc:creator>
      <dc:date>2017-10-31T15:02:26Z</dc:date>
    </item>
    <item>
      <title>Re: OnTAP API - Can't seem to figure out how to show/list all VIF's</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/OnTAP-API-Can-t-seem-to-figure-out-how-to-show-list-all-VIF-s/m-p/135705#M29813</link>
      <description>&lt;P&gt;For one reason I don't like using ssh, because output of cli can be changed release by release&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2017 15:13:52 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/OnTAP-API-Can-t-seem-to-figure-out-how-to-show-list-all-VIF-s/m-p/135705#M29813</guid>
      <dc:creator>AKOS_KUCZI</dc:creator>
      <dc:date>2017-10-31T15:13:52Z</dc:date>
    </item>
    <item>
      <title>Re: OnTAP API - Can't seem to figure out how to show/list all VIF's</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/OnTAP-API-Can-t-seem-to-figure-out-how-to-show-list-all-VIF-s/m-p/135707#M29814</link>
      <description>&lt;P&gt;Mainly don't want to use SSH because I want this as an automated process. Since I've got all my netapp monitoring all done via the API, I kind of want to keep it consistent.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2017 16:01:01 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/OnTAP-API-Can-t-seem-to-figure-out-how-to-show-list-all-VIF-s/m-p/135707#M29814</guid>
      <dc:creator>akitsen</dc:creator>
      <dc:date>2017-10-31T16:01:01Z</dc:date>
    </item>
    <item>
      <title>Re: OnTAP API - Can't seem to figure out how to show/list all VIF's</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/OnTAP-API-Can-t-seem-to-figure-out-how-to-show-list-all-VIF-s/m-p/135708#M29815</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm pretty sure I tried those endpoints... but I'll check again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'll let you know what I find.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2017 16:04:46 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/OnTAP-API-Can-t-seem-to-figure-out-how-to-show-list-all-VIF-s/m-p/135708#M29815</guid>
      <dc:creator>akitsen</dc:creator>
      <dc:date>2017-10-31T16:04:46Z</dc:date>
    </item>
  </channel>
</rss>

