Skip to content

Commit

Permalink
deprecate module heat.api.middleware.ssl
Browse files Browse the repository at this point in the history
Use oslo_middleware.http_proxy_to_wsgi instead of oslo_middleware.ssl
due to the 'oslo_middleware.ssl' module is deprecated.

Change-Id: Ibb137049ca4005dd9a886de1ecc6b00dbae79789
Closes-Bug: #1526656
  • Loading branch information
LiZhangmei committed Jan 19, 2016
1 parent 336f0f8 commit ed33ec5
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
9 changes: 4 additions & 5 deletions etc/heat/api-paste.ini
@@ -1,7 +1,7 @@

# heat-api pipeline
[pipeline:heat-api]
pipeline = cors request_id faultwrap ssl versionnegotiation osprofiler authurl authtoken context apiv1app
pipeline = cors request_id faultwrap http_proxy_to_wsgi versionnegotiation osprofiler authurl authtoken context apiv1app

# heat-api pipeline for standalone heat
# ie. uses alternative auth backend that authenticates users against keystone
Expand All @@ -12,7 +12,7 @@ pipeline = cors request_id faultwrap ssl versionnegotiation osprofiler authurl a
# flavor = standalone
#
[pipeline:heat-api-standalone]
pipeline = cors request_id faultwrap ssl versionnegotiation authurl authpassword context apiv1app
pipeline = cors request_id faultwrap http_proxy_to_wsgi versionnegotiation authurl authpassword context apiv1app

# heat-api pipeline for custom cloud backends
# i.e. in heat.conf:
Expand Down Expand Up @@ -78,9 +78,8 @@ paste.filter_factory = heat.common.context:ContextMiddleware_filter_factory
[filter:ec2authtoken]
paste.filter_factory = heat.api.aws.ec2token:EC2Token_filter_factory

[filter:ssl]
paste.filter_factory = heat.common.wsgi:filter_factory
heat.filter_factory = heat.api.openstack:sslmiddleware_filter
[filter:http_proxy_to_wsgi]
paste.filter_factory = oslo_middleware:HTTPProxyToWSGI.factory

# Middleware to set auth_url header appropriately
[filter:authurl]
Expand Down
5 changes: 5 additions & 0 deletions heat/api/middleware/ssl.py
Expand Up @@ -11,6 +11,7 @@
# License for the specific language governing permissions and limitations
# under the License.

from debtcollector import removals
from oslo_config import cfg
from oslo_middleware import ssl

Expand All @@ -24,6 +25,10 @@
]


removals.removed_module(__name__,
"oslo_middleware.http_proxy_to_wsgi")


class SSLMiddleware(ssl.SSLMiddleware):

def __init__(self, application, *args, **kwargs):
Expand Down
3 changes: 3 additions & 0 deletions heat/api/openstack/__init__.py
Expand Up @@ -11,6 +11,7 @@
# License for the specific language governing permissions and limitations
# under the License.

from debtcollector import removals
from heat.api.middleware import fault
from heat.api.middleware import ssl
from heat.api.middleware import version_negotiation as vn
Expand All @@ -26,5 +27,7 @@ def faultwrap_filter(app, conf, **local_conf):
return fault.FaultWrapper(app)


@removals.remove(message='Use oslo_middleware.http_proxy_to_wsgi instead.',
version='6.0.0', removal_version='8.0.0')
def sslmiddleware_filter(app, conf, **local_conf):
return ssl.SSLMiddleware(app)
1 change: 1 addition & 0 deletions requirements.txt
Expand Up @@ -6,6 +6,7 @@ pbr>=1.6 # Apache-2.0
Babel>=1.3 # BSD
croniter>=0.3.4 # MIT License
cryptography>=1.0 # BSD/Apache-2.0
debtcollector>=0.3.0 # Apache-2.0
eventlet>=0.17.4 # MIT
greenlet>=0.3.2 # MIT
keystonemiddleware>=4.0.0 # Apache-2.0
Expand Down

0 comments on commit ed33ec5

Please sign in to comment.