X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=test%2Fvpp_ip_route.py;h=67183d943c838e0f902b9b0cc3ace052e87df02e;hb=b4e5e50fe;hp=031412cc2fa22c1845a073569597dbb750e4e5c1;hpb=9db6ada779794779158163f6293b479ae7f6ad5e;p=vpp.git diff --git a/test/vpp_ip_route.py b/test/vpp_ip_route.py index 031412cc2fa..67183d943c8 100644 --- a/test/vpp_ip_route.py +++ b/test/vpp_ip_route.py @@ -87,7 +87,7 @@ def ip_to_dpo_proto(addr): def address_proto(ip_addr): - if ip_addr.ip_addr.version is 4: + if ip_addr.ip_addr.version == 4: return FibPathProto.FIB_PATH_NH_PROTO_IP4 else: return FibPathProto.FIB_PATH_NH_PROTO_IP6 @@ -96,7 +96,7 @@ def address_proto(ip_addr): def find_route(test, addr, len, table_id=0): prefix = mk_network(addr, len) - if 4 is prefix.version: + if 4 == prefix.version: routes = test.vapi.ip_route_dump(table_id, False) else: routes = test.vapi.ip_route_dump(table_id, True) @@ -131,7 +131,7 @@ def find_mroute(test, grp_addr, src_addr, grp_addr_len, text_type(grp_addr), grp_addr_len) - if 4 is ip_mprefix.version: + if 4 == ip_mprefix.version: routes = test.vapi.ip_mroute_dump(table_id, False) else: routes = test.vapi.ip_mroute_dump(table_id, True) @@ -246,6 +246,7 @@ class VppIpInterfaceAddress(VppObject): sw_if_index=self.intf.sw_if_index, prefix=self.prefix, is_add=1) self._test.registry.register(self, self._test.logger) + return self def remove_vpp_config(self): self._test.vapi.sw_interface_add_del_address(