summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/release/release-notes/release-notes.rst10
-rw-r--r--sdnvpn/lib/utils.py44
-rw-r--r--sdnvpn/test/functest/testcase_1.py8
-rw-r--r--sdnvpn/test/functest/testcase_2.py8
-rw-r--r--sdnvpn/test/functest/testcase_3.py29
-rw-r--r--sdnvpn/test/functest/testcase_4.py8
-rw-r--r--sdnvpn/test/functest/testcase_7.py9
-rw-r--r--sdnvpn/test/functest/testcase_8.py6
8 files changed, 78 insertions, 44 deletions
diff --git a/docs/release/release-notes/release-notes.rst b/docs/release/release-notes/release-notes.rst
index f5e04cf..14a72d3 100644
--- a/docs/release/release-notes/release-notes.rst
+++ b/docs/release/release-notes/release-notes.rst
@@ -34,13 +34,13 @@ Release Data
| **Project** | sdnvpn |
| | |
+--------------------------------------+-------------------------------------------+
-| **Repo/tag** | Danube.2.0 |
+| **Repo/tag** | Danube.3.0 |
| | |
+--------------------------------------+-------------------------------------------+
-| **Release designation** | Danube 2.0 follow-up release |
+| **Release designation** | Danube 3.0 follow-up release |
| | |
+--------------------------------------+-------------------------------------------+
-| **Release date** | May 4 2017 |
+| **Release date** | June 23 2017 |
| | |
+--------------------------------------+-------------------------------------------+
| **Purpose of the delivery** | Including BGP stack - 6WIND Zrpcd/Quagga |
@@ -63,7 +63,7 @@ functest to guarantee functionality.
Module version changes
~~~~~~~~~~~~~~~~~~~~~~
-ODL has been upgraded to Boron SR2.
+ODL has been upgraded to Boron SR4.
Document changes
~~~~~~~~~~~~~~~~
@@ -141,8 +141,6 @@ OpenStack NAT does not work. Instances created in subnets that are connected to
the public network via a gateway should have external connectivity. This does
not work and can be worked around by assigning a Floating IP to the instance [1].
-For Apex the peering with the virtual Peer is not working due to limitation
-of apex networking.
Workarounds
-----------
diff --git a/sdnvpn/lib/utils.py b/sdnvpn/lib/utils.py
index 7e41d41..78bd09e 100644
--- a/sdnvpn/lib/utils.py
+++ b/sdnvpn/lib/utils.py
@@ -279,7 +279,7 @@ def wait_for_bgp_net_assoc(neutron_client, bgpvpn_id, net_id):
% (bgpvpn_id, net_id))
while tries > 0 and net_id not in nets:
- nets = os_utils.get_bgpvpn_networks(neutron_client, bgpvpn_id)
+ nets = get_bgpvpn_networks(neutron_client, bgpvpn_id)
time.sleep(sleep_time)
tries -= 1
if net_id not in nets:
@@ -303,7 +303,7 @@ def wait_for_bgp_router_assoc(neutron_client, bgpvpn_id, router_id):
logger.debug("Waiting for router %s to associate with BGPVPN %s "
% (bgpvpn_id, router_id))
while tries > 0 and router_id not in routers:
- routers = os_utils.get_bgpvpn_routers(neutron_client, bgpvpn_id)
+ routers = get_bgpvpn_routers(neutron_client, bgpvpn_id)
time.sleep(sleep_time)
tries -= 1
if router_id not in routers:
@@ -543,7 +543,7 @@ def cleanup_neutron(neutron_client, bgpvpn_ids, interfaces, subnet_ids,
if len(bgpvpn_ids) != 0:
for bgpvpn_id in bgpvpn_ids:
- os_utils.delete_bgpvpn(neutron_client, bgpvpn_id)
+ delete_bgpvpn(neutron_client, bgpvpn_id)
if len(interfaces) != 0:
for router_id, subnet_id in interfaces:
@@ -612,3 +612,41 @@ def cleanup_nova(nova_client, floatingip_ids, instance_ids, image_ids):
format(image_id))
return False
return True
+
+
+def create_bgpvpn(neutron_client, **kwargs):
+ # route_distinguishers
+ # route_targets
+ json_body = {"bgpvpn": kwargs}
+ return neutron_client.create_bgpvpn(json_body)
+
+
+def update_bgpvpn(neutron_client, bgpvpn_id, **kwargs):
+ json_body = {"bgpvpn": kwargs}
+ return neutron_client.update_bgpvpn(bgpvpn_id, json_body)
+
+
+def delete_bgpvpn(neutron_client, bgpvpn_id):
+ return neutron_client.delete_bgpvpn(bgpvpn_id)
+
+
+def get_bgpvpn(neutron_client, bgpvpn_id):
+ return neutron_client.show_bgpvpn(bgpvpn_id)
+
+
+def get_bgpvpn_routers(neutron_client, bgpvpn_id):
+ return get_bgpvpn(neutron_client, bgpvpn_id)['bgpvpn']['routers']
+
+
+def get_bgpvpn_networks(neutron_client, bgpvpn_id):
+ return get_bgpvpn(neutron_client, bgpvpn_id)['bgpvpn']['networks']
+
+
+def create_router_association(neutron_client, bgpvpn_id, router_id):
+ json_body = {"router_association": {"router_id": router_id}}
+ return neutron_client.create_router_association(bgpvpn_id, json_body)
+
+
+def create_network_association(neutron_client, bgpvpn_id, neutron_network_id):
+ json_body = {"network_association": {"network_id": neutron_network_id}}
+ return neutron_client.create_network_association(bgpvpn_id, json_body)
diff --git a/sdnvpn/test/functest/testcase_1.py b/sdnvpn/test/functest/testcase_1.py
index 2cd03b6..467c311 100644
--- a/sdnvpn/test/functest/testcase_1.py
+++ b/sdnvpn/test/functest/testcase_1.py
@@ -150,7 +150,7 @@ def main():
"route_distinguishers": TESTCASE_CONFIG.route_distinguishers,
"name": vpn_name
}
- bgpvpn = os_utils.create_bgpvpn(neutron_client, **kwargs)
+ bgpvpn = test_utils.create_bgpvpn(neutron_client, **kwargs)
bgpvpn_id = bgpvpn['bgpvpn']['id']
logger.debug("VPN created details: %s" % bgpvpn)
bgpvpn_ids.append(bgpvpn_id)
@@ -159,7 +159,7 @@ def main():
results.record_action(msg)
results.add_to_summary(0, "-")
- os_utils.create_network_association(
+ test_utils.create_network_association(
neutron_client, bgpvpn_id, network_1_id)
# Wait for VMs to get ips.
@@ -179,7 +179,7 @@ def main():
results.add_to_summary(0, "-")
results.record_action(msg)
results.add_to_summary(0, "-")
- os_utils.create_network_association(
+ test_utils.create_network_association(
neutron_client, bgpvpn_id, network_2_id)
test_utils.wait_for_bgp_net_assocs(neutron_client,
@@ -203,7 +203,7 @@ def main():
kwargs = {"import_targets": TESTCASE_CONFIG.targets1,
"export_targets": TESTCASE_CONFIG.targets1,
"name": vpn_name}
- bgpvpn = os_utils.update_bgpvpn(neutron_client, bgpvpn_id, **kwargs)
+ bgpvpn = test_utils.update_bgpvpn(neutron_client, bgpvpn_id, **kwargs)
logger.info("Waiting for the VMs to connect to each other using the"
" updated network configuration")
diff --git a/sdnvpn/test/functest/testcase_2.py b/sdnvpn/test/functest/testcase_2.py
index 61d81a3..f8d53de 100644
--- a/sdnvpn/test/functest/testcase_2.py
+++ b/sdnvpn/test/functest/testcase_2.py
@@ -181,7 +181,7 @@ def main():
"route_targets": TESTCASE_CONFIG.targets2,
"route_distinguishers": TESTCASE_CONFIG.route_distinguishers1,
"name": vpn1_name}
- bgpvpn1 = os_utils.create_bgpvpn(neutron_client, **kwargs)
+ bgpvpn1 = test_utils.create_bgpvpn(neutron_client, **kwargs)
bgpvpn1_id = bgpvpn1['bgpvpn']['id']
logger.debug("VPN1 created details: %s" % bgpvpn1)
bgpvpn_ids.append(bgpvpn1_id)
@@ -190,7 +190,7 @@ def main():
results.record_action(msg)
results.add_to_summary(0, "-")
- os_utils.create_network_association(
+ test_utils.create_network_association(
neutron_client, bgpvpn1_id, network_1_id)
# Wait for VMs to get ips.
@@ -224,7 +224,7 @@ def main():
"route_targets": TESTCASE_CONFIG.targets1,
"route_distinguishers": TESTCASE_CONFIG.route_distinguishers2,
"name": vpn2_name}
- bgpvpn2 = os_utils.create_bgpvpn(neutron_client, **kwargs)
+ bgpvpn2 = test_utils.create_bgpvpn(neutron_client, **kwargs)
bgpvpn2_id = bgpvpn2['bgpvpn']['id']
logger.debug("VPN created details: %s" % bgpvpn2)
bgpvpn_ids.append(bgpvpn2_id)
@@ -233,7 +233,7 @@ def main():
results.record_action(msg)
results.add_to_summary(0, "-")
- os_utils.create_network_association(
+ test_utils.create_network_association(
neutron_client, bgpvpn2_id, network_2_id)
test_utils.wait_for_bgp_net_assoc(neutron_client, bgpvpn1_id, network_1_id)
diff --git a/sdnvpn/test/functest/testcase_3.py b/sdnvpn/test/functest/testcase_3.py
index 85a8827..dbbdb59 100644
--- a/sdnvpn/test/functest/testcase_3.py
+++ b/sdnvpn/test/functest/testcase_3.py
@@ -262,26 +262,23 @@ def main():
results.add_failure(testcase)
results.add_to_summary(0, "=")
- # TODO remove this and include apex again
- installer_type = str(os.environ['INSTALLER_TYPE'].lower())
- if installer_type != "apex":
-
- results.add_to_summary(0, '-')
- results.add_to_summary(1, "Peer Quagga with OpenDaylight")
- results.add_to_summary(0, '-')
-
- neighbor = quagga.odl_add_neighbor(fake_fip['fip_addr'],
- controller_ext_ip,
- controller)
- peer = quagga.check_for_peering(controller)
- if neighbor and peer:
- results.add_success("Peering with quagga")
- else:
- results.add_failure("Peering with quagga")
+ results.add_to_summary(0, '-')
+ results.add_to_summary(1, "Peer Quagga with OpenDaylight")
+ results.add_to_summary(0, '-')
+
+ neighbor = quagga.odl_add_neighbor(fake_fip['fip_addr'],
+ controller_ext_ip,
+ controller)
+ peer = quagga.check_for_peering(controller)
finally:
test_utils.detach_instance_from_ext_br(quagga_vm, compute)
+ if neighbor and peer:
+ results.add_success("Peering with quagga")
+ else:
+ results.add_failure("Peering with quagga")
+
test_utils.cleanup_nova(nova_client, floatingip_ids, instance_ids,
image_ids)
test_utils.cleanup_neutron(neutron_client, bgpvpn_ids, interfaces,
diff --git a/sdnvpn/test/functest/testcase_4.py b/sdnvpn/test/functest/testcase_4.py
index 69c3461..871a4bb 100644
--- a/sdnvpn/test/functest/testcase_4.py
+++ b/sdnvpn/test/functest/testcase_4.py
@@ -154,7 +154,7 @@ def main():
"export_targets": TESTCASE_CONFIG.targets2,
"route_distinguishers": TESTCASE_CONFIG.route_distinguishers,
"name": vpn_name}
- bgpvpn = os_utils.create_bgpvpn(neutron_client, **kwargs)
+ bgpvpn = test_utils.create_bgpvpn(neutron_client, **kwargs)
bgpvpn_id = bgpvpn['bgpvpn']['id']
logger.debug("VPN created details: %s" % bgpvpn)
bgpvpn_ids.append(bgpvpn_id)
@@ -163,7 +163,7 @@ def main():
results.record_action(msg)
results.add_to_summary(0, "-")
- os_utils.create_router_association(
+ test_utils.create_router_association(
neutron_client, bgpvpn_id, router_1_id)
# Wait for VMs to get ips.
@@ -183,7 +183,7 @@ def main():
results.add_to_summary(0, "-")
results.record_action(msg)
results.add_to_summary(0, "-")
- os_utils.create_network_association(
+ test_utils.create_network_association(
neutron_client, bgpvpn_id, network_2_id)
test_utils.wait_for_bgp_router_assoc(
@@ -207,7 +207,7 @@ def main():
kwargs = {"import_targets": TESTCASE_CONFIG.targets1,
"export_targets": TESTCASE_CONFIG.targets1,
"name": vpn_name}
- bgpvpn = os_utils.update_bgpvpn(neutron_client, bgpvpn_id, **kwargs)
+ bgpvpn = test_utils.update_bgpvpn(neutron_client, bgpvpn_id, **kwargs)
logger.info("Waiting for the VMs to connect to each other using the"
" updated network configuration")
diff --git a/sdnvpn/test/functest/testcase_7.py b/sdnvpn/test/functest/testcase_7.py
index 48e26d5..07bb257 100644
--- a/sdnvpn/test/functest/testcase_7.py
+++ b/sdnvpn/test/functest/testcase_7.py
@@ -117,7 +117,7 @@ def main():
"export_targets": TESTCASE_CONFIG.targets,
"route_distinguishers": TESTCASE_CONFIG.route_distinguishers,
"name": vpn_name}
- bgpvpn = os_utils.create_bgpvpn(neutron_client, **kwargs)
+ bgpvpn = test_utils.create_bgpvpn(neutron_client, **kwargs)
bgpvpn_id = bgpvpn['bgpvpn']['id']
logger.debug("VPN created details: %s" % bgpvpn)
bgpvpn_ids.append(bgpvpn_id)
@@ -128,9 +128,9 @@ def main():
results.record_action(msg)
results.add_to_summary(0, "-")
- os_utils.create_network_association(
+ test_utils.create_network_association(
neutron_client, bgpvpn_id, network_1_id)
- os_utils.create_network_association(
+ test_utils.create_network_association(
neutron_client, bgpvpn_id, network_2_id)
test_utils.wait_for_bgp_net_assoc(
@@ -154,7 +154,8 @@ def main():
results.add_to_summary(0, '-')
fip = os_utils.create_floating_ip(neutron_client)
- fip_added = os_utils.add_floating_ip(nova_client, vm_2.id, fip['fip_addr'])
+ fip_added = os_utils.add_floating_ip(nova_client, vm_2.id,
+ fip['fip_addr'])
if fip_added:
results.add_success(msg)
else:
diff --git a/sdnvpn/test/functest/testcase_8.py b/sdnvpn/test/functest/testcase_8.py
index f08ead2..6961546 100644
--- a/sdnvpn/test/functest/testcase_8.py
+++ b/sdnvpn/test/functest/testcase_8.py
@@ -116,7 +116,7 @@ def main():
"export_targets": TESTCASE_CONFIG.targets,
"route_distinguishers": TESTCASE_CONFIG.route_distinguishers,
"name": vpn_name}
- bgpvpn = os_utils.create_bgpvpn(neutron_client, **kwargs)
+ bgpvpn = test_utils.create_bgpvpn(neutron_client, **kwargs)
bgpvpn_id = bgpvpn['bgpvpn']['id']
logger.debug("VPN created details: %s" % bgpvpn)
bgpvpn_ids.append(bgpvpn_id)
@@ -127,9 +127,9 @@ def main():
results.record_action(msg)
results.add_to_summary(0, "-")
- os_utils.create_router_association(
+ test_utils.create_router_association(
neutron_client, bgpvpn_id, router_1_id)
- os_utils.create_network_association(
+ test_utils.create_network_association(
neutron_client, bgpvpn_id, network_2_id)
test_utils.wait_for_bgp_router_assoc(