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 » Mon Jun 29, 2020 11:41 am

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: 581
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: Branches hosts mask exclude

Post by timurhai » Mon Jun 29, 2020 12:17 pm

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 2.4.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 » Mon Jun 29, 2020 12:36 pm

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

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests