Effective December 3, NetApp adopts Microsoft’s Business-to-Customer (B2C) identity management to simplify and provide secure access to NetApp resources.
For accounts that did not pre-register (prior to Dec 3), access to your NetApp data may take up to 1 hour as your legacy NSS ID is synchronized to the new B2C identity.
To learn more, read the FAQ and watch the video.
Need assistance? Complete this form and select “Registration Issue” as the Feedback Category.

Active IQ Unified Manager Discussions

How to remove an existing export rule from an existing policy in CDOT?

dcornely1

Hello,

I downloaded the command from this post:

https://communities.netapp.com/docs/DOC-24335

But it does not work.  The command will return successful but it doesn't actually take any action.  Its got the inputs I'm after but the command just doesn't make any changes. I'm working my way through the cmdlets Get-NcExportRule & Remove-NcExportRule but I'm having trouble figuring out how I would reference the rule index for the Remove-NcExportRule cmdlet based on what Get-NcExportRule returns.  In my environment I would only have one clientmatch IP per policy so any match for that client in the named policy would have the correct index.

Thanks.

-Dave

1 ACCEPTED SOLUTION

goodrum

Ok, that is an easy change.  I ran into an issue where I duplicated rules (not a good practice but it was someone else's SVM) so I made the change.  Instead, Change the Remove Export Rule command definition to use the Search for option and leverage the attached Filter.

This will return the specific client match from the policy.  The Rule Index is returned

Jeremy Goodrum, NetApp

The Pirate

Twitter: @virtpirate

Blog: www.virtpirate.com

View solution in original post

7 REPLIES 7

goodrum

I literally built this yesterday for the new Pirate Pack - NAS Express Setup (coming soon to a download near you)

Disclaimer: I have tested this in my lab but it isn't fully packaged so you are getting a pre-release.  Let me know if you have any issues.

Jeremy Goodrum, NetApp

The Pirate

Twitter: @virtpirate

Blog: www.virtpirate.com

dcornely1

Hmm, not quite going to work for me.  See, I'm dealing with WFA in a web services way so I need WFA to be able to glean the rule index based on the client IP in a given policy.  There is no way the service calling WFA will know the rule index - it knows the cluster, vserver, export policy, & client IP only.  Given that in my environment there is only one rule for a given client IP per policy I though it would be easy for WFA to glean this but not sure yet...

goodrum

Ok, that is an easy change.  I ran into an issue where I duplicated rules (not a good practice but it was someone else's SVM) so I made the change.  Instead, Change the Remove Export Rule command definition to use the Search for option and leverage the attached Filter.

This will return the specific client match from the policy.  The Rule Index is returned

Jeremy Goodrum, NetApp

The Pirate

Twitter: @virtpirate

Blog: www.virtpirate.com

View solution in original post

dcornely1

Worked like a charm - had to figure out some of the reference variables but once I did that a successful test was had.  Thanks again!

goodrum

Awesome.  Glad to hear

Jeremy Goodrum, NetApp

The Pirate

Twitter: @virtpirate

Blog: www.virtpirate.com

dcornely1

Thanks Jeremy!  I had started down this path to and was creating a new filter when I saw your post here.  I'll give it a shot and let you know.

dcornely1

Wow!  So fast, thanks!  I've downloaded and will test shortly,   Thank you!

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public