Branches hosts mask exclude

General discussions and questions.
Post Reply
artem.lavilin
Posts: 10
Joined: Thu Apr 16, 2020 12:10 pm

Branches hosts mask exclude

Post by artem.lavilin »

Hello :) ! Can i change hosts_mask_exclude in branch params with json-request protocol?

Code: Select all

{
  'action': 
    {
      'type': 'branches', 
      'name': '/', 
      'params': 
        {
          'hosts_mask_exclude' : 'some_mask',
        }
    }
}
I got

Code: Select all

{u'info': {u'text': u'Invalid action.', u'kind': u'error'}}
User avatar
timurhai
Site Admin
Posts: 648
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: Branches hosts mask exclude

Post by timurhai »

Hi!

To see json actions, you can perform something from a GUI and look at WebGUI log, or AfWatch stdout.

Also, here is some examples:
https://github.com/CGRU/cgru/tree/master/examples/json

This is a good example on this topic:
https://github.com/CGRU/cgru/blob/maste ... arams.json

There is no "name" method to specify action node(s), use "ids" array or "mask" regular expression. In you case, you can just change "name" on "mask".
Also any action must have "user_name" and "host_name" fields (for now it is used for logging only, but later it designed for permissions).
Timur Hairulin
CGRU 3.0.0, Ubuntu 18.04 LTS, MS Windows 10 (clients only).
artem.lavilin
Posts: 10
Joined: Thu Apr 16, 2020 12:10 pm

Re: Branches hosts mask exclude

Post by artem.lavilin »

Nice! It's work, thank you! :)
Post Reply