Support cache option for legacy GBP driver
The legacy GBP driver shares the cache code in the apic_aim mechanism driver. This class uses an option that's only available when the apic_aim mechanism driver is loaded. In order to ensure backwards-compatibility for the legacy GBP driver, check to see if the configuration options exist before trying to use it for configuring the class. Change-Id: I26aab66b725cea1971e8d212705d47a7890e4b42
This commit is contained in:
parent
21240693fe
commit
10a8da3f24
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue