diff options
author | Matus Fabian <matfabia@cisco.com> | 2018-07-19 22:45:25 -0700 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2018-08-02 17:17:47 +0000 |
commit | c6c0d2a077a77a126d642ff12dd326222cf13a7a (patch) | |
tree | abcf965c9342a9fdb438e8c21386147850771b6a /test/test_nat.py | |
parent | e4a9eb7873f140f88be7fffb83e1215fbf181116 (diff) |
NAT44: LB NAT - local backends in multiple VRFs (VPP-1345)
Add support for local backends in multiple VRFs for load-balancing NAT rules.
Change-Id: I64e6818bd67a7e69985003498cf1f16f7200c334
Signed-off-by: Matus Fabian <matfabia@cisco.com>
Diffstat (limited to 'test/test_nat.py')
-rw-r--r-- | test/test_nat.py | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/test/test_nat.py b/test/test_nat.py index 363df719a75..4bae7015145 100644 --- a/test/test_nat.py +++ b/test/test_nat.py @@ -108,7 +108,6 @@ class MethodHolder(VppTestCase): lb_sm.external_addr, lb_sm.external_port, lb_sm.protocol, - vrf_id=lb_sm.vrf_id, twice_nat=lb_sm.twice_nat, self_twice_nat=lb_sm.self_twice_nat, out2in_only=lb_sm.out2in_only, @@ -3433,10 +3432,12 @@ class TestNAT44EndpointDependent(MethodHolder): locals = [{'addr': server1.ip4n, 'port': local_port, - 'probability': 70}, + 'probability': 70, + 'vrf_id': 0}, {'addr': server2.ip4n, 'port': local_port, - 'probability': 30}] + 'probability': 30, + 'vrf_id': 0}] self.nat44_add_address(self.nat_addr) self.vapi.nat44_add_del_lb_static_mapping(external_addr_n, @@ -3515,10 +3516,12 @@ class TestNAT44EndpointDependent(MethodHolder): locals = [{'addr': server1.ip4n, 'port': local_port, - 'probability': 90}, + 'probability': 90, + 'vrf_id': 0}, {'addr': server2.ip4n, 'port': local_port, - 'probability': 10}] + 'probability': 10, + 'vrf_id': 0}] self.nat44_add_address(self.nat_addr) self.vapi.nat44_add_del_lb_static_mapping(external_addr_n, @@ -3560,10 +3563,12 @@ class TestNAT44EndpointDependent(MethodHolder): locals = [{'addr': server1.ip4n, 'port': local_port, - 'probability': 70}, + 'probability': 70, + 'vrf_id': 0}, {'addr': server2.ip4n, 'port': local_port, - 'probability': 30}] + 'probability': 30, + 'vrf_id': 0}] self.vapi.nat44_forwarding_enable_disable(1) self.vapi.nat44_add_del_lb_static_mapping(external_addr_n, @@ -3998,10 +4003,12 @@ class TestNAT44EndpointDependent(MethodHolder): else: locals = [{'addr': server1.ip4n, 'port': port_in1, - 'probability': 50}, + 'probability': 50, + 'vrf_id': 0}, {'addr': server2.ip4n, 'port': port_in2, - 'probability': 50}] + 'probability': 50, + 'vrf_id': 0}] out_addr_n = socket.inet_pton(socket.AF_INET, self.nat_addr) self.vapi.nat44_add_del_lb_static_mapping(out_addr_n, port_out, |