asd
This commit is contained in:
1 parent
d3df425784
commit
b65494c2c8
7 files changed
+509
-25
No files matched your search
+11
-11
@@ -1,21 +1,21 @@
|
||||
class Status:
|
||||
UP = 0
|
||||
OPER_DOWN = 1
|
||||
ADMIN_DOWN = 2
|
||||
|
||||
class InterfaceStatus:
|
||||
UP = 1
|
||||
OPER_DOWN = -1
|
||||
ADMIN_DOWN = -2
|
||||
|
||||
class Interface:
|
||||
def __init__(self, name, speed, interface_type, status):
|
||||
def __init__(self, name, speed, status):
|
||||
"""
|
||||
Represents an interface on a switch.
|
||||
|
||||
:param name: (str) Name of the interface
|
||||
:param speed: (int) Speed of the interface in Gbps.
|
||||
:param interface_type: (str) Type of the interface, i.e.
|
||||
:param status: (Status) Status of an interface. Make sure you use the values on the class Status.
|
||||
:return:
|
||||
"""
|
||||
self.name
|
||||
self.speed
|
||||
self.type
|
||||
self.interface_type
|
||||
self.name = name
|
||||
self.speed = speed
|
||||
self.status = status
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
+7
-1
@@ -10,4 +10,10 @@ class LLDPNeighbor:
|
||||
"""
|
||||
self.hostname = hostname
|
||||
self.local_port = local_port
|
||||
self.remote_port = remote_port
|
||||
self.remote_port = remote_port
|
||||
|
||||
def __str__(self):
|
||||
return self.hostname
|
||||
|
||||
def __repr__(self):
|
||||
return 'LLDPNeighbor: %s' % self.__str__()
|
||||
Reference in new issue
Block a user