[OVN] OVN agent extensions correctly consume agent API
Now the ``OVNAgentExtension`` class do not clear the agent API during the extension initialization. This patch also passes the agent object to the OVN agent extensions as agent API. Any method required will be implemented directly on the OVN agent class. Closes-Bug: #2046939 Change-Id: Ia635ca1ff97c3db43a34d3dec6a7f9df154dfe28
This commit is contained in:
parent
fa46584af9
commit
86efc8be99
|
@ -59,7 +59,7 @@ class OVNNeutronAgent(service.Service):
|
|||
self.ovn_bridge = None
|
||||
self.ext_manager_api = ext_mgr.OVNAgentExtensionAPI()
|
||||
self.ext_manager = ext_mgr.OVNAgentExtensionManager(self._conf)
|
||||
self.ext_manager.initialize(None, 'ovn', self.ext_manager_api)
|
||||
self.ext_manager.initialize(None, 'ovn', self)
|
||||
|
||||
def __getitem__(self, name):
|
||||
"""Return the named extension objet from ``self.ext_manager``"""
|
||||
|
|
|
@ -55,7 +55,7 @@ class OVNAgentExtension(extension.AgentExtension, metaclass=abc.ABCMeta):
|
|||
|
||||
def initialize(self, *args):
|
||||
"""Initialize agent extension."""
|
||||
self.agent_api = None
|
||||
pass
|
||||
|
||||
def consume_api(self, agent_api):
|
||||
"""Configure the Agent API.
|
||||
|
|
Loading…
Reference in New Issue