Active IQ Unified Manager Discussions

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

dcornely1
6,074 Views

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
6,074 Views

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
6,074 Views

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
6,074 Views

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

dcornely1
6,074 Views

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
6,075 Views

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

dcornely1
6,074 Views

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
6,074 Views

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
6,074 Views

Awesome.  Glad to hear

Jeremy Goodrum, NetApp

The Pirate

Twitter: @virtpirate

Blog: www.virtpirate.com

Public