Merge "Ignore exceptions getting FloatingIP dependencies"
This commit is contained in:
commit
1fcb3f7bde
|
@ -12,6 +12,8 @@
|
|||
# under the License.
|
||||
import six
|
||||
|
||||
from oslo_log import log as logging
|
||||
|
||||
from heat.common import exception
|
||||
from heat.common.i18n import _
|
||||
from heat.engine import attributes
|
||||
|
@ -23,6 +25,8 @@ from heat.engine.resources.openstack.neutron import router
|
|||
from heat.engine import support
|
||||
from heat.engine import translation
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class FloatingIP(neutron.NeutronResource):
|
||||
"""A resource for managing Neutron floating ips.
|
||||
|
@ -228,8 +232,14 @@ class FloatingIP(neutron.NeutronResource):
|
|||
# where we can report them in their proper context.
|
||||
return False
|
||||
if p_net:
|
||||
network = self.client().show_network(p_net)['network']
|
||||
return subnet in network['subnets']
|
||||
try:
|
||||
network = self.client().show_network(p_net)['network']
|
||||
return subnet in network['subnets']
|
||||
except Exception as exc:
|
||||
LOG.info("Ignoring Neutron error while "
|
||||
"getting FloatingIP dependencies: %s",
|
||||
six.text_type(exc))
|
||||
return False
|
||||
else:
|
||||
try:
|
||||
fixed_ips = resource.properties.get(port.Port.FIXED_IPS)
|
||||
|
|
Loading…
Reference in New Issue