Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Remove historical ip4 icmp OAM code
[vpp.git]
/
test
/
bfd.py
diff --git
a/test/bfd.py
b/test/bfd.py
index
452a180
..
84ef7b0
100644
(file)
--- a/
test/bfd.py
+++ b/
test/bfd.py
@@
-35,9
+35,6
@@
class BFDDiagCode(NumericConstant):
reverse_concatenated_path_down: "Reverse Concatenated Path Down",
}
reverse_concatenated_path_down: "Reverse Concatenated Path Down",
}
- def __init__(self, value):
- NumericConstant.__init__(self, value)
-
class BFDState(NumericConstant):
""" BFD State """
class BFDState(NumericConstant):
""" BFD State """
@@
-53,9
+50,6
@@
class BFDState(NumericConstant):
up: "Up",
}
up: "Up",
}
- def __init__(self, value):
- NumericConstant.__init__(self, value)
-
class BFDAuthType(NumericConstant):
""" BFD Authentication Type """
class BFDAuthType(NumericConstant):
""" BFD Authentication Type """
@@
-75,9
+69,6
@@
class BFDAuthType(NumericConstant):
meticulous_keyed_sha1: "Meticulous Keyed SHA1",
}
meticulous_keyed_sha1: "Meticulous Keyed SHA1",
}
- def __init__(self, value):
- NumericConstant.__init__(self, value)
-
def bfd_is_auth_used(pkt):
""" is packet authenticated? """
def bfd_is_auth_used(pkt):
""" is packet authenticated? """
@@
-148,6
+139,7
@@
class BFD(Packet):
return self.sprintf("BFD(my_disc=%BFD.my_discriminator%,"
"your_disc=%BFD.your_discriminator%)")
return self.sprintf("BFD(my_disc=%BFD.my_discriminator%,"
"your_disc=%BFD.your_discriminator%)")
+
# glue the BFD packet class to scapy parser
bind_layers(UDP, BFD, dport=BFD.udp_dport)
# glue the BFD packet class to scapy parser
bind_layers(UDP, BFD, dport=BFD.udp_dport)
@@
-169,6
+161,7
@@
class BFD_vpp_echo(Packet):
"BFD_VPP_ECHO(disc=%BFD_VPP_ECHO.discriminator%,"
"expire_time_clocks=%BFD_VPP_ECHO.expire_time_clocks%)")
"BFD_VPP_ECHO(disc=%BFD_VPP_ECHO.discriminator%,"
"expire_time_clocks=%BFD_VPP_ECHO.expire_time_clocks%)")
+
# glue the BFD echo packet class to scapy parser
bind_layers(UDP, BFD_vpp_echo, dport=BFD_vpp_echo.udp_dport)
# glue the BFD echo packet class to scapy parser
bind_layers(UDP, BFD_vpp_echo, dport=BFD_vpp_echo.udp_dport)
@@
-229,9
+222,6
@@
class VppBFDAuthKey(VppObject):
def object_id(self):
return "bfd-auth-key-%s" % self._conf_key_id
def object_id(self):
return "bfd-auth-key-%s" % self._conf_key_id
- def __str__(self):
- return self.object_id()
-
class VppBFDUDPSession(VppObject):
""" Represents BFD UDP session in VPP """
class VppBFDUDPSession(VppObject):
""" Represents BFD UDP session in VPP """
@@
-437,9
+427,6
@@
class VppBFDUDPSession(VppObject):
self.peer_addr,
self.af)
self.peer_addr,
self.af)
- def __str__(self):
- return self.object_id()
-
def admin_up(self):
""" set bfd session admin-up """
is_ipv6 = 1 if AF_INET6 == self._af else 0
def admin_up(self):
""" set bfd session admin-up """
is_ipv6 = 1 if AF_INET6 == self._af else 0