Merge "Use node.uuid directly in stop_console()"
This commit is contained in:
commit
0d1d481d19
@ -611,17 +611,12 @@ class NativeIPMIShellinaboxConsole(base.ConsoleInterface):
|
||||
"""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'])
|
||||
console_utils.stop_shellinabox_console(task.node.uuid)
|
||||
finally:
|
||||
password_file = _console_pwfile_path(driver_info['uuid'])
|
||||
password_file = _console_pwfile_path(task.node.uuid)
|
||||
utils.unlink_without_raise(password_file)
|
||||
|
||||
def get_console(self, task):
|
||||
|
@ -1132,15 +1132,13 @@ class IPMIShellinaboxConsole(base.ConsoleInterface):
|
||||
"""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'])
|
||||
console_utils.stop_shellinabox_console(task.node.uuid)
|
||||
finally:
|
||||
utils.unlink_without_raise(
|
||||
_console_pwfile_path(driver_info['uuid']))
|
||||
_console_pwfile_path(task.node.uuid))
|
||||
|
||||
def get_console(self, task):
|
||||
"""Get the type and connection information about the console."""
|
||||
|
@ -663,14 +663,10 @@ class ShellinaboxConsole(base.ConsoleInterface):
|
||||
"""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'])
|
||||
console_utils.stop_shellinabox_console(task.node.uuid)
|
||||
|
||||
def get_console(self, task):
|
||||
"""Get the type and connection information about the console.
|
||||
|
Loading…
Reference in New Issue
Block a user