mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-05 23:01:15 +02:00
Use black with -l 120 param.
This commit is contained in:
1 parent
f928738bd5
commit
c021e21309
194 files changed
+6034
-4564
No files matched your search
@@ -23,6 +23,7 @@ import uuid
|
||||
from .nio import NIO
|
||||
|
||||
import logging
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@@ -37,17 +38,21 @@ class NIOLinuxEthernet(NIO):
|
||||
|
||||
def __init__(self, hypervisor, ethernet_device):
|
||||
# create an unique name
|
||||
name = f'linux_ethernet-{uuid.uuid4()}'
|
||||
name = f"linux_ethernet-{uuid.uuid4()}"
|
||||
self._ethernet_device = ethernet_device
|
||||
super().__init__(name, hypervisor)
|
||||
|
||||
async def create(self):
|
||||
|
||||
await self._hypervisor.send("nio create_linux_eth {name} {eth_device}".format(name=self._name,
|
||||
eth_device=self._ethernet_device))
|
||||
await self._hypervisor.send(
|
||||
"nio create_linux_eth {name} {eth_device}".format(name=self._name, eth_device=self._ethernet_device)
|
||||
)
|
||||
|
||||
log.info("NIO Linux Ethernet {name} created with device {device}".format(name=self._name,
|
||||
device=self._ethernet_device))
|
||||
log.info(
|
||||
"NIO Linux Ethernet {name} created with device {device}".format(
|
||||
name=self._name, device=self._ethernet_device
|
||||
)
|
||||
)
|
||||
|
||||
@property
|
||||
def ethernet_device(self):
|
||||
@@ -61,5 +66,4 @@ 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}
|
||||
Reference in new issue
Block a user