# # Copyright 2013 IBM Corp. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. from heat.openstack.common import gettextutils gettextutils.install('heat')
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. from heat.api.cfn import versions from heat.api.middleware.version_negotiation import VersionNegotiationFilter from heat.openstack.common import gettextutils gettextutils.install('heat') def version_negotiation_filter(app, conf, **local_conf): return VersionNegotiationFilter(versions.Controller, app, conf, **local_conf)
# not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import routes from heat.openstack.common import gettextutils gettextutils.install("heat") from heat.api.cloudwatch import watch from heat.common import wsgi from webob import Request from heat.api.middleware.version_negotiation import VersionNegotiationFilter from heat.api.cloudwatch import versions from heat.openstack.common import log as logging logger = logging.getLogger(__name__) class API(wsgi.Router):
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. # See http://code.google.com/p/python-nose/issues/detail?id=373 # The code below enables nosetests to work with i18n _() blocks from heat.openstack.common import gettextutils def fake_translate_msgid(msgid, domain, desired_locale=None): return msgid gettextutils.enable_lazy() gettextutils.install("heat", lazy=True) # To ensure messages don't really get translated while running tests. # As there are lots of places where matching is expected when comparing # exception message(translated) with raw message. gettextutils._translate_msgid = fake_translate_msgid
# # Copyright 2013 IBM Corp. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. from heat.openstack.common import gettextutils gettextutils.enable_lazy() gettextutils.install('heat', lazy=True)
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. # See http://code.google.com/p/python-nose/issues/detail?id=373 # The code below enables nosetests to work with i18n _() blocks from heat.openstack.common import gettextutils def fake_translate_msgid(msgid, domain, desired_locale=None): return msgid gettextutils.enable_lazy() gettextutils.install('heat', lazy=True) #To ensure messages don't really get translated while running tests. #As there are lots of places where matching is expected when comparing #exception message(translated) with raw message. gettextutils._translate_msgid = fake_translate_msgid