Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
from oslo_config import cfg
from oslo_middleware import ssl
from heat.common.i18n import _
ssl_middleware_opts = [
cfg.StrOpt('secure_proxy_ssl_header',
default='X-Forwarded-Proto',
deprecated_group='DEFAULT',
help=_("The HTTP Header that will be used to determine what "
"the original request protocol scheme was, even if "
"it was removed by an SSL terminator proxy."))
]
removals.removed_module(__name__,
"oslo_middleware.http_proxy_to_wsgi")
class SSLMiddleware(ssl.SSLMiddleware):
def __init__(self, application, *args, **kwargs):
# NOTE(cbrandily): calling super(ssl.SSLMiddleware, self).__init__
# allows to define our opt (including a deprecation).
super(ssl.SSLMiddleware, self).__init__(application, *args, **kwargs)
self.oslo_conf.register_opts(
ssl_middleware_opts, group='oslo_middleware')
def list_opts():
yield None, ssl_middleware_opts
# License for the specific language governing permissions and limitations
# under the License.
"""
Exception definitions.
Deprecated since v0.7.1. Use 'keystoneclient.exceptions' instead of
this module. This module may be removed in the 2.0.0 release.
"""
from debtcollector import removals
from keystoneclient.exceptions import * # noqa
removals.removed_module('keystoneclient.apiclient.exceptions',
replacement='keystoneclient.exceptions',
version='0.7.1',
removal_version='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 itertools
import os
from debtcollector import removals
import six
# TODO(harlowja): remove me in a future version, since the futurist
# is the replacement for this whole module...
removals.removed_module(__name__,
replacement="the 'prettytable' library",
version="1.16", removal_version='2.0',
stacklevel=4)
class PleasantTable(object):
"""A tiny pretty printing table (like prettytable/tabulate but smaller).
Creates simply formatted tables (with no special sauce)::
>>> from taskflow.types import table
>>> tbl = table.PleasantTable(['Name', 'City', 'State', 'Country'])
>>> tbl.add_row(["Josh", "San Jose", "CA", "USA"])
>>> print(tbl.pformat())
+------+----------+-------+---------+
Name | City | State | Country
def __init__(self, transformers, conf):
removals.removed_module(__name__, "datasources.static")
super(StaticPhysicalTransformer, self).__init__(transformers, conf)
self._register_relations_direction()
# 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 debtcollector import removals
import yaml
removals.removed_module(
'solum.common.yamlutils', version='7.0.0', removal_version='8.0.0',
message='The solum.common.yamlutils will be removed')
if hasattr(yaml, 'CSafeLoader'):
yaml_loader = yaml.CSafeLoader
else:
yaml_loader = yaml.SafeLoader
if hasattr(yaml, 'CSafeDumper'):
yaml_dumper = yaml.CSafeDumper
else:
yaml_dumper = yaml.SafeDumper
def __init__(self, conf):
removals.removed_module(__name__, "datasources.static")
super(StaticPhysicalDriver, self).__init__()
self.cfg = conf
self.cache = {}
#
# 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 debtcollector import moves
from debtcollector import removals
from taskflow.conductors.backends import impl_blocking
# TODO(harlowja): remove this module soon...
removals.removed_module(__name__,
replacement="the conductor entrypoints",
version="0.8", removal_version="?",
stacklevel=4)
# TODO(harlowja): remove this proxy/legacy class soon...
SingleThreadedConductor = moves.moved_class(
impl_blocking.BlockingConductor, 'SingleThreadedConductor',
__name__, version="0.8", removal_version="?")
# License for the specific language governing permissions and limitations
# under the License.
"""YAML related utilities.
The main goal of this module is to standardize yaml management inside
openstack. This module reduce technical debt by avoiding re-implementations
of yaml manager in all the openstack projects.
Use this module inside openstack projects to handle yaml securely and properly.
"""
from debtcollector import removals
import yaml
removals.removed_module(
'oslo_serialization.yamlutils', version='3.0.0',
removal_version='4.0.0',
message='The oslo_serialization.yamlutils will be removed')
def load(stream, is_safe=True):
"""Converts a YAML document to a Python object.
:param stream: the YAML document to convert into a Python object. Accepts
a byte string, a Unicode string, an open binary file object,
or an open text file object.
:param is_safe: Turn off safe loading. True by default and only load
standard YAML. This option can be turned off by
passing ``is_safe=False`` if you need to load not only
standard YAML tags or if you need to construct an
arbitrary python object.