mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-05 06:41:13 +02:00
Some cleaning.
This commit is contained in:
1 parent
bad3ef7003
commit
44074ff7c9
22 files changed
+122
-99
No files matched your search
@@ -40,7 +40,12 @@ class EthernetHub(BaseNode):
|
||||
|
||||
def __json__(self):
|
||||
|
||||
return {"name": self.name, "usage": self.usage, "node_id": self.id, "project_id": self.project.id}
|
||||
return {
|
||||
"name": self.name,
|
||||
"usage": self.usage,
|
||||
"node_id": self.id,
|
||||
"project_id": self.project.id
|
||||
}
|
||||
|
||||
async def create(self):
|
||||
"""
|
||||
|
||||
@@ -40,7 +40,12 @@ class EthernetSwitch(BaseNode):
|
||||
|
||||
def __json__(self):
|
||||
|
||||
return {"name": self.name, "usage": self.usage, "node_id": self.id, "project_id": self.project.id}
|
||||
return {
|
||||
"name": self.name,
|
||||
"usage": self.usage,
|
||||
"node_id": self.id,
|
||||
"project_id": self.project.id
|
||||
}
|
||||
|
||||
async def create(self):
|
||||
"""
|
||||
|
||||
@@ -67,4 +67,7 @@ class NIOGenericEthernet(NIO):
|
||||
|
||||
def __json__(self):
|
||||
|
||||
return {"type": "nio_generic_ethernet", "ethernet_device": self._ethernet_device}
|
||||
return {
|
||||
"type": "nio_generic_ethernet",
|
||||
"ethernet_device": self._ethernet_device
|
||||
}
|
||||
@@ -66,4 +66,7 @@ class NIOLinuxEthernet(NIO):
|
||||
|
||||
def __json__(self):
|
||||
|
||||
return {"type": "nio_linux_ethernet", "ethernet_device": self._ethernet_device}
|
||||
return {
|
||||
"type": "nio_linux_ethernet",
|
||||
"ethernet_device": self._ethernet_device
|
||||
}
|
||||
@@ -60,4 +60,7 @@ class NIOTAP(NIO):
|
||||
|
||||
def __json__(self):
|
||||
|
||||
return {"type": "nio_tap", "tap_device": self._tap_device}
|
||||
return {
|
||||
"type": "nio_tap",
|
||||
"tap_device": self._tap_device
|
||||
}
|
||||
@@ -128,4 +128,9 @@ class NIOUDP(NIO):
|
||||
|
||||
def __json__(self):
|
||||
|
||||
return {"type": "nio_udp", "lport": self._lport, "rport": self._rport, "rhost": self._rhost}
|
||||
return {
|
||||
"type": "nio_udp",
|
||||
"lport": self._lport,
|
||||
"rport": self._rport,
|
||||
"rhost": self._rhost
|
||||
}
|
||||
@@ -81,4 +81,8 @@ class NIOUNIX(NIO):
|
||||
|
||||
def __json__(self):
|
||||
|
||||
return {"type": "nio_unix", "local_file": self._local_file, "remote_file": self._remote_file}
|
||||
return {
|
||||
"type": "nio_unix",
|
||||
"local_file": self._local_file,
|
||||
"remote_file": self._remote_file
|
||||
}
|
||||
@@ -81,4 +81,8 @@ class NIOVDE(NIO):
|
||||
|
||||
def __json__(self):
|
||||
|
||||
return {"type": "nio_vde", "local_file": self._local_file, "control_file": self._control_file}
|
||||
return {
|
||||
"type": "nio_vde",
|
||||
"local_file": self._local_file,
|
||||
"control_file": self._control_file
|
||||
}
|
||||
@@ -50,4 +50,7 @@ class NIOEthernet(NIO):
|
||||
|
||||
def __json__(self):
|
||||
|
||||
return {"type": "nio_ethernet", "ethernet_device": self._ethernet_device}
|
||||
return {
|
||||
"type": "nio_ethernet",
|
||||
"ethernet_device": self._ethernet_device
|
||||
}
|
||||
@@ -50,4 +50,7 @@ class NIOTAP(NIO):
|
||||
|
||||
def __json__(self):
|
||||
|
||||
return {"type": "nio_tap", "tap_device": self._tap_device}
|
||||
return {
|
||||
"type": "nio_tap",
|
||||
"tap_device": self._tap_device
|
||||
}
|
||||
@@ -74,4 +74,9 @@ class NIOUDP(NIO):
|
||||
|
||||
def __json__(self):
|
||||
|
||||
return {"type": "nio_udp", "lport": self._lport, "rport": self._rport, "rhost": self._rhost}
|
||||
return {
|
||||
"type": "nio_udp",
|
||||
"lport": self._lport,
|
||||
"rport": self._rport,
|
||||
"rhost": self._rhost
|
||||
}
|
||||
@@ -79,7 +79,11 @@ class Project:
|
||||
|
||||
def __json__(self):
|
||||
|
||||
return {"name": self._name, "project_id": self._id, "variables": self._variables}
|
||||
return {
|
||||
"name": self._name,
|
||||
"project_id": self._id,
|
||||
"variables": self._variables
|
||||
}
|
||||
|
||||
def is_local(self):
|
||||
|
||||
|
||||
Reference in new issue
Block a user