mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-06-22 16:59:02 +00:00
Change method to allocate AUX console for existing Dynamips nodes
This commit is contained in:
@ -992,7 +992,27 @@ class Router(BaseNode):
|
||||
"""
|
||||
|
||||
self.aux = aux
|
||||
await self._hypervisor.send('vm set_aux_tcp_port "{name}" {aux}'.format(name=self._name, aux=aux))
|
||||
await self._hypervisor.send('vm set_aux_tcp_port "{name}" {aux}'.format(name=self._name, aux=self._aux))
|
||||
|
||||
async def set_aux_type(self, aux_type):
|
||||
"""
|
||||
Sets the aux type.
|
||||
|
||||
:param aux_type: auxiliary console type
|
||||
"""
|
||||
|
||||
if self.aux_type != aux_type:
|
||||
status = await self.get_status()
|
||||
if status == "running":
|
||||
raise DynamipsError('"{name}" must be stopped to change the auxiliary console type to {aux_type}'.format(
|
||||
name=self._name,
|
||||
aux_type=aux_type)
|
||||
)
|
||||
|
||||
self.aux_type = aux_type
|
||||
|
||||
if self._aux and aux_type == "telnet":
|
||||
await self._hypervisor.send('vm set_aux_tcp_port "{name}" {aux}'.format(name=self._name, aux=self._aux))
|
||||
|
||||
async def reset_console(self):
|
||||
"""
|
||||
|
Reference in New Issue
Block a user