[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:
Rodolfo Alonso Hernandez 2023-12-19 10:57:56 +00:00 committed by Rodolfo Alonso
parent fa46584af9
commit 86efc8be99
2 changed files with 2 additions and 2 deletions

View File

@ -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``"""

View File

@ -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.