<?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 luck creating export-policy rules. in Software Development Kit (SDK) and API Discussions</title>
    <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/no-luck-creating-export-policy-rules/m-p/104735#M1466</link>
    <description>&lt;P&gt;I think the rule sections should look the same as the response to export-rule-get-iter&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;ro-rule&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;lt;security-flavor&amp;gt;any&amp;lt;/security-flavor&amp;gt;&lt;BR /&gt;&amp;lt;/ro-rule&amp;gt;&lt;/P&gt;</description>
    <pubDate>Fri, 08 May 2015 00:53:27 GMT</pubDate>
    <dc:creator>MIKEMWALK</dc:creator>
    <dc:date>2015-05-08T00:53:27Z</dc:date>
    <item>
      <title>no luck creating export-policy rules.</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/no-luck-creating-export-policy-rules/m-p/102269#M1422</link>
      <description>&lt;PRE&gt;xin = NaElement("export-rule-create")    
xin.child_add_string("policy-name", "Test")
xin.child_add_string("client-match", "0.0.0.0/0)

rwrule = NaElement("rw-rule")
secflavor = NaElement("security-flavor")
secflavor.child_add_string("flavor", "any")
rwrule.child_add(secflavor)
xin.child_add(rwrule)


rorule = NaElement("ro-rule")
secflavor = NaElement("security-flavor")
secflavor.child_add_string("flavor", "any")
rorule.child_add(secflavor)
xin.child_add(rorule)

out = s.invoke_elem(xin)
print out.results_reason()&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not having much luck creating rules for export policies with python. &amp;nbsp;The 8.3 API docs don't specifically define "flavor" for the child_add_string portion so I am basing that off of old docs, that is the only way I can get the script to actually execute. &amp;nbsp;I'm sure things are going wrong at the security-flavor portion but the error reason isnt much help....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The value "zapi field: ro-rule" is invalid for field "- &amp;lt;&amp;gt;"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The odd thing is, I dont get this error for the rw-rule.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jun 2025 04:46:11 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/no-luck-creating-export-policy-rules/m-p/102269#M1422</guid>
      <dc:creator>liesc</dc:creator>
      <dc:date>2025-06-05T04:46:11Z</dc:date>
    </item>
    <item>
      <title>Re: no luck creating export-policy rules.</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/no-luck-creating-export-policy-rules/m-p/104735#M1466</link>
      <description>&lt;P&gt;I think the rule sections should look the same as the response to export-rule-get-iter&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;ro-rule&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;lt;security-flavor&amp;gt;any&amp;lt;/security-flavor&amp;gt;&lt;BR /&gt;&amp;lt;/ro-rule&amp;gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 May 2015 00:53:27 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/no-luck-creating-export-policy-rules/m-p/104735#M1466</guid>
      <dc:creator>MIKEMWALK</dc:creator>
      <dc:date>2015-05-08T00:53:27Z</dc:date>
    </item>
  </channel>
</rss>

