<?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 NaServer.rb (ruby API) issue? in Software Development Kit (SDK) and API Discussions</title>
    <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/NaServer-rb-ruby-API-issue/m-p/70805#M627</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your prompt reply.&amp;nbsp; I'm looking forward to hearing the update.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Dec 2012 02:25:41 GMT</pubDate>
    <dc:creator>MOGURA_IIJ_AD_JP</dc:creator>
    <dc:date>2012-12-26T02:25:41Z</dc:date>
    <item>
      <title>NaServer.rb (ruby API) issue?</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/NaServer-rb-ruby-API-issue/m-p/70796#M625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(Please let me know the right place to discuss this kind of topic since I'm new to join this community site, thank you)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to use Ruby API NaServer.rb (and others), which are provided by NetApp Inc, to control NetApp server from our ruby-based application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When integrating this API to our app, some strange behavior happen on our unit-test.&amp;nbsp; After removing the portion which uses this API, there is no problem (but of course the app cannot work with NetApp server).&amp;nbsp; This is apparently something NetApp.rb side-effect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After our further investigation, we found that there is an issue in the NaServer.rb code as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; ...&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; require 'rexml/streamlistener'&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; include REXML&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Here&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; require 'stringio'&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; include StreamListener&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # and Here!&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These two 'include' lines above apparently wrong usage of ruby-lang because 'include' in ruby means to include the module into &lt;STRONG&gt;current namespace&lt;/STRONG&gt; so that above two include lines cause &lt;STRONG&gt;overwriting global methods by all of REXML and StreamListener methods&lt;/STRONG&gt;.&amp;nbsp; That's quite danger, I think.&amp;nbsp; Actually, ActionMailer (or Rspec?, sorry I foregot right now) "comment"&amp;nbsp; method is overwritten by this so our unit-test failed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually, in this case, 'include' is not necessary.&amp;nbsp; It should be OK to remove 'include' lines and rewriting lines which uses REXML as follows as one of example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; Document.parse_stream(xml_response, MyListener.new)&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp; |&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; V&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; REXML::Document.parse_stream(xml_response, MyListener.new)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; (NaServer.rb 284-th line as one of example)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could anyone update NaServer.rb?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2025 06:13:27 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/NaServer-rb-ruby-API-issue/m-p/70796#M625</guid>
      <dc:creator>MOGURA_IIJ_AD_JP</dc:creator>
      <dc:date>2025-06-05T06:13:27Z</dc:date>
    </item>
    <item>
      <title>Re: NaServer.rb (ruby API) issue?</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/NaServer-rb-ruby-API-issue/m-p/70801#M626</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;Thanks for your suggestion. &lt;/P&gt;&lt;P&gt;We will check if we can incorporate these changes in the upcoming releases of NMSDK (after thorough evaluation).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&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>Thu, 20 Dec 2012 18:16:29 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/NaServer-rb-ruby-API-issue/m-p/70801#M626</guid>
      <dc:creator>sens</dc:creator>
      <dc:date>2012-12-20T18:16:29Z</dc:date>
    </item>
    <item>
      <title>NaServer.rb (ruby API) issue?</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/NaServer-rb-ruby-API-issue/m-p/70805#M627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your prompt reply.&amp;nbsp; I'm looking forward to hearing the update.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Dec 2012 02:25:41 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/NaServer-rb-ruby-API-issue/m-p/70805#M627</guid>
      <dc:creator>MOGURA_IIJ_AD_JP</dc:creator>
      <dc:date>2012-12-26T02:25:41Z</dc:date>
    </item>
  </channel>
</rss>

