Skip to content

Commit ce6e662

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Make the logging_rpc member a class property" into stable/2025.1
2 parents 8012e26 + 45bf48f commit ce6e662

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

neutron/services/logapi/drivers/manager.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,18 @@ def __init__(self):
6868
self._drivers = set()
6969
self.rpc_required = False
7070
registry.publish(log_const.LOGGING_PLUGIN, events.AFTER_INIT, self)
71-
72-
if self.rpc_required:
73-
self.logging_rpc = server_rpc.LoggingApiNotification()
71+
self._logging_rpc = None
7472

7573
@property
7674
def drivers(self):
7775
return self._drivers
7876

77+
@property
78+
def logging_rpc(self):
79+
if self.rpc_required and not self._logging_rpc:
80+
self._logging_rpc = server_rpc.LoggingApiNotification()
81+
return self._logging_rpc
82+
7983
def register_driver(self, driver):
8084
"""Register driver with logging plugin.
8185

0 commit comments

Comments
 (0)