network.external is only present if one is using the external_net_db
mixin. This patch just adds a check to see network has the attribute
external to avoid an Attribute error.
Closes-bug:
1441793
Change-Id: Ic003879b557a8c7ab52268a95d08d6d710618438
s['dns_nameservers'],
s['host_routes'],
s['allocation_pools'])
- if network.external:
+ if hasattr(network, 'external') and network.external:
self._update_router_gw_ports(context,
subnet['id'],
subnet['network_id'])
s['dns_nameservers'],
s['host_routes'],
s['allocation_pools'])
- if network.external:
+ if hasattr(network, 'external') and network.external:
self._update_router_gw_ports(context,
subnet['id'],
subnet['network_id'])