diff options
author | Ole Troan <ot@cisco.com> | 2019-03-04 23:55:43 +0100 |
---|---|---|
committer | Ole Troan <ot@cisco.com> | 2019-03-04 23:55:43 +0100 |
commit | e1ade684eb5a7e5743abfda47488165452cc5b64 (patch) | |
tree | 63b4e3ccc361904b42e0020bfc16b4d110cd0095 /test/test_dvr.py | |
parent | fd06084a9e86c5f67c4b1dc37e78a95a9bacf2a4 (diff) |
test framework: Fix wrapper functions to match API message names.
In preparation to remove the wrappers in vpp_papi_provider.py, ensure
names used in tests match the actual API message names.
Change-Id: I230ca4eb75aa727ff68d702e085a2edbbc6b6d19
Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'test/test_dvr.py')
-rw-r--r-- | test/test_dvr.py | 52 |
1 files changed, 28 insertions, 24 deletions
diff --git a/test/test_dvr.py b/test/test_dvr.py index 7a744baf76c..d2088ea2320 100644 --- a/test/test_dvr.py +++ b/test/test_dvr.py @@ -91,12 +91,14 @@ class TestDVR(VppTestCase): self.vapi.sw_interface_set_l2_bridge(self.loop0.sw_if_index, 1, port_type=L2_PORT_TYPE.BVI) - self.vapi.sw_interface_set_l2_tag_rewrite(sub_if_on_pg2.sw_if_index, - L2_VTR_OP.L2_POP_1, - 92) - self.vapi.sw_interface_set_l2_tag_rewrite(sub_if_on_pg3.sw_if_index, - L2_VTR_OP.L2_POP_1, - 93) + self.vapi.l2_interface_vlan_tag_rewrite( + sub_if_on_pg2.sw_if_index, + L2_VTR_OP.L2_POP_1, + 92) + self.vapi.l2_interface_vlan_tag_rewrite( + sub_if_on_pg3.sw_if_index, + L2_VTR_OP.L2_POP_1, + 93) # # Add routes to bridge the traffic via a tagged an nontagged interface @@ -291,12 +293,14 @@ class TestDVR(VppTestCase): self.vapi.sw_interface_set_l2_bridge(self.pg1.sw_if_index, 1) self.vapi.sw_interface_set_l2_bridge(sub_if_on_pg2.sw_if_index, 1) self.vapi.sw_interface_set_l2_bridge(sub_if_on_pg3.sw_if_index, 1) - self.vapi.sw_interface_set_l2_tag_rewrite(sub_if_on_pg2.sw_if_index, - L2_VTR_OP.L2_POP_1, - 92) - self.vapi.sw_interface_set_l2_tag_rewrite(sub_if_on_pg3.sw_if_index, - L2_VTR_OP.L2_POP_1, - 93) + self.vapi.l2_interface_vlan_tag_rewrite( + sub_if_on_pg2.sw_if_index, + L2_VTR_OP.L2_POP_1, + 92) + self.vapi.l2_interface_vlan_tag_rewrite( + sub_if_on_pg3.sw_if_index, + L2_VTR_OP.L2_POP_1, + 93) # # Disable UU flooding, learning and ARP terminaation. makes this test @@ -326,10 +330,10 @@ class TestDVR(VppTestCase): # # Enable L3 extraction on pgs # - self.vapi.sw_interface_set_l2_emulation(self.pg0.sw_if_index) - self.vapi.sw_interface_set_l2_emulation(self.pg1.sw_if_index) - self.vapi.sw_interface_set_l2_emulation(sub_if_on_pg2.sw_if_index) - self.vapi.sw_interface_set_l2_emulation(sub_if_on_pg3.sw_if_index) + self.vapi.l2_emulation(self.pg0.sw_if_index) + self.vapi.l2_emulation(self.pg1.sw_if_index) + self.vapi.l2_emulation(sub_if_on_pg2.sw_if_index) + self.vapi.l2_emulation(sub_if_on_pg3.sw_if_index) # # now we expect the packet forward according to the DVR route @@ -358,14 +362,14 @@ class TestDVR(VppTestCase): # # cleanup # - self.vapi.sw_interface_set_l2_emulation(self.pg0.sw_if_index, - enable=0) - self.vapi.sw_interface_set_l2_emulation(self.pg1.sw_if_index, - enable=0) - self.vapi.sw_interface_set_l2_emulation(sub_if_on_pg2.sw_if_index, - enable=0) - self.vapi.sw_interface_set_l2_emulation(sub_if_on_pg3.sw_if_index, - enable=0) + self.vapi.l2_emulation(self.pg0.sw_if_index, + enable=0) + self.vapi.l2_emulation(self.pg1.sw_if_index, + enable=0) + self.vapi.l2_emulation(sub_if_on_pg2.sw_if_index, + enable=0) + self.vapi.l2_emulation(sub_if_on_pg3.sw_if_index, + enable=0) self.vapi.sw_interface_set_l2_bridge(self.pg0.sw_if_index, 1, enable=0) |