diff options
author | Matej Klotton <mklotton@cisco.com> | 2016-11-04 11:11:44 +0100 |
---|---|---|
committer | Damjan Marion <dmarion.lists@gmail.com> | 2016-11-11 10:29:04 +0000 |
commit | 0178d52384e0428368f1acf3163e664ecda7b64c (patch) | |
tree | 8f6e09a23ca9b332df92f0ac16cc7d2526d7e4b6 /test/vpp_papi_provider.py | |
parent | 9db551cf50da13bf82d3a735ea6b56912a97d5c6 (diff) |
Add IRB test
- JIRA: CSIT-255
- create loopback interfaces
- move pg-interface specific arp and neighbor discovery from vpp_interface to vpp_pg_interface
- base configuration of IRB tests
- IP test scenario
Change-Id: I9945a188163652a4e22325877aef008c4d029557
Signed-off-by: Matej Klotton <mklotton@cisco.com>
Diffstat (limited to 'test/vpp_papi_provider.py')
-rw-r--r-- | test/vpp_papi_provider.py | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/test/vpp_papi_provider.py b/test/vpp_papi_provider.py index f0eb410bf30..10445de625c 100644 --- a/test/vpp_papi_provider.py +++ b/test/vpp_papi_provider.py @@ -277,6 +277,13 @@ class VppPapiProvider(object): """ return self.api(vpp_papi.create_vlan_subif, (sw_if_index, vlan)) + def create_loopback(self, mac=''): + """ + + :param mac: (Optional) + """ + return self.api(vpp_papi.create_loopback, (mac,)) + def ip_add_del_route( self, dst_address, @@ -352,3 +359,35 @@ class VppPapiProvider(object): dst_address_length, dst_address, next_hop_address)) + + def ip_neighbor_add_del(self, + sw_if_index, + mac_address, + dst_address, + vrf_id=0, + is_add=1, + is_ipv6=0, + is_static=0, + ): + """ Add neighbor MAC to IPv4 or IPv6 address. + + :param sw_if_index: + :param mac_address: + :param dst_address: + :param vrf_id: (Default value = 0) + :param is_add: (Default value = 1) + :param is_ipv6: (Default value = 0) + :param is_static: (Default value = 0) + """ + + return self.api( + vpp_papi.ip_neighbor_add_del, + (vrf_id, + sw_if_index, + is_add, + is_ipv6, + is_static, + mac_address, + dst_address + ) + ) |