From ab05508e1eb96749b68de8ccd2f6f88ff3e64fad Mon Sep 17 00:00:00 2001 From: Paul Vinciguerra Date: Thu, 6 Jun 2019 14:07:55 -0400 Subject: api: refactor format_vl_api_prefix_t return keys format_vl_api_prefix_t returns a dict with keys 'address' and 'address_length', but other format_vl_api_prefix functions return a dict with 'prefix', and 'len'. Refactor all format_vl_api_prefix_t to return consistent keys 'address' and 'len'. Type: refactor Change-Id: I5f9558fc2da8742a303266e011102f5b2db80aad Signed-off-by: Paul Vinciguerra --- test/vpp_ip.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/vpp_ip.py') diff --git a/test/vpp_ip.py b/test/vpp_ip.py index 5396e8457e2..3bdfa62d223 100644 --- a/test/vpp_ip.py +++ b/test/vpp_ip.py @@ -163,7 +163,7 @@ class VppIpPrefix(): def encode(self): return {'address': self.addr.encode(), - 'address_length': self.len} + 'len': self.len} @property def version(self): @@ -191,9 +191,9 @@ class VppIpPrefix(): def __eq__(self, other): if isinstance(other, self.__class__): return (self.len == other.len and self.addr == other.addr) - elif hasattr(other, "address") and hasattr(other, "address_length"): + elif hasattr(other, "address") and hasattr(other, "len"): # vl_api_prefix_t - return self.len == other.address_length and \ + return self.len == other.len and \ self.addr == other.address else: _log.error( -- cgit 1.2.3-korg