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>
diff --git a/test/test_syslog.py b/test/test_syslog.py
index a545130..9b328be 100644
--- a/test/test_syslog.py
+++ b/test/test_syslog.py
@@ -94,10 +94,10 @@
""" Syslog Protocol test """
self.vapi.syslog_set_sender(self.pg0.remote_ip4n, self.pg0.local_ip4n)
config = self.vapi.syslog_get_sender()
- self.assertEqual(config.collector_address,
- self.pg0.remote_ip4n)
+ self.assertEqual(str(config.collector_address),
+ self.pg0.remote_ip4)
self.assertEqual(config.collector_port, 514)
- self.assertEqual(config.src_address, self.pg0.local_ip4n)
+ self.assertEqual(str(config.src_address), self.pg0.local_ip4)
self.assertEqual(config.vrf_id, 0)
self.assertEqual(config.max_msg_size, 480)