Debian Codegraph @

neutron_fwaas/services/logapi/agents/l3/fwg_log.py

raw symbols SCIP
1 # Copyright (c) 2018 Fujitsu Limited
2 # All Rights Reserved.
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License"); you may
5 # not use this file except in compliance with the License. You may obtain
6 # a copy of the License at
7 #
8 # http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 # License for the specific language governing permissions and limitations
14 # under the License.
15
16 from neutron.services.logapi.agent.l3 import base
17 from neutron.services.logapi.agent import log_extension as log_ext
18 from neutron.services.logapi.rpc import agent as agent_rpc
19 from neutron_lib.agent import l3_extension
20
21 # TODO(annp) move to neutron-lib
22 FIREWALL_LOG_DRIVER_NAME = 'fwaas_v2_log'
23
24
25 class FWaaSL3LoggingExtension(base.L3LoggingExtensionBase,
26 l3_extension.L3AgentExtension):
27
28 def initialize(self, connection, driver_type):
29 """Initialize L3 logging agent extension"""
30
31 fw_log_cls = self._load_driver_cls(
32 log_ext.LOGGING_DRIVERS_NAMESPACE, FIREWALL_LOG_DRIVER_NAME)
33 self.log_driver = fw_log_cls(self.agent_api)
34 self.resource_rpc = agent_rpc.LoggingApiStub()
35 self._register_rpc_consumers()
36 self.log_driver.initialize(self.resource_rpc)
37
38 def update_network(self, context, data):
39 # TODO(zhouhenglc) remove at base.L3LoggingExtensionBase support
40 # update_network
41 pass