Merge "Revert "NSXv: Don't remove default static routes on edge""
This commit is contained in:
commit
b9670c500f
@ -692,15 +692,6 @@ class EdgeApplianceDriver(object):
|
||||
"description": "default-gateway",
|
||||
"gatewayAddress": gateway
|
||||
}
|
||||
else:
|
||||
# If external subnet has no gateway, then assume using ECMP with
|
||||
# multipule default static routes. Retain them.
|
||||
h, curr_routes = self.vcns.get_routes(edge_id)
|
||||
curr_routes = curr_routes.get('staticRoutes',
|
||||
{}).get('staticRoutes', [])
|
||||
default_routes = [r for r in curr_routes
|
||||
if r['network'] != '0.0.0.0/0']
|
||||
static_routes.extend(default_routes)
|
||||
try:
|
||||
self.vcns.update_routes(edge_id, request)
|
||||
return True
|
||||
|
Loading…
x
Reference in New Issue
Block a user