Executes the given action. Raise a KeyError on unkown actions.
13900
def call_action(self, service_name, action_name, **kwargs):
        """"""
        action = self.services[service_name].actions[action_name]
        return action.execute(**kwargs)
482452
def execute(self, elem_list):
        
        if self.condition.is_true(elem_list):
            return self.action.act(elem_list)
        else:
            return elem_list
734525
def check(self, action, version=None):
        
        if action not in self._by_action:
            raise APIError(400, "InvalidAction", "The action %s is not valid "
                           "for this web service." % action)
        by_version = self._by_action[action]
        if None not in by_version:
            # There's no catch-all method, let's try the version-specific one
            if version not in by_version:
                raise APIError(400, "InvalidVersion", "Invalid API version.")
54016
def performAction(self, action):
        
        self._lastAction = []

        # Markups chosen for each generator.
        actions = self._allActions[action]

        n = self.numOffbids * len(self.generators)
        markups = actions[:n]
        withholds = actions[n:]

#        print "ALL ACTIONS:", self._allActions
#        print "ACTIONS:", markups, withholds

        self._offbid(markups, withholds)
352693
def act(self, action):
    """"""
    if action and action.ListFields():  # Skip no-ops.
      return self.actions(sc_pb.RequestAction(actions=[action]))
902175
def execute(self, method, args, ref):
        

        response = {'result': None, 'error': None, 'ref': ref}
        fun = self.methods.get(method)
        if not fun:
            response['error'] = 'Method `{}` not found'.format(method)
        else:
            try:
                response['result'] = fun(*args)
            except Exception as exception:
                logging.error(exception, exc_info=1)
                response['error'] = str(exception)
        return response
699680
def execute(self, args):
        """"""
        _run_atstart()
        hook_name = os.path.basename(args[0])
        if hook_name in self._hooks:
            try:
                self._hooks[hook_name]()
            except SystemExit as x:
                if x.code is None or x.code == 0:
                    _run_atexit()
                raise
            _run_atexit()
        else:
            raise UnregisteredHookError(hook_name)
360518
def run(self, request):
        
        if request.body.get('action_name'):
            return self._get_response_for_single_action(request.body.get('action_name'))

        return self._get_response_for_all_actions()
587908
def SetAction(self, action, **kws):
        ""
        if hasattr(action,'__call__'):
            self.__action = Closure(action, **kws)
1183663
def run_action(self, feature, action,
                   run_if_error=False,
                   raise_exception=True):
        
        if len(self._error_dict[feature]) > 0 and not run_if_error:
            return

        error = None
        instance = self.features[feature]
        try:
            getattr(instance, action)()
        # catch a generic exception within a feature
        except Exception as e:
            e = sys.exc_info()[1]
            self.logger.info("An exception occurred with action %s in feature %s!" %
                             (action, feature))
            self.logger.debug("Exception", exc_info=sys.exc_info())
            error = str(e)
            self.log_feature_error(feature, str(e))
        # any error in a feature should fail immediately - unless it occurred
        # from the remove() method in which case continue the rest of the
        # feature removal from there
        if error is not None and raise_exception:
            exception_msg = "%s action failed for feature %s: %s" % (action, feature, error)
            if self.phase == PHASE.REMOVE:
                raise FormulaException(exception_msg)
            else:
                raise SprinterException(exception_msg)
        return error
1002410
public function _execute( $action, $params = array() ) 
	{
		if ( method_exists( $this, 'action_'.$action ) ) 
		{
			call_user_func( array( $this, 'action_'.$action ), $params );
		} 
		else 
		{
			CCCli::line( "There is no action {$action}.", 'red' );
		}
	}
881406
def execute
      return Strings.no_help_commands if @actions.empty?
      actions = @actions.map do |action|
        if action.description.to_s.empty?
          action.name
        else
          "#{action.name} # #{action.description}"
        end
      end
      Strings.help(actions.join("\n"))
    end
361730
def perform(action_name, container, **kwargs):
    
    cf = container_fabric()
    cf.call(action_name, container, **kwargs)
509722
def new_action(self, method='GET', **kwargs):
        
        if method not in self.methods:
            raise TypeError('{} not in valid method(s): {}.'.format(method, self.methods))
        return Action(self, method, **kwargs)
195430
def build_action(self, action):
        
        try:
            self.action = Action.from_string(action)
        except ValueError:
            raise

        return self
158025
def on_action(action):
    
    @wrapt.decorator
    @tornado.gen.coroutine
    def _execute(wrapped, instance, args, kwargs):
        return wrapped(*args, **kwargs)

    _execute.action = action
    return _execute
782995
protected void executeActions(TestContext context) {
        context.setVariable(indexName, String.valueOf(index));

        for (TestAction action: actions) {
            setActiveAction(action);
            action.execute(context);
        }
    }