]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Allow to clear extra routes in NVP
authorarmando-migliaccio <amigliaccio@nicira.com>
Fri, 19 Jul 2013 00:53:18 +0000 (17:53 -0700)
committerarmando-migliaccio <amigliaccio@nicira.com>
Fri, 19 Jul 2013 00:55:01 +0000 (17:55 -0700)
Since the neutron client can unset any attribute, ensure
we can handle empty routes as a way to clear the extraroutes
for the router.

Fixes bug #1202890

Change-Id: Ib240a42ba1075d9a410da904b3d3ae9e19b2d86e

neutron/plugins/nicira/nvplib.py

index 88b2b848c10a33fedc9a8db3a7d6b3306c2b6ce9..7d35d2c9716c48097dcdf5d1f0ab40babfa8430d 100644 (file)
@@ -567,7 +567,7 @@ def update_explicit_routing_lrouter(cluster, router_id,
     if next_hop:
         update_default_gw_explicit_routing_lrouter(cluster,
                                                    router_id, next_hop)
-    if routes:
+    if routes is not None:
         return update_explicit_routes_lrouter(cluster, router_id, routes)