Merge "Use node.uuid directly in stop_console()"
This commit is contained in:
commit
0d1d481d19
ironic/drivers/modules
@ -611,17 +611,12 @@ class NativeIPMIShellinaboxConsole(base.ConsoleInterface):
|
|||||||
"""Stop the remote console session for the node.
|
"""Stop the remote console session for the node.
|
||||||
|
|
||||||
:param task: a TaskManager instance containing the node to act on.
|
: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.
|
:raises: ConsoleError if unable to stop the console process.
|
||||||
"""
|
"""
|
||||||
driver_info = _parse_driver_info(task.node)
|
|
||||||
try:
|
try:
|
||||||
console_utils.stop_shellinabox_console(driver_info['uuid'])
|
console_utils.stop_shellinabox_console(task.node.uuid)
|
||||||
finally:
|
finally:
|
||||||
password_file = _console_pwfile_path(driver_info['uuid'])
|
password_file = _console_pwfile_path(task.node.uuid)
|
||||||
utils.unlink_without_raise(password_file)
|
utils.unlink_without_raise(password_file)
|
||||||
|
|
||||||
def get_console(self, task):
|
def get_console(self, task):
|
||||||
|
@ -1132,15 +1132,13 @@ class IPMIShellinaboxConsole(base.ConsoleInterface):
|
|||||||
"""Stop the remote console session for the node.
|
"""Stop the remote console session for the node.
|
||||||
|
|
||||||
:param task: a task from TaskManager
|
:param task: a task from TaskManager
|
||||||
:raises: InvalidParameterValue if required ipmi parameters are missing
|
|
||||||
:raises: ConsoleError if unable to stop the console
|
:raises: ConsoleError if unable to stop the console
|
||||||
"""
|
"""
|
||||||
driver_info = _parse_driver_info(task.node)
|
|
||||||
try:
|
try:
|
||||||
console_utils.stop_shellinabox_console(driver_info['uuid'])
|
console_utils.stop_shellinabox_console(task.node.uuid)
|
||||||
finally:
|
finally:
|
||||||
utils.unlink_without_raise(
|
utils.unlink_without_raise(
|
||||||
_console_pwfile_path(driver_info['uuid']))
|
_console_pwfile_path(task.node.uuid))
|
||||||
|
|
||||||
def get_console(self, task):
|
def get_console(self, task):
|
||||||
"""Get the type and connection information about the console."""
|
"""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.
|
"""Stop the remote console session for the node.
|
||||||
|
|
||||||
:param task: a task from TaskManager
|
:param task: a task from TaskManager
|
||||||
:raises: MissingParameterValue if required seamicro parameters are
|
|
||||||
missing
|
|
||||||
:raises: ConsoleError if unable to stop the console
|
: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(task.node.uuid)
|
||||||
console_utils.stop_shellinabox_console(driver_info['uuid'])
|
|
||||||
|
|
||||||
def get_console(self, task):
|
def get_console(self, task):
|
||||||
"""Get the type and connection information about the console.
|
"""Get the type and connection information about the console.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user