cancel
Showing results for 
Search instead for 
Did you mean: 

vTM -Adding a rule to a virtual server in disabled state

Highlighted
New Contributor

vTM -Adding a rule to a virtual server in disabled state

Hi,

 

Just wondering is there a way to add a rule to a virtual server in a disabled state initially? In various pieces of work we prep as much config as possible during office hours and only enable those configs out of hours. At the moment because the rule is enabled by default when added it means the out of hours support teams need to select the rule (we have a lot) and then add. If we could add in a default state (maybe as a optional tick box) we could do that as part of the prep work and all they need to do is tick the enable box out of hours.

 

I appreciate it's not that big of a deal but it would be a nice touch and make things a bit easier for the late night teams.

 

Thanks,

Stephen

3 REPLIES 3
Highlighted
Community Manager

Re: vTM -Adding a rule to a virtual server in disabled state

Using the GUI, rules will be automatically enabled when you add them to a virtual server.

 

However, using the REST API would give you more flexibilty, you could create a rule, associate with a virtual server, and enable/disable as needed. A really simple way to do this is to prefix the rule name with "/" in the REST API call.

 

For example, using API with this JSON object uploaded to VS endpoint will add rule "test" as enabled:

 

{
   "properties": {
      "basic": {
         "request_rules": [
            "some pre-existing rule",
            "test"
         ],
...
}

 

...and this is a JSON object uploaded to VS endpoint will add rule "test" as disabled:

{
   "properties": {
      "basic": {
         "request_rules": [
            "some pre-existing rule",
            "/test"
         ],
...
}

 

You could encapsulate the API calls in a Python script or other provisioning tool.

 

 

Highlighted
Community Manager

Re: vTM -Adding a rule to a virtual server in disabled state

>>> If we could add in a default state (maybe as a optional tick box)

>>> we could do that as part of the prep work and all they need to do is

>>> tick the enable box out of hours.

 

Thanks - I will pass that on to the team.

 

Highlighted
New Contributor

Re: vTM -Adding a rule to a virtual server in disabled state

Thanks @pwallace, will give this a rattle. And thanks for passing the GUI option onto the team.

 

Cheers,

Stephen