示例#1
0
    def _get_remote_action(self, action_paramaters):
        # remote script actions with entry_point don't make sense, user probably wanted to use
        # "remote-shell-script" action
        if self.entry_point:
            msg = (
                'Action "%s" specified "entry_point" attribute. Perhaps wanted to use '
                '"remote-shell-script" runner?' % (self.action_name)
            )
            raise Exception(msg)

        command = self.runner_parameters.get(RUNNER_COMMAND, None)
        env_vars = self._get_env_vars()
        return ParamikoRemoteCommandAction(
            self.action_name,
            str(self.liveaction_id),
            command,
            env_vars=env_vars,
            on_behalf_user=self._on_behalf_user,
            user=self._username,
            password=self._password,
            private_key=self._private_key,
            passphrase=self._passphrase,
            hosts=self._hosts,
            parallel=self._parallel,
            sudo=self._sudo,
            sudo_password=self._sudo_password,
            timeout=self._timeout,
            cwd=self._cwd,
        )
 def _get_test_command_action(command):
     cmd_action = ParamikoRemoteCommandAction('fixtures.remote_command',
                                              '55ce39d532ed3543aecbe71d',
                                              command=command,
                                              env_vars={},
                                              on_behalf_user='******',
                                              user='******',
                                              password=None,
                                              private_key='---PRIVATE-KEY---',
                                              hosts='127.0.0.1',
                                              parallel=True,
                                              sudo=False,
                                              timeout=None,
                                              cwd='/tmp')
     return cmd_action
示例#3
0
 def _get_remote_action(self, action_paramaters):
     command = self.runner_parameters.get(RUNNER_COMMAND, None)
     env_vars = self._get_env_vars()
     return ParamikoRemoteCommandAction(self.action_name,
                                        str(self.liveaction_id),
                                        command,
                                        env_vars=env_vars,
                                        on_behalf_user=self._on_behalf_user,
                                        user=self._username,
                                        password=self._password,
                                        private_key=self._private_key,
                                        hosts=self._hosts,
                                        parallel=self._parallel,
                                        sudo=self._sudo,
                                        timeout=self._timeout,
                                        cwd=self._cwd)
示例#4
0
 def _get_test_command_action(command):
     cmd_action = ParamikoRemoteCommandAction(
         "fixtures.remote_command",
         "55ce39d532ed3543aecbe71d",
         command=command,
         env_vars={},
         on_behalf_user="******",
         user="******",
         password=None,
         private_key="---PRIVATE-KEY---",
         hosts="127.0.0.1",
         parallel=True,
         sudo=False,
         timeout=None,
         cwd="/tmp",
     )
     return cmd_action