updated all classes to be created without using (object), in python3 all classes are new style classes
This commit is contained in:
parent
39c40d2a8c
commit
6a0a9e7698
24 changed files with 48 additions and 48 deletions
|
@ -21,7 +21,7 @@ from core.nodes.netclient import get_net_client
|
|||
_DEFAULT_MTU = 1500
|
||||
|
||||
|
||||
class NodeBase(object):
|
||||
class NodeBase:
|
||||
"""
|
||||
Base class for CORE nodes (nodes and networks)
|
||||
"""
|
||||
|
@ -1067,7 +1067,7 @@ class CoreNetworkBase(NodeBase):
|
|||
return all_links
|
||||
|
||||
|
||||
class Position(object):
|
||||
class Position:
|
||||
"""
|
||||
Helper class for Cartesian coordinate position
|
||||
"""
|
||||
|
|
|
@ -8,7 +8,7 @@ from core import utils
|
|||
from core.constants import VCMD_BIN
|
||||
|
||||
|
||||
class VnodeClient(object):
|
||||
class VnodeClient:
|
||||
"""
|
||||
Provides client functionality for interacting with a virtual node.
|
||||
"""
|
||||
|
|
|
@ -10,7 +10,7 @@ from core.nodes.base import CoreNode
|
|||
from core.nodes.netclient import get_net_client
|
||||
|
||||
|
||||
class DockerClient(object):
|
||||
class DockerClient:
|
||||
def __init__(self, name, image, run):
|
||||
self.name = name
|
||||
self.image = image
|
||||
|
|
|
@ -10,7 +10,7 @@ from core.errors import CoreCommandError
|
|||
from core.nodes.netclient import get_net_client
|
||||
|
||||
|
||||
class CoreInterface(object):
|
||||
class CoreInterface:
|
||||
"""
|
||||
Base class for network interfaces.
|
||||
"""
|
||||
|
|
|
@ -9,7 +9,7 @@ import struct
|
|||
from socket import AF_INET, AF_INET6
|
||||
|
||||
|
||||
class MacAddress(object):
|
||||
class MacAddress:
|
||||
"""
|
||||
Provides mac address utilities for use within core.
|
||||
"""
|
||||
|
@ -77,7 +77,7 @@ class MacAddress(object):
|
|||
return cls(tmpbytes[2:])
|
||||
|
||||
|
||||
class IpAddress(object):
|
||||
class IpAddress:
|
||||
"""
|
||||
Provides ip utilities and functionality for use within core.
|
||||
"""
|
||||
|
@ -202,7 +202,7 @@ class IpAddress(object):
|
|||
return struct.unpack("!I", value)[0]
|
||||
|
||||
|
||||
class IpPrefix(object):
|
||||
class IpPrefix:
|
||||
"""
|
||||
Provides ip address generation and prefix utilities.
|
||||
"""
|
||||
|
|
|
@ -10,7 +10,7 @@ from core.errors import CoreCommandError
|
|||
from core.nodes.base import CoreNode
|
||||
|
||||
|
||||
class LxdClient(object):
|
||||
class LxdClient:
|
||||
def __init__(self, name, image, run):
|
||||
self.name = name
|
||||
self.image = image
|
||||
|
|
|
@ -19,7 +19,7 @@ def get_net_client(use_ovs, run):
|
|||
return LinuxNetClient(run)
|
||||
|
||||
|
||||
class LinuxNetClient(object):
|
||||
class LinuxNetClient:
|
||||
"""
|
||||
Client for creating Linux bridges and ip interfaces for nodes.
|
||||
"""
|
||||
|
|
|
@ -21,7 +21,7 @@ from core.nodes.netclient import get_net_client
|
|||
ebtables_lock = threading.Lock()
|
||||
|
||||
|
||||
class EbtablesQueue(object):
|
||||
class EbtablesQueue:
|
||||
"""
|
||||
Helper class for queuing up ebtables commands into rate-limited
|
||||
atomic commits. This improves performance and reliability when there are
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue