Merge "Support cache option for legacy GBP driver" into stable/newton

This commit is contained in:
Zuul 2019-12-19 02:26:31 +00:00 committed by Gerrit Code Review
commit 6ec4313138
1 changed files with 9 additions and 2 deletions

View File

@ -41,8 +41,15 @@ class ProjectDetailsCache(object):
self.project_details = {}
self.keystone = None
self.gbp = None
self.enable_neutronclient_internal_ep_interface = (
cfg.CONF.ml2_apic_aim.enable_neutronclient_internal_ep_interface)
# This is needed for the legacy GBP plugin, which also
# uses the cache. This can be reverted once newton support
# is dropped
if hasattr(cfg.CONF, 'ml2_apic_aim'):
ml2_cfg = cfg.CONF.ml2_apic_aim
self.enable_neutronclient_internal_ep_interface = (
ml2_cfg.enable_neutronclient_internal_ep_interface)
else:
self.enable_neutronclient_internal_ep_interface = False
def _get_keystone_client(self):
# REVISIT: It seems load_from_conf_options() and