mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-06-17 14:58:13 +00:00
Dynamips NIO connections.
This commit is contained in:
@ -40,14 +40,13 @@ class NIOUNIX(NIO):
|
||||
|
||||
def __init__(self, hypervisor, local_file, remote_file):
|
||||
|
||||
NIO.__init__(self, hypervisor)
|
||||
|
||||
# create an unique ID
|
||||
self._id = NIOUNIX._instance_count
|
||||
# create an unique ID and name
|
||||
nio_id = NIOUNIX._instance_count
|
||||
NIOUNIX._instance_count += 1
|
||||
self._name = 'nio_unix' + str(self._id)
|
||||
name = 'nio_unix' + str(nio_id)
|
||||
self._local_file = local_file
|
||||
self._remote_file = remote_file
|
||||
NIO.__init__(self, name, hypervisor)
|
||||
|
||||
@classmethod
|
||||
def reset(cls):
|
||||
@ -87,3 +86,9 @@ class NIOUNIX(NIO):
|
||||
"""
|
||||
|
||||
return self._remote_file
|
||||
|
||||
def __json__(self):
|
||||
|
||||
return {"type": "nio_unix",
|
||||
"local_file": self._local_file,
|
||||
"remote_file": self._remote_file}
|
||||
|
Reference in New Issue
Block a user