Forum Discussion
stucky101_88485
Mar 03, 2013Nimbostratus
Brian
Thank you for your responses.
I confirmed 100% what you stated about rule order. It appears you have to append it and the error just isn't very clear about what it wants.
It appears there are really 2 kinds of priorities (order of listing in the gui and actual coded priority which overwrites the list order afaik)
What I don't understand is why the API cares the least in what order I add any of my rules considering that each rule could have a priority set within it which makes the listing order irrelevant.
I tested this and can confirm it: When I have 5 pre-existing rules and I add my maintenance rule with priority 100 it appends it. Yet the rule itself is actually set to p1.
A quick tmsh show ltm rule {rulename} confirms that the rule is at p1 eventhough it was inserted at p100 so in my mind the p100 just got replaced with a p1 no ?
So given that :
1. I _have_ to append the rule to the end of my rule stack
2. I can set any priority within the rule and it will win
I see no point in the API forcing me to set what appears to be an arbitrary number at rule association time.
As to your other suggestion I did think about that for a bit but I have some issues here:
1. If I remove the current rule set where do I save it ? I'd have to have a way to save state somewhere and then restore it. I assume you mean to save the entire b config on the unit and then restore it once maintenance is over ?
Seems a bit extreme in my opinion. I also wouldn't wanna save something to my desktop from where I'm running bigsuds so I'm a bit unclear how you'd approach that.
2. I simply feel uncomfi making any more changes than I have to especially being very new to icontrol and python so this doesn't feel like the right choice.
3. I don't see why my current solution of appending a P1-coded maint irule to a pre-existing list would not be ok. It works very well so far. In the gui it shows up last but it is reported as P1 under tmsh.
I mean once it's hit it redirects to another site anyway so the other 5 rules don't kick in to begin with so I couldn't care less about them while the site is in maintenance.
Do you see any issues that I'm not ?
thx