+ def __eq__(self, other):
+ if isinstance(other, self.__class__):
+ return (self.value == other.value and
+ self.ttl == other.ttl and
+ self.exp == other.exp and
+ self.mode == other.mode)
+ elif hasattr(other, 'label'):
+ return (self.value == other.label and
+ self.ttl == other.ttl and
+ self.exp == other.exp and
+ (self.mode == MplsLspMode.UNIFORM) == other.is_uniform)
+ else:
+ return False
+
+ def __ne__(self, other):
+ return not (self == other)
+