<?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: Anyone successfully using the cifs-share-get-iter API? in Software Development Kit (SDK) and API Discussions</title>
    <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Anyone-successfully-using-the-cifs-share-get-iter-API/m-p/73678#M643</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ben,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many, many thanks for the solution. Glad to know it wasn't "user error" in this case but rather an SDK glitch.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Richard.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS: I won't show the horrible code I had to use as a work around!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Dec 2013 17:39:38 GMT</pubDate>
    <dc:creator>WCMNETAPP</dc:creator>
    <dc:date>2013-12-05T17:39:38Z</dc:date>
    <item>
      <title>Anyone successfully using the cifs-share-get-iter API?</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Anyone-successfully-using-the-cifs-share-get-iter-API/m-p/73664#M641</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 using the "cifs-share-get-iter" to read out various attributes of the CIFS shares we have on a cluster (running 8.2P4) BUT, for the life of me, I cannot see how to get hold of the items within the "share-properties" section. An example of the XML is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;cifs-share&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;lt;share-name&amp;gt;SOMESHARE&amp;lt;/share-name&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;lt;share-properties&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;cifs-share-properties&amp;gt;oplocks&amp;lt;/cifs-share-properties&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;cifs-share-properties&amp;gt;browsable&amp;lt;/cifs-share-properties&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;cifs-share-properties&amp;gt;changenotify&amp;lt;/cifs-share-properties&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;lt;/share-properties&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/cifs-share&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem seems to be that the child nodes of "share-properties" all have the same "name" (which I don't recall seeing in other "chapters" of the APIs). If I write some Python such as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for share in result.child_get('attributes-list').children_get():&lt;/P&gt;&lt;P&gt;&amp;nbsp; print share.sprintf()&lt;/P&gt;&lt;P&gt;&amp;nbsp; share_props = share.child_get('share-properties')&lt;/P&gt;&lt;P&gt;&amp;nbsp; for p in share_props.children_get():&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print p.sprintf()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then (given the above XML), I correctly iterate 3 times round the inner loop and the print statement does as you would expect. How though, do I grab the "value" of each property?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas, please, anyone?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Richard Hellier.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Dec 2013 22:35:18 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Anyone-successfully-using-the-cifs-share-get-iter-API/m-p/73664#M641</guid>
      <dc:creator>WCMNETAPP</dc:creator>
      <dc:date>2013-12-04T22:35:18Z</dc:date>
    </item>
    <item>
      <title>Re: Anyone successfully using the cifs-share-get-iter API?</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Anyone-successfully-using-the-cifs-share-get-iter-API/m-p/73669#M642</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Richard,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've run into the same problem. It's an oversight in the Python SDK. The only way to access the value is through the internal data structure of NaElement, like so:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13862575061493663" jivemacro_uid="_13862575061493663"&gt;&lt;P&gt;for p in share_props.children_get():&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; value = p.element['content']&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print value&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Ben&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Dec 2013 15:32:25 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Anyone-successfully-using-the-cifs-share-get-iter-API/m-p/73669#M642</guid>
      <dc:creator>zulanch</dc:creator>
      <dc:date>2013-12-05T15:32:25Z</dc:date>
    </item>
    <item>
      <title>Re: Anyone successfully using the cifs-share-get-iter API?</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Anyone-successfully-using-the-cifs-share-get-iter-API/m-p/73678#M643</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ben,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many, many thanks for the solution. Glad to know it wasn't "user error" in this case but rather an SDK glitch.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Richard.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS: I won't show the horrible code I had to use as a work around!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Dec 2013 17:39:38 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Anyone-successfully-using-the-cifs-share-get-iter-API/m-p/73678#M643</guid>
      <dc:creator>WCMNETAPP</dc:creator>
      <dc:date>2013-12-05T17:39:38Z</dc:date>
    </item>
    <item>
      <title>Re: Anyone successfully using the cifs-share-get-iter API?</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Anyone-successfully-using-the-cifs-share-get-iter-API/m-p/115625#M1761</link>
      <description>&lt;P&gt;Thankyou...Was really struggling to get this issue resolved.&lt;/P&gt;&lt;P&gt;Much appreciated &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2016 04:41:10 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Anyone-successfully-using-the-cifs-share-get-iter-API/m-p/115625#M1761</guid>
      <dc:creator>rohancmr</dc:creator>
      <dc:date>2016-02-11T04:41:10Z</dc:date>
    </item>
  </channel>
</rss>

