diff options
author | Cedric Brandily <zzelle@gmail.com> | 2015-10-22 23:15:18 +0200 |
---|---|---|
committer | Cedric Brandily <zzelle@gmail.com> | 2015-11-01 00:13:10 +0100 |
commit | 26f008296bc11e927a58fe7bfe9b3ac6d1bb5365 (patch) | |
tree | 23206b0573a686da943c42e0d9fafdf2015d9da3 /neutron/notifiers | |
parent | 3812613d6ef3098e6785ca1d68382b93f13d6916 (diff) | |
download | neutron-26f008296bc11e927a58fe7bfe9b3ac6d1bb5365.tar.gz |
Remove deprecated nova_* options
Neutron nova_* options have been deprecated in Kilo in favour of options
in [nova] section.
This change removes these options in order to simplify code, clarify
configuration and avoid a warning in unittests.
DocImpact
UpgradeImpact
Closes-Bug: #1509092
Related-Bug: #1403686
Change-Id: I950f72ad7d7d41cfa006f8c7105934301cd56faa
Diffstat (limited to 'neutron/notifiers')
-rw-r--r-- | neutron/notifiers/nova.py | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/neutron/notifiers/nova.py b/neutron/notifiers/nova.py index 8fb81862c2..adb6520c8b 100644 --- a/neutron/notifiers/nova.py +++ b/neutron/notifiers/nova.py @@ -14,7 +14,6 @@ # under the License. from keystoneclient import auth as ks_auth -from keystoneclient.auth.identity import v2 as v2_auth from keystoneclient import session as ks_session from novaclient import client as nova_client from novaclient import exceptions as nova_exceptions @@ -41,27 +40,6 @@ NEUTRON_NOVA_EVENT_STATUS_MAP = {constants.PORT_STATUS_ACTIVE: 'completed', NOVA_API_VERSION = "2" -class DefaultAuthPlugin(v2_auth.Password): - """A wrapper around standard v2 user/pass to handle bypass url. - - This is only necessary because novaclient doesn't support endpoint_override - yet - bug #1403329. - - When this bug is fixed we can pass the endpoint_override to the client - instead and remove this class. - """ - - def __init__(self, **kwargs): - self._endpoint_override = kwargs.pop('endpoint_override', None) - super(DefaultAuthPlugin, self).__init__(**kwargs) - - def get_endpoint(self, session, **kwargs): - if self._endpoint_override: - return self._endpoint_override - - return super(DefaultAuthPlugin, self).get_endpoint(session, **kwargs) - - class Notifier(object): def __init__(self): @@ -70,24 +48,6 @@ class Notifier(object): # authenticating the exact same thing len(controllers) times. This # should be an easy thing to optimize. auth = ks_auth.load_from_conf_options(cfg.CONF, 'nova') - endpoint_override = None - - if not auth: - LOG.warning(_LW('Authenticating to nova using nova_admin_* options' - ' is deprecated. This should be done using' - ' an auth plugin, like password')) - - if cfg.CONF.nova_admin_tenant_id: - endpoint_override = "%s/%s" % (cfg.CONF.nova_url, - cfg.CONF.nova_admin_tenant_id) - - auth = DefaultAuthPlugin( - auth_url=cfg.CONF.nova_admin_auth_url, - username=cfg.CONF.nova_admin_username, - password=cfg.CONF.nova_admin_password, - tenant_id=cfg.CONF.nova_admin_tenant_id, - tenant_name=cfg.CONF.nova_admin_tenant_name, - endpoint_override=endpoint_override) session = ks_session.Session.load_from_conf_options(cfg.CONF, 'nova', |