Detect neutron endpoint on-the-fly

This change does the following:
- reverts commit 04de60093b
- reimplements Resource.is_using_neutron to check for neutron by
  attempting to create a neutron client
- fix mocking in tests for changes which landed after 04de600

If there is no 'network' entry in the service catalog then
keystoneclient will raise an EndpointNotFound. The context will
already have a keystone client cached which has a full service catalog
locally, so calling is_using_neutron should have no particular overhead.

This fixes a tripleo regression where the autodetection is triggered
before keystone is ready, so that heat-engine fails to start. This
race does not affect devstack as keystone is fully configured before
heat services are started.

Not adding config option networking_service will also prevent
extra work required by downstream installation tools.

Change-Id: I45a6154fa560f672d8d1942bf57f39601110bfc6
Closes-Bug: #1362812
This commit is contained in:
Steve Baker
2014-08-29 11:11:59 +12:00
parent 99a11f8633
commit d70da16894
8 changed files with 32 additions and 42 deletions

View File

@@ -73,10 +73,6 @@
# Deprecated. (string value)
#onready=<None>
# Select OpenStack component responsible for networking - nova
# or neutron. (string value)
#networking_service=<None>
#
# Options defined in heat.common.config