<?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: No elements in API request - NetApp Manageability SDK 5.2.1R1 on RHEL 6 with Python 3.3.5 in Software Development Kit (SDK) and API Discussions</title>
    <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/No-elements-in-API-request-NetApp-Manageability-SDK-5-2-1R1-on-RHEL-6-with/m-p/58520#M518</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One problem that I can see with this script is in the line:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt; s = NaServer(storage, 5, 2)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;5, 2 &lt;/STRONG&gt;-&amp;gt; represents the major_version, minor_version of the Data ONTAP API version.&lt;/P&gt;&lt;P&gt;So, if the ONTAP API version is 1.17, major_version = 1 and minor_version = 17.&lt;/P&gt;&lt;P&gt;For all the ONTAP API versions released so far, major_version is always 1 (whereas in your script it is 5).&lt;/P&gt;&lt;P&gt;minor_version can be anything equal or lower than the actual API minor_version of target ONTAP system.&lt;/P&gt;&lt;P&gt;i.e. if the ONTAP API version is 1.17, the minor_version used in the NaServer constructor can be 17 or lower.&lt;/P&gt;&lt;P&gt;Thus it is safe to use major_version = 1 and minor_version = 0, when you are not sure of the actual ONTAP API version.&lt;/P&gt;&lt;P&gt;[If you want to use vfiler tunneling on 7-Mode ONTAP system, minimum version would be 1.7 and if want to use vserver tunneling on a Clustered ONTAP system, safe version would be 1.15].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thus I would request you to run the same script after modifying the NaServer constructor to:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt; s = NaServer(storage, 1, 0)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One more point, you can use the tool &lt;STRONG&gt;ZEDI &lt;/STRONG&gt;(&lt;STRONG&gt;ZE&lt;/STRONG&gt;xplore &lt;STRONG&gt;D&lt;/STRONG&gt;evelopment &lt;STRONG&gt;I&lt;/STRONG&gt;nterface) [&lt;STRONG&gt;zexplore.exe&lt;/STRONG&gt; or &lt;STRONG&gt;zexplore.jar&lt;/STRONG&gt;] to test if the connection to the target storage system is working fine. You can also generate Python code automatically for any given API using ZEDI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please feel free to get back to us if you need any assistance with this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sen.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 May 2014 07:13:48 GMT</pubDate>
    <dc:creator>sens</dc:creator>
    <dc:date>2014-05-14T07:13:48Z</dc:date>
    <item>
      <title>No elements in API request - NetApp Manageability SDK 5.2.1R1 on RHEL 6 with Python 3.3.5</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/No-elements-in-API-request-NetApp-Manageability-SDK-5-2-1R1-on-RHEL-6-with/m-p/58515#M517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm just getting started with the SDK on Python 3.3.&amp;nbsp; If I try to return anything from a filer using the SDK I get:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;Failed:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;No elements in API request&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This happens, for example, with the sample system_mode.py (that I have modified very slightly):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# $ID$&lt;BR /&gt;#&lt;BR /&gt;# system_mode.py&lt;BR /&gt;# This sample code prints the mode of the Storage system&lt;BR /&gt;# (7-Mode or Cluster-Mode)&lt;BR /&gt;#&lt;BR /&gt;# Copyright (c) 2011 NetApp, Inc. All rights reserved.&lt;BR /&gt;# Specifications subject to change without notice.&lt;BR /&gt;#&lt;BR /&gt;#============================================================&lt;BR /&gt;import sys&lt;BR /&gt;sys.path.append("/usr/local/bin/netapp-sdk/lib/python/NetApp")&lt;BR /&gt;from NaServer import *&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;storage = 'myfiler'&lt;BR /&gt;user = 'root'&lt;BR /&gt;password = 'mypassword'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;s = NaServer(storage, 5, 2)&lt;BR /&gt;s.set_admin_user(user, password)&lt;BR /&gt;output = s.invoke("system-get-version")&lt;/P&gt;&lt;P&gt;if(output.results_errno() != 0):&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; r = output.results_reason()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print("Failed: \n" + str(r))&lt;BR /&gt;else :&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; clustered = output.child_get_string("is-clustered")&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(clustered == "true"):&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print("The Storage System " + storage + " is in \"Cluster Mode\"\n")&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else :&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print("The Storage System " + storage + " is in \"7 Mode\"\n")&lt;/P&gt;&lt;P&gt;##############################################################&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[user@myserver]$ ./system_mode.py&lt;/P&gt;&lt;P&gt;Failed:&lt;/P&gt;&lt;P&gt;No elements in API request&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are there steps I need to perform on the filer itself to get this to work?&amp;nbsp; If I change the password in my script I do get an authentication error, so this does seem to be going through, I'm just not getting anything back.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2025 05:36:18 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/No-elements-in-API-request-NetApp-Manageability-SDK-5-2-1R1-on-RHEL-6-with/m-p/58515#M517</guid>
      <dc:creator>salalonde</dc:creator>
      <dc:date>2025-06-05T05:36:18Z</dc:date>
    </item>
    <item>
      <title>Re: No elements in API request - NetApp Manageability SDK 5.2.1R1 on RHEL 6 with Python 3.3.5</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/No-elements-in-API-request-NetApp-Manageability-SDK-5-2-1R1-on-RHEL-6-with/m-p/58520#M518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One problem that I can see with this script is in the line:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt; s = NaServer(storage, 5, 2)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;5, 2 &lt;/STRONG&gt;-&amp;gt; represents the major_version, minor_version of the Data ONTAP API version.&lt;/P&gt;&lt;P&gt;So, if the ONTAP API version is 1.17, major_version = 1 and minor_version = 17.&lt;/P&gt;&lt;P&gt;For all the ONTAP API versions released so far, major_version is always 1 (whereas in your script it is 5).&lt;/P&gt;&lt;P&gt;minor_version can be anything equal or lower than the actual API minor_version of target ONTAP system.&lt;/P&gt;&lt;P&gt;i.e. if the ONTAP API version is 1.17, the minor_version used in the NaServer constructor can be 17 or lower.&lt;/P&gt;&lt;P&gt;Thus it is safe to use major_version = 1 and minor_version = 0, when you are not sure of the actual ONTAP API version.&lt;/P&gt;&lt;P&gt;[If you want to use vfiler tunneling on 7-Mode ONTAP system, minimum version would be 1.7 and if want to use vserver tunneling on a Clustered ONTAP system, safe version would be 1.15].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thus I would request you to run the same script after modifying the NaServer constructor to:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt; s = NaServer(storage, 1, 0)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One more point, you can use the tool &lt;STRONG&gt;ZEDI &lt;/STRONG&gt;(&lt;STRONG&gt;ZE&lt;/STRONG&gt;xplore &lt;STRONG&gt;D&lt;/STRONG&gt;evelopment &lt;STRONG&gt;I&lt;/STRONG&gt;nterface) [&lt;STRONG&gt;zexplore.exe&lt;/STRONG&gt; or &lt;STRONG&gt;zexplore.jar&lt;/STRONG&gt;] to test if the connection to the target storage system is working fine. You can also generate Python code automatically for any given API using ZEDI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please feel free to get back to us if you need any assistance with this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sen.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 May 2014 07:13:48 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/No-elements-in-API-request-NetApp-Manageability-SDK-5-2-1R1-on-RHEL-6-with/m-p/58520#M518</guid>
      <dc:creator>sens</dc:creator>
      <dc:date>2014-05-14T07:13:48Z</dc:date>
    </item>
  </channel>
</rss>

