How to call Argonaut actions from FusionDirectory

In «Systems», in the «Actions» menu, you should see two submenus «Trigger action» and «Schedule action». In each of those you can choose between available actions you want to trigger or schedule on the selected systems (use the checkboxes).

These systems need to have a module able to handle this action for them, for instance argonaut-client properly configured and running for a reboot action, but it could also be OPSI for a windows station for instance. If argonaut server cannot find a proper module to handle the action you will get an error message.

If a schedule action fails you should be able to get the error message by looking into the deployment queue.

How to add a custom action to the menu

If you want to add an action to the list, for instance because you developed you own argonaut-server module or argonaut-client module, you need to add a class which extends argonautEventTypes and return a list of actions in the method get_event_types_list(). Here is an example:

<?php
class argonautEventCoolActions extends argonautEventTypes
{
  static protected function get_event_types_list()
  {
    return array(
      'MyModule.coolaction' => array(
        'name'  => _('Do something cool'),
        'img'   => 'geticon.php?context=status&icon=cool&size=16'
      ),
    );
  }
}

This class can be placed anywhere within FusionDirectory folder but the best may be to put it in plugins/addons/argonaut or in your own subfolder in there. You will need to run fusiondirectory-setup --update-cache before your class is recognized and your action show up in the list.

en/documentation/plugin/argonaut_plugin/how_to_call_argonaut_actions.txt · Last modified: 2017/10/31 10:32 (external edit)
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0