PAPI: Allow ipaddress object as argument and return values from API calls 31/16431/3
authorOle Troan <ot@cisco.com>
Tue, 11 Dec 2018 12:04:01 +0000 (13:04 +0100)
committerDamjan Marion <dmarion@me.com>
Wed, 12 Dec 2018 00:34:43 +0000 (00:34 +0000)
commit0bcad32b3870f9998fa1393418081cdda685272f
tree0fcb518ffa5553bbec94c219cbc33fef48dbede3
parent41b25cf6380d1420b24e191cd7e95cbce1e7cfdc
PAPI: Allow ipaddress object as argument and return values from API calls

The API calls that use any of vl_api_address_t, vl_api_ip4_address,
vl_api_ip6_address_t, vl_api_prefix_t, vl_api_ip4_prefix_t,
vl_api_ip6_prefix_t now accepts either the old style dictionary,
a text string (2001:db8::/32) or an ipaddress ojbect.

Unless it is called with '_no_type_conversion':True, it will
also return an appropriate ipaddress object.

Change-Id: I84e4a1577bd57f6b5ae725f316a523988b6a955b
Signed-off-by: Ole Troan <ot@cisco.com>
13 files changed:
src/vpp-api/python/vpp_papi/tests/test_vpp_serializer.py
src/vpp-api/python/vpp_papi/vpp_format.py
src/vpp-api/python/vpp_papi/vpp_papi.py
src/vpp-api/python/vpp_papi/vpp_serializer.py
test/test_ip4.py
test/test_ip6.py
test/test_l2bd_arp_term.py
test/test_map.py
test/test_syslog.py
test/vpp_igmp.py
test/vpp_ip.py
test/vpp_papi_provider.py
test/vpp_udp_encap.py