'Adds a new action.
Add a new action if not already present, defaulting to standard
`CommandAction`, or specified Python module.
Parameters
name : str
The name of the action.
pythonModule : str, optional
Path to Python file which must contain `Action` class.
Default None, which means `CommandAction` is used.
initOpts : dict, optional
Options for Python Action, used as keyword arguments for
initialisation. Default None.
Raises
ValueError
If action name already exists.
RuntimeError
If external Python module does not have `Action` class
or does not implement necessary methods as per `ActionBase`
abstract class.'

def add(self, name, pythonModule=None, initOpts=None, reload=False):

    if (name in self._actions):
        if (not reload):
            raise ValueError(('Action    %s    already    exists' % name))
        action = self._actions[name]
        if hasattr(action, 'reload'):
            if hasattr(action, 'clearAllParams'):
                action.clearAllParams()
                self._reload_actions[name] = initOpts
            return
    if (pythonModule is None):
        action = CommandAction(self._jail, name)
    else:
        customActionModule = self._load_python_module(pythonModule)
        action = customActionModule.Action(self._jail, name, **initOpts)
    self._actions[name] = action
