<?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: Existing export rule's indices get changed, if new rules are added with existing indices in Software Development Kit (SDK) and API Discussions</title>
    <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Existing-export-rule-s-indices-get-changed-if-new-rules-are-added-with-existing/m-p/127463#M2259</link>
    <description>&lt;P&gt;Thanks, Andrew. &amp;nbsp;I haven't used templates in any serious capacity. I'll check out your blog for details.&lt;/P&gt;</description>
    <pubDate>Fri, 27 Jan 2017 21:17:08 GMT</pubDate>
    <dc:creator>billyd</dc:creator>
    <dc:date>2017-01-27T21:17:08Z</dc:date>
    <item>
      <title>Existing export rule's indices get changed, if new rules are added with existing indices</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Existing-export-rule-s-indices-get-changed-if-new-rules-are-added-with-existing/m-p/127356#M2252</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently I am experimenting with export rules inside an export policy. The behavior I saw was that, if I add a new rule with an index that has already existed in the rule list, then the existing rules' indices could get changed. For example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Rule list before addition:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Index Client-Match Protocol ...&lt;/P&gt;&lt;P&gt;1 &amp;nbsp; &amp;nbsp; &amp;nbsp;10.10.10.10 &amp;nbsp;NFS...&lt;/P&gt;&lt;P&gt;2 &amp;nbsp; &amp;nbsp; &amp;nbsp;20.20.20.20 &amp;nbsp;CIFS...&lt;/P&gt;&lt;P&gt;3 &amp;nbsp; &amp;nbsp; &amp;nbsp;30.30.30.30 &amp;nbsp;NFS3...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I add a new rule, "1 40.40.40.40 NFS...", then the rule list will look like this:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1 &amp;nbsp; &amp;nbsp; &amp;nbsp;40.40.40.40 &amp;nbsp;NFS...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;2 &amp;nbsp; &amp;nbsp; &amp;nbsp;10.10.10.10 &amp;nbsp;NFS...&lt;/P&gt;&lt;P&gt;3 &amp;nbsp; &amp;nbsp; &amp;nbsp;20.20.20.20 &amp;nbsp;CIFS...&lt;/P&gt;&lt;P&gt;4 &amp;nbsp; &amp;nbsp; &amp;nbsp;30.30.30.30 &amp;nbsp;NFS3...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this behavior expected? Is there any way to disable such behavior, and just fail the addition in the first place?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is because it makes it really hard to track and maintain all the existing rules, especially the API "export-rule-destroy" only takes an index in order to remove a rule.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In addition, is there any mechanism to globally lock an export policy? Basically we want the behavior to be that after a policy is locked, all modification to that policy will fail, until it is released.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Zheng&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 16:09:24 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Existing-export-rule-s-indices-get-changed-if-new-rules-are-added-with-existing/m-p/127356#M2252</guid>
      <dc:creator>ZhengCai</dc:creator>
      <dc:date>2025-06-04T16:09:24Z</dc:date>
    </item>
    <item>
      <title>Re: Existing export rule's indices get changed, if new rules are added with existing indices</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Existing-export-rule-s-indices-get-changed-if-new-rules-are-added-with-existing/m-p/127391#M2253</link>
      <description>&lt;P&gt;You didn't say what version of ONTAP you're using but for as long as I can remember, yes, this is the expected behavior.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From the Clustered Data ONTAP® 8.3 Commands: Manual Page Reference, page 2353:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[-ruleindex ] - Rule Index This optional parameter specifies the index number of the export rule that you want to create. If you specify an index number that already matches a rule, the index number of the existing rule is incremented, as are the index numbers of all subsequent rules, either to the end of the list or to an open space in the list. If you do not specify an index number, the new rule is placed at the end of the policy's list.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;----&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any particular reason you're specifying the index number? &amp;nbsp;Are you wanting it to replace the rule at the specified index?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2017 16:55:17 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Existing-export-rule-s-indices-get-changed-if-new-rules-are-added-with-existing/m-p/127391#M2253</guid>
      <dc:creator>wh_slayer</dc:creator>
      <dc:date>2017-01-26T16:55:17Z</dc:date>
    </item>
    <item>
      <title>Re: Existing export rule's indices get changed, if new rules are added with existing indices</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Existing-export-rule-s-indices-get-changed-if-new-rules-are-added-with-existing/m-p/127404#M2254</link>
      <description>&lt;P&gt;Thanks a lot for the info, and currently I am using the ONTAP 9.0 API.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The reason I need the index number is that, for a backup task I need to temporarily add a rule to the policy. And after the task is done, I want to remove the rule so that the policy will stay clean.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now that because the index could be changed by someone else concurrently and there is no locking mechanism, I could end up removing a wrong rule at the end.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A concrete example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At beginning of the task, I added rule foo&amp;nbsp;with index 10.&lt;/P&gt;&lt;P&gt;At the end of the task, to be safe, I query again and find out that the rule foo is still at index 10, then I send out the API call to remove index 10.&lt;/P&gt;&lt;P&gt;However, at the same time before the API call arrives, another admin accidently add another rule bar with the same index 10, and rule foo will get a new index 11.&lt;/P&gt;&lt;P&gt;Finally, my API call will actually remove rule bar, which is wrong.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Actually, you can also reproduce this by concurrently having two admin UI connections.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems this cannot be solved given the current export rule behavior. Is my understanding right?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again,&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2017 23:47:23 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Existing-export-rule-s-indices-get-changed-if-new-rules-are-added-with-existing/m-p/127404#M2254</guid>
      <dc:creator>ZhengCai</dc:creator>
      <dc:date>2017-01-26T23:47:23Z</dc:date>
    </item>
    <item>
      <title>Re: Existing export rule's indices get changed, if new rules are added with existing indices</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Existing-export-rule-s-indices-get-changed-if-new-rules-are-added-with-existing/m-p/127405#M2255</link>
      <description>&lt;P&gt;Hello ZhengCai,&lt;/P&gt;&lt;DIV class="lia-quilt-column lia-quilt-column-02 lia-quilt-column-left lia-quilt-column-main-left"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="lia-quilt-column lia-quilt-column-22 lia-quilt-column-right lia-quilt-column-main-right"&gt;&lt;DIV class="lia-quilt-column-alley lia-quilt-column-alley-right"&gt;&lt;DIV class="lia-message-author-username lia-component-user-name"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-New-Contributor"&gt;Have you taken a look at the powershell APIs?&amp;nbsp; I was able to delete a specific rule based on the clientmatch name as opposed to deleting it based on the rule index number.&amp;nbsp; Here's an example:&lt;A href="https://community.netapp.com/t5/user/viewprofilepage/user-id/53591" target="_self"&gt;&lt;SPAN class="login-bold"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-message-author-username lia-component-user-name"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="lia-message-author-username lia-component-user-name"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-New-Contributor"&gt;PS C:\Users\billyd&amp;gt; Get-NcExportRule -Policy expol_v_script_test&lt;BR /&gt;&lt;BR /&gt;PolicyName&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; RuleIndex&amp;nbsp;&amp;nbsp;&amp;nbsp; ClientMatch&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Protocol&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RoRule&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RwRule&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Vserver&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;&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;&lt;BR /&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;&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; -------&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;&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;&lt;BR /&gt;expol_v_script_test&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; test&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {nfs}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {sys}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {sys}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; vserver1&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;&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;&lt;BR /&gt;expol_v_script_test&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; linux_mgmt&amp;nbsp;&amp;nbsp;&amp;nbsp; {any}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {sys}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {sys}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; vserver1&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;&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;&lt;BR /&gt;expol_v_script_test&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 192.168.50.44&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {nfs}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {sys}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {sys}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; vserver1&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;&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;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;PS C:\Users\billyd&amp;gt; get-ncexportrule -Policy expol_v_script_test | ? {$_.ClientMatch -like 'test'} | Remove-NcExportRule -Confirm:$false&lt;BR /&gt;&lt;BR /&gt;PS C:\Users\billyd&amp;gt; Get-NcExportRule -Policy expol_v_script_test&lt;BR /&gt;&lt;BR /&gt;PolicyName&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; RuleIndex&amp;nbsp;&amp;nbsp;&amp;nbsp; ClientMatch&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Protocol&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RoRule&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RwRule&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Vserver&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;&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;&lt;BR /&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;&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; -------&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;&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;&lt;BR /&gt;expol_v_script_test&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; linux_mgmt&amp;nbsp;&amp;nbsp;&amp;nbsp; {any}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {sys}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {sys}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; vserver1&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;&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;&lt;BR /&gt;expol_v_script_test&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 192.168.50.44&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {nfs}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {sys}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {sys}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; vserver1&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;&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;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 27 Jan 2017 01:29:40 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Existing-export-rule-s-indices-get-changed-if-new-rules-are-added-with-existing/m-p/127405#M2255</guid>
      <dc:creator>billyd</dc:creator>
      <dc:date>2017-01-27T01:29:40Z</dc:date>
    </item>
    <item>
      <title>Re: Existing export rule's indices get changed, if new rules are added with existing indices</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Existing-export-rule-s-indices-get-changed-if-new-rules-are-added-with-existing/m-p/127415#M2256</link>
      <description>Either there is API to do it, in which case it can be done from every language, or PowerShell cmdlet internally resolves rule number and has the same race condition.</description>
      <pubDate>Fri, 27 Jan 2017 07:26:32 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Existing-export-rule-s-indices-get-changed-if-new-rules-are-added-with-existing/m-p/127415#M2256</guid>
      <dc:creator>aborzenkov</dc:creator>
      <dc:date>2017-01-27T07:26:32Z</dc:date>
    </item>
    <item>
      <title>Re: Existing export rule's indices get changed, if new rules are added with existing indices</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Existing-export-rule-s-indices-get-changed-if-new-rules-are-added-with-existing/m-p/127447#M2257</link>
      <description>&lt;P&gt;The API does have a query parameter which you can use to filter the result from any language. &amp;nbsp;This is slightly different than what's happening in the PowerShell you showed...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;# this will return all rules to the client, and the client will do Where-Object matching based
# on the sepcified attribute
Get-NcExportRule -Policy expol_v_script_test | ?{ $_.ClientMatch -like 'test' }

# this will perform filtering on the ONTAP side, returning only records which match
Get-NcExportRule -Query @{ PolicyName = 'expol_v_script_test'; ClientMatch = '*test*' }&lt;/PRE&gt;&lt;P&gt;The former works fine, but can be slower, particularly if there are a large number of records returned. &amp;nbsp;I talked about this a bit &lt;A href="http://practical-admin.com/blog/netapp-powershell-toolkit-templates/" target="_self"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2017 17:23:08 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Existing-export-rule-s-indices-get-changed-if-new-rules-are-added-with-existing/m-p/127447#M2257</guid>
      <dc:creator>asulliva</dc:creator>
      <dc:date>2017-01-27T17:23:08Z</dc:date>
    </item>
    <item>
      <title>Re: Existing export rule's indices get changed, if new rules are added with existing indices</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Existing-export-rule-s-indices-get-changed-if-new-rules-are-added-with-existing/m-p/127455#M2258</link>
      <description>&lt;P&gt;Thanks a lot for all of the replies!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It looks to me that the ONTAP API only support removal by index:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&lt;STRONG&gt;export-rule-destroy&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;Delete an Export rule configuration.&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&lt;STRONG&gt;Input&amp;nbsp;Name &amp;nbsp; &amp;nbsp;Range &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Type &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;Description&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="p1"&gt;policy-name &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;export-policy-name &amp;nbsp; &amp;nbsp; &amp;nbsp;Export policy name.&lt;/P&gt;&lt;P class="p1"&gt;rule-index &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[0..2^32-1] &amp;nbsp;&amp;nbsp;integer &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;Export rule index.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If my guess is correct, the Powershell cmdlet might be first quering the rule with the filtering&amp;nbsp;attributes, and get the most-up-to-date&amp;nbsp;index of that rule. And then using that index to dispatch the removal. But the race condition still exists, because before the rule is actually deleted, the index might have already changed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If there is any way to remove the rule with out the need to query it first and then remove by index, that will be the best in my humble opinion (query and remove at the same time).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again for all the help.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2017 18:39:01 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Existing-export-rule-s-indices-get-changed-if-new-rules-are-added-with-existing/m-p/127455#M2258</guid>
      <dc:creator>ZhengCai</dc:creator>
      <dc:date>2017-01-27T18:39:01Z</dc:date>
    </item>
    <item>
      <title>Re: Existing export rule's indices get changed, if new rules are added with existing indices</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Existing-export-rule-s-indices-get-changed-if-new-rules-are-added-with-existing/m-p/127463#M2259</link>
      <description>&lt;P&gt;Thanks, Andrew. &amp;nbsp;I haven't used templates in any serious capacity. I'll check out your blog for details.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2017 21:17:08 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Existing-export-rule-s-indices-get-changed-if-new-rules-are-added-with-existing/m-p/127463#M2259</guid>
      <dc:creator>billyd</dc:creator>
      <dc:date>2017-01-27T21:17:08Z</dc:date>
    </item>
  </channel>
</rss>

