diff options
author | Paul Vinciguerra <pvinci@vinciconsulting.com> | 2019-06-06 14:07:55 -0400 |
---|---|---|
committer | Neale Ranns <nranns@cisco.com> | 2019-06-26 11:36:57 +0000 |
commit | ab05508e1eb96749b68de8ccd2f6f88ff3e64fad (patch) | |
tree | 05f290dfff68a24810d0a3bdb2f7227ac4608114 /test/vpp_ip.py | |
parent | 941da4a224bbfc153bfe7c2344ae00e294d92798 (diff) |
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 <pvinci@vinciconsulting.com>
Diffstat (limited to 'test/vpp_ip.py')
-rw-r--r-- | test/vpp_ip.py | 6 |
1 files changed, 3 insertions, 3 deletions
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( |