From bde4f6f767d3da4c3eca15390ea45a934f2ff398 Mon Sep 17 00:00:00 2001 From: Aaron Rosen Date: Mon, 20 Apr 2015 12:45:12 -0700 Subject: [PATCH] _create_subnet_from_implicit_pool assumes external network extension 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 --- neutron/db/db_base_plugin_v2.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/neutron/db/db_base_plugin_v2.py b/neutron/db/db_base_plugin_v2.py index 714d189e81f..b801fd57a38 100644 --- a/neutron/db/db_base_plugin_v2.py +++ b/neutron/db/db_base_plugin_v2.py @@ -1260,7 +1260,7 @@ class NeutronDbPluginV2(neutron_plugin_base_v2.NeutronPluginBaseV2, 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']) @@ -1286,7 +1286,7 @@ class NeutronDbPluginV2(neutron_plugin_base_v2.NeutronPluginBaseV2, 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'])