'Process flags and yaml files and make a call to the given path.
The \'start_module_version\' and \'stop_module_version\' actions are extremely
similar in how they process input to appcfg.py and only really differ in
what path they hit on the RPCServer.
Args:
action_path: Path on the RPCServer to send the call to.'

def _ModuleAction(self, action_path):

    modules_to_process = []
    if (not self.args):
        if (not (self.options.app_id and self.options.module and self.options.version)):
            _PrintErrorAndExit(self.error_fh, 'Expected    at    least    one    <file>    argument    or    the    --application,    --module    and    --version    flags    to    be    set.')
        else:
            modules_to_process.append((self.options.app_id, self.options.module, self.options.version))
    else:
        if self.options.module:
            _PrintErrorAndExit(self.error_fh, 'You    may    not    specify    a    <file>    argument    with    the    --module    flag.')
        module_yamls = self._ParseAndValidateModuleYamls(self.args)
        for serv_yaml in module_yamls:
            app_id = serv_yaml.application
            modules_to_process.append(((self.options.app_id or serv_yaml.application), (serv_yaml.module or appinfo.DEFAULT_MODULE), (self.options.version or serv_yaml.version)))
    rpcserver = self._GetRpcServer()
    for (app_id, module, version) in modules_to_process:
        response = rpcserver.Send(action_path, app_id=app_id, module=module, version=version)
        print >>self.out_fh, response
