mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-24 17:28:08 +00:00
Support for console auto start.
This commit is contained in:
parent
1d7f67695a
commit
395277d5c5
@ -36,7 +36,7 @@ class Node:
|
||||
# This properties are used only on controller and are not forwarded to the compute
|
||||
CONTROLLER_ONLY_PROPERTIES = ["x", "y", "z", "width", "height", "symbol", "label", "console_host",
|
||||
"port_name_format", "first_port_name", "port_segment_size", "ports",
|
||||
"category"]
|
||||
"category", "console_auto_start"]
|
||||
|
||||
def __init__(self, project, compute, name, node_id=None, node_type=None, **kwargs):
|
||||
"""
|
||||
@ -84,6 +84,7 @@ class Node:
|
||||
self._port_by_adapter = 1
|
||||
self._port_segment_size = 0
|
||||
self._first_port_name = None
|
||||
self._console_auto_start = False
|
||||
|
||||
# This properties will be recompute
|
||||
ignore_properties = ("width", "height", "hover_symbol")
|
||||
@ -163,6 +164,14 @@ class Node:
|
||||
def console_type(self, val):
|
||||
self._console_type = val
|
||||
|
||||
@property
|
||||
def console_auto_start(self):
|
||||
return self._console_auto_start
|
||||
|
||||
@console_auto_start.setter
|
||||
def console_auto_start(self, val):
|
||||
self._console_auto_start = val
|
||||
|
||||
@property
|
||||
def properties(self):
|
||||
return self._properties
|
||||
@ -675,6 +684,7 @@ class Node:
|
||||
"name": self._name,
|
||||
"console": self._console,
|
||||
"console_type": self._console_type,
|
||||
"console_auto_start": self._console_auto_start,
|
||||
"properties": self._properties,
|
||||
"label": self._label,
|
||||
"x": self._x,
|
||||
@ -698,6 +708,7 @@ class Node:
|
||||
"console": self._console,
|
||||
"console_host": str(self._compute.console_host),
|
||||
"console_type": self._console_type,
|
||||
"console_auto_start": self._console_auto_start,
|
||||
"command_line": self._command_line,
|
||||
"properties": self._properties,
|
||||
"status": self._status,
|
||||
|
@ -148,6 +148,10 @@ NODE_OBJECT_SCHEMA = {
|
||||
"description": "Console type",
|
||||
"enum": ["vnc", "telnet", "http", "https", "spice", "spice+agent", "none", None]
|
||||
},
|
||||
"console_auto_start": {
|
||||
"description": "Automatically start the console when the node has started",
|
||||
"type": "boolean"
|
||||
},
|
||||
"properties": {
|
||||
"description": "Properties specific to an emulator",
|
||||
"type": "object"
|
||||
|
Loading…
Reference in New Issue
Block a user