summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorIWASE Yusuke <iwase.yusuke0@gmail.com>2016-08-22 17:21:27 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-08-25 13:32:58 +0900
commitb999b8a14fefd8c15f053405442fa3bd5354e817 (patch)
treec0072d45129f169f6ead9727c68b1ccf162255d7
parentaeda7ae4c5e7a08596e2ecedfb089b78fe879a08 (diff)
BGPSpeaker/info_base: Add comparison methods for Python3
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--ryu/services/protocols/bgp/info_base/base.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/ryu/services/protocols/bgp/info_base/base.py b/ryu/services/protocols/bgp/info_base/base.py
index 54e02bb5..a11de7f1 100644
--- a/ryu/services/protocols/bgp/info_base/base.py
+++ b/ryu/services/protocols/bgp/info_base/base.py
@@ -665,6 +665,24 @@ class Destination(object):
return result
+ def __lt__(self, other):
+ return str(self) < str(other)
+
+ def __le__(self, other):
+ return str(self) <= str(other)
+
+ def __eq__(self, other):
+ return str(self) == str(other)
+
+ def __ne__(self, other):
+ return str(self) != str(other)
+
+ def __gt__(self, other):
+ return str(self) > str(other)
+
+ def __ge__(self, other):
+ return str(self) >= str(other)
+
@six.add_metaclass(ABCMeta)
class Path(object):