Ironic console utilities.
ironic.drivers.modules.console_utils.
acquire_port
()[source]¶Returns a free TCP port on current host.
Find and returns a free TCP port in the range of ‘CONF.console.port_range’.
ironic.drivers.modules.console_utils.
get_shellinabox_console_url
(port)[source]¶Get a url to access the console via shellinaboxd.
port – the terminal port for the node.
ironic.drivers.modules.console_utils.
get_socat_console_url
(port)[source]¶Get a URL to access the console via socat.
port – the terminal port (integer) for the node
an access URL to the socat console of the node
ironic.drivers.modules.console_utils.
make_persistent_password_file
(path, password)[source]¶Writes a file containing a password until deleted.
ironic.drivers.modules.console_utils.
start_shellinabox_console
(node_uuid, port, console_cmd)[source]¶Open the serial console for a node.
node_uuid – the uuid for the node.
port – the terminal port for the node.
console_cmd – the shell command that gets the console.
ConsoleError if the directory for the PID file cannot be created or an old process cannot be stopped.
ConsoleSubprocessFailed when invoking the subprocess failed.
ironic.drivers.modules.console_utils.
start_socat_console
(node_uuid, port, console_cmd)[source]¶Open the serial console for a node.
node_uuid – the uuid of the node
port – the terminal port for the node
console_cmd – the shell command that will be executed by socat to establish console to the node
ConsoleError – if the directory for the PID file or the PID file cannot be created
ConsoleSubprocessFailed – when invoking the subprocess failed
ironic.drivers.modules.console_utils.
stop_shellinabox_console
(node_uuid)[source]¶Close the serial console for a node.
node_uuid – the UUID of the node
ConsoleError if unable to stop the console process
ironic.drivers.modules.console_utils.
stop_socat_console
(node_uuid)[source]¶Close the serial console for a node.
node_uuid – the UUID of the node
ConsoleError – if unable to stop the console process
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.