コード例 #1
0
    def test_stop_shellinabox_console(self):
        pid_file = console_utils._get_console_pid_file(self.info['uuid'])
        open(pid_file, 'a').close()
        self.assertTrue(os.path.exists(pid_file))

        console_utils.stop_shellinabox_console(self.info['uuid'])

        self.assertFalse(os.path.exists(pid_file))
コード例 #2
0
ファイル: ssh.py プロジェクト: Tehsmash/ironic
    def stop_console(self, task):
        """Stop the remote console session for the node.

        :param task: a task from TaskManager
        :raises: ConsoleError if unable to stop the console
        """

        console_utils.stop_shellinabox_console(task.node.uuid)
コード例 #3
0
    def stop_console(self, task):
        """Stop the remote console session for the node.

        :param task: a task from TaskManager
        :raises: ConsoleError if unable to stop the console
        """

        console_utils.stop_shellinabox_console(task.node.uuid)
コード例 #4
0
    def test_stop_shellinabox_console(self):
        pid_file = console_utils._get_console_pid_file(self.info['uuid'])
        open(pid_file, 'a').close()
        self.assertTrue(os.path.exists(pid_file))

        console_utils.stop_shellinabox_console(self.info['uuid'])

        self.assertFalse(os.path.exists(pid_file))
コード例 #5
0
ファイル: ipminative.py プロジェクト: bharathshetty4/ironic
    def stop_console(self, task):
        """Stop the remote console session for the node.

        :param task: a TaskManager instance containing the node to act on.
        :raises: ConsoleError if unable to stop the console process.
        """
        try:
            console_utils.stop_shellinabox_console(task.node.uuid)
        finally:
            password_file = _console_pwfile_path(task.node.uuid)
            ironic_utils.unlink_without_raise(password_file)
コード例 #6
0
    def stop_console(self, task):
        """Stop the remote console session for the node.

        :param task: a task from TaskManager
        :raises: ConsoleError if unable to stop the console
        """
        try:
            console_utils.stop_shellinabox_console(task.node.uuid)
        finally:
            ironic_utils.unlink_without_raise(
                _console_pwfile_path(task.node.uuid))
コード例 #7
0
ファイル: ipmitool.py プロジェクト: ISCAS-VDI/ironic-base
    def stop_console(self, task):
        """Stop the remote console session for the node.

        :param task: a task from TaskManager
        :raises: ConsoleError if unable to stop the console
        """
        try:
            console_utils.stop_shellinabox_console(task.node.uuid)
        finally:
            ironic_utils.unlink_without_raise(
                _console_pwfile_path(task.node.uuid))
コード例 #8
0
    def stop_console(self, task):
        """Stop the remote console session for the node.

        :param task: a TaskManager instance containing the node to act on.
        :raises: ConsoleError if unable to stop the console process.
        """
        try:
            console_utils.stop_shellinabox_console(task.node.uuid)
        finally:
            password_file = _console_pwfile_path(task.node.uuid)
            ironic_utils.unlink_without_raise(password_file)
コード例 #9
0
ファイル: seamicro.py プロジェクト: overcastcloud/ironic
    def stop_console(self, task):
        """Stop the remote console session for the node.

        :param task: a task from TaskManager
        :raises: MissingParameterValue if required seamicro parameters are
                 missing
        :raises: ConsoleError if unable to stop the console
        :raises: InvalidParameterValue if required parameter are invalid.
        """

        driver_info = _parse_driver_info(task.node)
        console_utils.stop_shellinabox_console(driver_info['uuid'])
コード例 #10
0
ファイル: seamicro.py プロジェクト: ramineni/myironic
    def stop_console(self, task):
        """Stop the remote console session for the node.

        :param task: a task from TaskManager
        :raises: MissingParameterValue if required seamicro parameters are
                 missing
        :raises: ConsoleError if unable to stop the console
        :raises: InvalidParameterValue if required parameter are invalid.
        """

        driver_info = _parse_driver_info(task.node)
        console_utils.stop_shellinabox_console(driver_info['uuid'])
コード例 #11
0
ファイル: ipmitool.py プロジェクト: yzping/ironic
    def stop_console(self, task):
        """Stop the remote console session for the node.

        :param task: a task from TaskManager
        :raises: InvalidParameterValue if required ipmi parameters are missing
        :raises: ConsoleError if unable to stop the console
        """
        driver_info = _parse_driver_info(task.node)
        try:
            console_utils.stop_shellinabox_console(driver_info["uuid"])
        finally:
            utils.unlink_without_raise(_console_pwfile_path(driver_info["uuid"]))
コード例 #12
0
ファイル: ipmitool.py プロジェクト: skw0rm/ironic
    def stop_console(self, task):
        """Stop the remote console session for the node.

        :param task: a task from TaskManager
        :raises: InvalidParameterValue if required ipmi parameters are missing
        :raises: ConsoleError if unable to stop the console
        """
        driver_info = _parse_driver_info(task.node)
        try:
            console_utils.stop_shellinabox_console(driver_info['uuid'])
        finally:
            utils.unlink_without_raise(
                    _console_pwfile_path(driver_info['uuid']))
コード例 #13
0
    def stop_console(self, task):
        """Stop the remote console session for the node.

        :param task: a TaskManager instance containing the node to act on.
        :raises: MissingParameterValue when required IPMI credentials or
            the IPMI terminal port are missing
        :raises: InvalidParameterValue when the IPMI terminal port is not
                an integer.
        :raises: ConsoleError if unable to stop the console process.
        """
        driver_info = _parse_driver_info(task.node)
        try:
            console_utils.stop_shellinabox_console(driver_info['uuid'])
        finally:
            password_file = _console_pwfile_path(driver_info['uuid'])
            utils.unlink_without_raise(password_file)
コード例 #14
0
ファイル: ipminative.py プロジェクト: ader1990/ironic
    def stop_console(self, task):
        """Stop the remote console session for the node.

        :param task: a TaskManager instance containing the node to act on.
        :raises: MissingParameterValue when required IPMI credentials or
            the IPMI terminal port are missing
        :raises: InvalidParameterValue when the IPMI terminal port is not
                an integer.
        :raises: ConsoleError if unable to stop the console process.
        """
        driver_info = _parse_driver_info(task.node)
        try:
            console_utils.stop_shellinabox_console(driver_info['uuid'])
        finally:
            password_file = _console_pwfile_path(driver_info['uuid'])
            utils.unlink_without_raise(password_file)
コード例 #15
0
 def stop_console(self, task):
     """Stop the remote console session for the node."""
     driver_info = _parse_driver_info(task.node)
     console_utils.stop_shellinabox_console(driver_info['uuid'])
     utils.unlink_without_raise(_console_pwfile_path(driver_info['uuid']))
コード例 #16
0
ファイル: test_console_utils.py プロジェクト: Tehsmash/ironic
    def test_stop_shellinabox_console_fail_nopid(self, mock_stop):
        mock_stop.side_effect = exception.NoConsolePid('/tmp/blah')

        console_utils.stop_shellinabox_console(self.info['uuid'])

        mock_stop.assert_called_once_with(self.info['uuid'])
コード例 #17
0
ファイル: test_console_utils.py プロジェクト: Tehsmash/ironic
    def test_stop_shellinabox_console(self, mock_stop):

        console_utils.stop_shellinabox_console(self.info['uuid'])

        mock_stop.assert_called_once_with(self.info['uuid'])
コード例 #18
0
ファイル: test_console_utils.py プロジェクト: hanlind/ironic
    def test_stop_shellinabox_console_fail_nopid(self, mock_stop):
        mock_stop.side_effect = exception.NoConsolePid('/tmp/blah')

        console_utils.stop_shellinabox_console(self.info['uuid'])

        mock_stop.assert_called_once_with(self.info['uuid'])
コード例 #19
0
ファイル: test_console_utils.py プロジェクト: hanlind/ironic
    def test_stop_shellinabox_console(self, mock_stop):

        console_utils.stop_shellinabox_console(self.info['uuid'])

        mock_stop.assert_called_once_with(self.info['uuid'])
コード例 #20
0
ファイル: ipmitool.py プロジェクト: JoProvost/ironic
 def stop_console(self, task):
     """Stop the remote console session for the node."""
     driver_info = _parse_driver_info(task.node)
     console_utils.stop_shellinabox_console(driver_info['uuid'])
     utils.unlink_without_raise(_console_pwfile_path(driver_info['uuid']))