diff options
author | Jan <jgelety@cisco.com> | 2016-12-08 13:10:03 +0100 |
---|---|---|
committer | Damjan Marion <dmarion.lists@gmail.com> | 2017-01-11 11:57:39 +0000 |
commit | e546d3b0f739d35ec2e4702181d99ff4190e8b46 (patch) | |
tree | a2f0595c9706b750ed79b0ddfd945c7af62a05a1 /test/vpp_papi_provider.py | |
parent | 8cb07c9237787e66921f252be2ed2aa5557769c4 (diff) |
test: ip4 vrf instances multi-context test (CSIT-492)
- add/delete IPv4 VRF instances and verify results by parsing output
of ip_fib_dump API command and by traffic
Change-Id: I61ed5013adca29afd00b942f65be7bf964f38d85
Signed-off-by: Jan Gelety <jgelety@cisco.com>
Diffstat (limited to 'test/vpp_papi_provider.py')
-rw-r--r-- | test/vpp_papi_provider.py | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/test/vpp_papi_provider.py b/test/vpp_papi_provider.py index 0e4c0cdbbae..26edd4f2c2a 100644 --- a/test/vpp_papi_provider.py +++ b/test/vpp_papi_provider.py @@ -595,6 +595,54 @@ class VppPapiProvider(object): } ) + def reset_vrf(self, + vrf_id, + is_ipv6=0, + ): + """ Reset VRF (remove all routes etc.) request. + + :param int vrf_id: ID of the FIB table / VRF to reset. + :param int is_ipv6: 1 for IPv6 neighbor, 0 for IPv4. (Default = 0) + """ + + return self.api( + self.papi.reset_vrf, + {'vrf_id': vrf_id, + 'is_ipv6': is_ipv6, + } + ) + + def reset_fib(self, + vrf_id, + is_ipv6=0, + ): + """ Reset VRF (remove all routes etc.) request. + + :param int vrf_id: ID of the FIB table / VRF to reset. + :param int is_ipv6: 1 for IPv6 neighbor, 0 for IPv4. (Default = 0) + """ + + return self.api( + self.papi.reset_fib, + {'vrf_id': vrf_id, + 'is_ipv6': is_ipv6, + } + ) + + def ip_dump(self, + is_ipv6=0, + ): + """ Return IP dump. + + :param int is_ipv6: 1 for IPv6 neighbor, 0 for IPv4. (Default = 0) + """ + + return self.api( + self.papi.ip_dump, + {'is_ipv6': is_ipv6, + } + ) + def sw_interface_span_enable_disable( self, sw_if_index_from, sw_if_index_to, state=1): """ |