neutron_tempest_plugin.bgpvpn.scenario package

Submodules

neutron_tempest_plugin.bgpvpn.scenario.manager module

class neutron_tempest_plugin.bgpvpn.scenario.manager.NetworkScenarioTest(*args, **kwargs)

Bases: ScenarioTest

Base class for network scenario tests.

This class provide helpers for network scenario tests, using the neutron API. Helpers from ancestor which use the nova network API are overridden with the neutron API.

This Class also enforces using Neutron instead of novanetwork. Subclassed tests will be skipped if Neutron is not enabled

class neutron_tempest_plugin.bgpvpn.scenario.manager.ScenarioTest(*args, **kwargs)

Bases: NetworkScenarioTest

Base class for scenario tests. Uses tempest own clients.

neutron_tempest_plugin.bgpvpn.scenario.test_bgpvpn_basic module

class neutron_tempest_plugin.bgpvpn.scenario.test_bgpvpn_basic.TestBGPVPNBasic(*args, **kwargs)

Bases: BaseBgpvpnTest, NetworkScenarioTest

test_bgpvpn_basic()

Test idempotent id: afdd6cad-871a-4343-b97b-6319c76c815d

This test checks basic BGPVPN.

  1. Create networks A and B with their respective subnets

  2. Start up server 1 in network A

  3. Start up server 2 in network B

  4. Associate network A and network B to a given L3 BGPVPN

  5. Create router and connect it to network A

  6. Give a FIP to server 1

  7. Check that server 1 can ping server 2

test_bgpvpn_negative_delete_bgpvpn()

Test idempotent id: dc92643f-1b2c-4a3e-bc5e-ea780d721ef7

This test checks BGPVPN delete.

  1. Create networks A and B with their respective subnets

  2. Create L3 BGPVPN

  3. Associate network A and network B to a given L3 BGPVPN

  4. Start up server 1 in network A

  5. Start up server 2 in network B

  6. Create router and connect it to network A

  7. Give a FIP to server 1

  8. Check that server 1 can ping server 2

  9. Delete L3 BGPVPN

  10. Check that server 1 cannot ping server 2

test_bgpvpn_negative_delete_net_association()

Test idempotent id: 2e6bf893-1410-4ef6-9948-1877f3a8f3d1

This test checks BGPVPN net association delete.

  1. Create networks A and B with their respective subnets

  2. Create L3 BGPVPN

  3. Associate network A and network B to a given L3 BGPVPN

  4. Start up server 1 in network A

  5. Start up server 2 in network B

  6. Create router and connect it to network A

  7. Give a FIP to server 1

  8. Check that server 1 can ping server 2

  9. Delete association of network A

  10. Check that server 1 cannot ping server 2

test_bgpvpn_negative_delete_router_association()

Test idempotent id: 9ebf4342-4448-4d63-98f9-44d3a606b6cf

This test checks BGPVPN router association delete.

  1. Create networks A and B with their respective subnets

  2. Create router and connect it to network B

  3. Create L3 BGPVPN

  4. Associate network A to a given L3 BGPVPN

  5. Associate router B to a given L3 BGPVPN

  6. Start up server 1 in network A

  7. Start up server 2 in network B

  8. Create router and connect it to network A

  9. Give a FIP to server 1

  10. Check that server 1 can ping server 2

  11. Delete association of router B

  12. Check that server 1 cannot ping server 2

test_bgpvpn_negative_disjoint_import_export()

Test idempotent id: b6d219b2-90bb-431f-a566-bf6a780d1578

This test checks basic BGPVPN.

  1. Create networks A and B with their respective subnets

  2. Create invalid L3 BGPVPN with eRT<>iRT that is insufficient for proper connectivity between network A and B

  3. Associate network A and B to a given L3 BGPVPN

  4. Start up server 1 in network A

  5. Start up server 2 in network B

  6. Create router and connect it to network A

  7. Give a FIP to server 1

  8. Check that server 1 cannot ping server 2

test_bgpvpn_negative_ping_to_unassociated_net()

Test idempotent id: 8478074e-22df-4234-b02b-61257b475b18

This test checks basic BGPVPN.

  1. Create networks A and B with their respective subnets

  2. Create L3 BGPVPN

  3. Associate network A to a given L3 BGPVPN

  4. Start up server 1 in network A

  5. Start up server 2 in network B

  6. Create router and connect it to network A

  7. Give a FIP to server 1

  8. Check that server 1 cannot ping server 2

test_bgpvpn_negative_update_to_disjoint_import_export()

Test idempotent id: be4471b3-5f57-4022-b719-b45a673a728b

This test checks basic BGPVPN route targets update.

  1. Create networks A and B with their respective subnets

  2. Create L3 BGPVPN with only RT defined

  3. Start up server 1 in network A

  4. Start up server 2 in network B

  5. Associate network A to a given L3 BGPVPN

  6. Create router and connect it to network A

  7. Give a FIP to server 1

  8. Check that server 1 can ping server 2

  9. Update L3 BGPVPN to have eRT<>iRT and no RT what is insufficient for proper connectivity between network A and B

  10. Check that server 1 cannot ping server 2

test_bgpvpn_negative_update_to_empty_rt_list()

Test idempotent id: fb37a546-7263-4ffe-a42c-77eca377ff1a

This test checks basic BGPVPN route targets update.

  1. Create networks A and B with their respective subnets

  2. Create L3 BGPVPN with only RT defined

  3. Start up server 1 in network A

  4. Start up server 2 in network B

  5. Associate network A and B to a given L3 BGPVPN

  6. Create router and connect it to network A

  7. Give a FIP to server 1

  8. Check that server 1 can ping server 2

  9. Update L3 BGPVPN to empty RT list what is insufficient for proper connectivity between network A and B

  10. Check that server 1 cannot ping server 2

test_bgpvpn_port_association_bgpvpn_route()

Test idempotent id: 73f629fa-fdae-40fc-8a7e-da3aedcf797a

Test port association routes of type ‘bgpvpn’

In this test we use a Port Association with a ‘bgpvpn’ route to have VM 1 in network A, reach a VM 3 in network C via the Port of a VM 2 (on network B), and vice-versa. For A->C traffic, one Port Association associates the port of VM 2 to a BGPVPN, with a route of type ‘bgpvpn’ redistributing routes from network C. For C->A traffic, another Port Association associates the port of VM 2 to a BGPVPN, with a route of type ‘bgpvpn’ redistributing routes from network A.

The use of RT in this test is a bit complex, and would be much simpler if we were using a VM with two interfaces.

We confirm that VM 1 can join VM 3, and we confirm that the traffic actually goes through VM 2, by turning ip_forwaring off then on in VM2.

test_bgpvpn_port_association_create_and_delete()

Test idempotent id: 9c3280b5-0b32-4562-800c-0b50d9d52bfd

This test checks port association in BGPVPN.

  1. Create networks A and B with their respective subnets

  2. Create L3 BGPVPN

  3. Create router and connect it to network A

  4. Create router and connect it to network B

  5. Start up server 1 in network A

  6. Start up server 2 in network B

  7. Give a FIP to all servers

  8. Configure ip forwarding on server 2

  9. Configure alternative loopback address on server 2

  10. Associate network A to a given L3 BGPVPN

  11. Associate port of server 2 to a given L3 BGPVPN

  12. Check that server 1 can ping server’s 2 alternative ip

  13. Remove created before port association

  14. Check that server 1 cannot ping server’s 2 alternative ip

test_bgpvpn_port_association_create_and_update()

Test idempotent id: 3b44b2f4-f514-4004-8623-2682bc46bb07

This test checks port association in BGPVPN.

  1. Create networks A and B with their respective subnets

  2. Create L3 BGPVPN

  3. Create router and connect it to network A

  4. Create router and connect it to network B

  5. Start up server 1 in network A

  6. Start up server 2 in network B

  7. Give a FIP to all servers

  8. Configure ip forwarding on server 2

  9. Configure alternative loopback address on server 2

  10. Associate network A to a given L3 BGPVPN

  11. Associate port of server 2 to a given L3 BGPVPN

  12. Check that server 1 can ping server’s 2 alternative ip

  13. Update created before port association by routes removal

  14. Check that server 1 cannot ping server’s 2 alternative ip

test_bgpvpn_port_association_local_pref()

Test idempotent id: 876b49bc-f34a-451b-ba3c-d74295838130

This test checks port association in BGPVPN.

  1. Create networks A and B with their respective subnets

  2. Create L3 BGPVPN

  3. Start up server 1 in network A

  4. Start up server 2 in network B

  5. Start up server 3 in network B

  6. Create router and connect it to network A

  7. Create router and connect it to network B

  8. Give a FIP to all servers

  9. Setup dummy HTTP service on server 2 and 3

  10. Configure ip forwarding on server 2

  11. Configure ip forwarding on server 3

  12. Configure alternative loopback address on server 2

  13. Configure alternative loopback address on server 3

  14. Associate network A to a given L3 BGPVPN

  15. Associate port of server 2 to a given L3 BGPVPN with higher local_pref value

  16. Associate port of server 3 to a given L3 BGPVPN with lower local_pref value

  17. Check that server 1 pings server’s 2 alternative ip

  18. Update port association of server 2 to have now lower local_pref value

  19. Update port association of server 3 to have now higher local_pref value

  20. Check that server 1 pings now server’s 3 alternative ip

test_bgpvpn_tenant_separation_and_local_connectivity()

Test idempotent id: f762e6ac-920e-4d0f-aa67-02bdd4ab8433

This test checks tenant separation for BGPVPN.

  1. Create networks A with subnet S1 and S2

  2. Create networks A-Bis with subnet S1 and S2 (like for network A)

  3. Create L3 BGPVPN for network A with self.RT1

  4. Create L3 BGPVPN for network A-Bis with self.RT2

  5. Associate network A to a given L3 BGPVPN

  6. Associate network A-Bis to a given L3 BGPVPN

  7. Start up server 1 in network A and subnet S1

  8. Start up server 2 in network A-Bis and subnet S1

  9. Start up server 3 in network A and subnet S1

  10. Start up server 4 in network A-Bis and subnet S1

  11. Start up server 5 in network A and subnet S1

  12. Create router A and connect it to network A

  13. Create router A-Bis and connect it to network A-Bis

  14. Give a FIP to all servers

  15. Setup dummy HTTP service on server 2 and 3

  16. Check that server 1 pings server 3 instead of server 2

  17. Check that server 1 can ping server 3

  18. Check that server 2 cannot ping server 1

  19. Check that server 2 pings itself instead of server 3

  20. Check that server 2 can ping server 4

  21. Check that server 2 pings server 4 instead of server 5

test_bgpvpn_update_route_targets_and_unassociated_net()

Test idempotent id: 08d4f40e-3cec-485b-9da2-76e67fbd9881

This test checks basic BGPVPN route targets update.

  1. Create networks A and B with their respective subnets

  2. Start up server 1 in network A

  3. Start up server 2 in network B

  4. Create invalid L3 BGPVPN with eRT<>iRT that is insufficient for proper connectivity between network A and B

  5. Associate network A to a given L3 BGPVPN

  6. Create router and connect it to network A

  7. Give a FIP to server 1

  8. Check that server 1 cannot ping server 2

  9. Associate network B to a given L3 BGPVPN

  10. Check that server 1 cannot ping server 2

  11. Update L3 BGPVPN to have only RT defined

  12. Check that server 1 can ping server 2

test_bgpvpn_update_route_targets_common_target()

Test idempotent id: bf417cad-0bc4-446a-b367-850aa619ca4f

This test checks basic BGPVPN route targets update.

  1. Create networks A and B with their respective subnets

  2. Start up server 1 in network A

  3. Start up server 2 in network B

  4. Create L3 BGPVPN with only RT defined

  5. Associate network A to a given L3 BGPVPN

  6. Create router and connect it to network A

  7. Give a FIP to server 1

  8. Check that server 1 can ping server 2

  9. Update L3 BGPVPN to have eRT<>iRT and RT=iRT

  10. Check that server 1 can ping server 2

  11. Update L3 BGPVPN to have again only RT defined

  12. Check that server 1 can ping again server 2

test_bgpvpn_update_route_targets_disjoint_targets()

Test idempotent id: 133497a1-2788-40f7-be01-b3b64b5ef8cd

This test checks basic BGPVPN route targets update.

  1. Create networks A and B with their respective subnets

  2. Start up server 1 in network A

  3. Start up server 2 in network B

  4. Create L3 BGPVPN with only RT defined

  5. Associate network A to a given L3 BGPVPN

  6. Create router and connect it to network A

  7. Give a FIP to server 1

  8. Check that server 1 can ping server 2

  9. Update L3 BGPVPN to have eRT<>iRT and no RT what is insufficient for proper connectivity between network A and B

  10. Check that server 1 cannot ping server 2

  11. Update L3 BGPVPN to have again only RT defined

  12. Check that server 1 can ping again server 2

test_bgpvpn_update_rt_and_keep_local_connectivity_variant1()

Test idempotent id: c8bfd695-f731-47a6-86e3-3dfa492e08e0

This test checks basic BGPVPN route targets update.

  1. Create networks A and B with their respective subnets

  2. Start up server 1 in network A

  3. Start up server 2 in network B

  4. Start up server 3 in network A

  5. Start up server 4 in network B

  6. Create invalid L3 BGPVPN with eRT<>iRT that is insufficient for proper connectivity between network A and B

  7. Associate network A to a given L3 BGPVPN

  8. Create router A and connect it to network A

  9. Give a FIP to server 1

  10. Check that server 1 cannot ping server 2

  11. Check that server 1 can ping server 3

  12. Associate network B to a given L3 BGPVPN

  13. Create router B and connect it to network B

  14. Give a FIP to server 2

  15. Check that server 1 still cannot ping server 2

  16. Check that server 2 can ping server 4

  17. Update L3 BGPVPN to have now only RT defined

  18. Check that server 1 can now ping server 2

  19. Check that server 1 still can ping server 3

  20. Check that server 2 still can ping server 4

test_bgpvpn_update_rt_and_keep_local_connectivity_variant2()

Test idempotent id: 758a8731-5070-4b1e-9a66-d6ff05bb5be1

This test checks basic BGPVPN route targets update.

  1. Create networks A and B with their respective subnets

  2. Start up server 1 in network A

  3. Start up server 2 in network B

  4. Start up server 3 in network A

  5. Start up server 4 in network B

  6. Create invalid L3 BGPVPN with eRT<>iRT that is insufficient for proper connectivity between network A and B

  7. Create router A and connect it to network A

  8. Give a FIP to server 1

  9. Create router B and connect it to network B

  10. Give a FIP to server 4

  11. Associate network A to a given L3 BGPVPN

  12. Check that server 1 cannot ping server 2

  13. Check that server 1 can ping server 3

  14. Associate router B to a given L3 BGPVPN

  15. Check that server 1 still cannot ping server 2

  16. Check that server 4 can ping server 2

  17. Update L3 BGPVPN to have now only RT defined

  18. Check that server 1 can now ping server 2

  19. Check that server 1 still can ping server 3

  20. Check that server 4 still can ping server 2

test_bgpvpn_variant1()

Test idempotent id: 8a5a6fac-313c-464b-9c5c-29d4e1c0a51e

This test checks basic BGPVPN.

  1. Create networks A and B with their respective subnets

  2. Associate network A and network B to a given L3 BGPVPN

  3. Start up server 1 in network A

  4. Start up server 2 in network B

  5. Create router and connect it to network A

  6. Give a FIP to server 1

  7. Check that server 1 can ping server 2

test_bgpvpn_variant2()

Test idempotent id: e7468636-0816-4092-82ca-3590680ed00b

This test checks basic BGPVPN.

  1. Create networks A and B with their respective subnets

  2. Start up server 1 in network A

  3. Start up server 2 in network B

  4. Create router and associate to network B

  5. Associate network A and network B to a given L3 BGPVPN

  6. Create router and connect it to network A

  7. Give a FIP to server 1

  8. Check that server 1 can ping server 2

test_bgpvpn_variant3()

Test idempotent id: 7c66aa31-fb3a-4e15-8808-46eb361f153a

This test checks basic BGPVPN.

  1. Create networks A and B with their respective subnets

  2. Start up server 1 in network A

  3. Start up server 2 in network B

  4. Create router and connect it to network B

  5. Associate network A and network B to a given L3 BGPVPN

  6. Delete router associated to network B

  7. Create router and connect it to network A

  8. Give a FIP to server 1

  9. Check that server 1 can ping server 2

test_bgpvpn_variant4()

Test idempotent id: 973ab26d-c7d8-4a32-9aa9-2d7e6f406135

This test checks basic BGPVPN.

  1. Create networks A and B with their respective subnets

  2. Start up server 1 in network A

  3. Start up server 2 in network B

  4. Associate network A and network B to a given L3 BGPVPN

  5. Create router and connect it to network B

  6. Create router and connect it to network A

  7. Give a FIP to server 1

  8. Check that server 2 can ping server 1

test_bgpvpn_variant5()

Test idempotent id: 2ac0696b-e828-4299-9e94-5f9c4988d961

This test checks basic BGPVPN.

  1. Create networks A and B with their respective subnets

  2. Create router and connect it to network B

  3. Associate network A and network B to a given L3 BGPVPN

  4. Start up server 1 in network A

  5. Start up server 2 in network B

  6. Create router and connect it to network A

  7. Give a FIP to server 1

  8. Check that server 2 can ping server 1

test_bgpvpn_variant6()

Test idempotent id: 9081338e-a52e-46bb-a40e-bda24ec4b1bd

This test checks basic BGPVPN.

  1. Create networks A and B with their respective subnets

  2. Associate network A and network B to a given L3 BGPVPN

  3. Create router and connect it to network B

  4. Start up server 1 in network A

  5. Start up server 2 in network B

  6. Create router and connect it to network A

  7. Give a FIP to server 1

  8. Check that server 2 can ping server 1

test_port_association_many_bgpvpn_routes()

Test idempotent id: d92a8a18-c4d0-40d5-8592-713d7dae7d25

This test checks port association in BGPVPN.

  1. Create networks A and B with their respective subnets

  2. Create L3 BGPVPN

  3. Create router and connect it to network A

  4. Create router and connect it to network B

  5. Start up server 1 in network A

  6. Start up server 2 in network B

  7. Give a FIP to all servers

  8. Configure ip forwarding on server 2

  9. Configure alternative loopback address on server 2

  10. Associate network A to a given L3 BGPVPN

  11. Associate port of server 2 to a given L3 BGPVPN

  12. Check that server 1 can ping server’s 2 alternative ip

  13. Update created before port association by routes removal

  14. Check that server 1 cannot ping server’s 2 alternative ip

neutron_tempest_plugin.bgpvpn.scenario.test_bgpvpn_basic.assign_24(idx)

Module contents