Using _handle_not_found_exception in resources

This patch replace duplicate code in neutron resources on
function _handle_not_found_exception defined in parent class.

Change-Id: I7f86f52a8d00590c83aad01bc26507c78f01ddbb
Closes-bug: #1267729
Don't query for resource during stack creation

In Resource.__init__, we unconditionally make a query on the resource
table even if the stack hasn't been stored yet and stack.id is None. The
patch adds a simple conditon to skip it.

Change-Id: Ic8f915d6bb82c95db0a65b029b09b864c1348f3d
New middleware to handle SSL termination proxies

The Heat API doesn't behave properly if it is behind an SSL termination
proxy. If this is the case, the HTTP redirections and the links
returned in the REST response bodies are build using http protocol
instead of https.

To handle this situation, a new middleware was added. The purpose of the
SSLMiddleware is to update the wsgi.url_scheme environment variable of
the request with the value contained in an HTTP header that can be
configured in heat.conf (by default: 'X-Forwarded-Proto')

Change-Id: I418cd8cf2fb2a5fb3f630b4945084fb6eab57310
Closes-Bug: #1235555
Fix ceilometer alarm properties schema

The patch contains the following changes:

Type changes:
 - evaluation_periods from String to Integer
 - threshold from String to Number
 - period from String to Integer

Next options are not required now:
 - evaluation_period
 - statistic
 - period
 - comparison_operator

Change-Id: I645673ca7bf52649322e3f4adf851145b9d1a244
Closes-Bug: #1261390
(cherry picked from commit ffc913cb930748e0cba0df5b485255d4ec41d5ee)
Convert heat_keystoneclient user-create logic to v3 API

Migrate the calls to create the stack user and assign the
stack user role to the v3 API (still using the default domain)

Change-Id: I34d07cd6c61aa7fccbd386f01504cb18a1f09803
blueprint: keystone-v3-only
Convert heat_keystoneclient user-delete logic to v3 API

Migrate the delete_stack_user function to use the v3 API.

While making this change, the old retry workaround (which
IIRC was due to a Folsom-era keystone bug) has been removed
as testing indicates it is no longer required.

Change-Id: I6e04ecc3efbb230952ee269f560bdce1115fb9ea
blueprint: keystone-v3-only
Convert heat_keystoneclient user enable/disable logic to v3 API

Migrate the enable_stack_user and disable_stack_user functions
to use the v3 API.

Change-Id: Ieebc94cf09ba952d0ec0499091ba52906d6fe9cb
blueprint: keystone-v3-only
Merge "Don't query for resource during stack creation"
Merge "New middleware to handle SSL termination proxies"
Merge "Using _handle_not_found_exception in resources"
Merge "Convert heat_keystoneclient user-create logic to v3 API"
Merge "Convert heat_keystoneclient user-delete logic to v3 API"
Merge "Convert heat_keystoneclient user enable/disable logic to v3 API"
Merge "Fix ceilometer alarm properties schema"