Debian Codegraph @

neutron_lib/services/logapi/constants.py

raw
1 # Copyright 2017 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 ACCEPT_EVENT = 'ACCEPT'
17 DROP_EVENT = 'DROP'
18 ALL_EVENT = 'ALL'
19 LOG_EVENTS = [ACCEPT_EVENT, DROP_EVENT, ALL_EVENT]
20 LOGGING_PLUGIN = 'logging-plugin'
21
22 # supported logging types
23 SECURITY_GROUP = 'security_group'
24 SNAT = 'snat'
25
26 # target resource types
27 PORT = 'port'
28
29 RPC_NAMESPACE_LOGGING = 'logging-plugin'
30
31 # Define for rpc_method_key
32 LOG_RESOURCE = 'log_resource'
33
34 # String literal for identifying log resource
35 LOGGING = 'log'
36
37 # Method names for Logging Driver
38 PRECOMMIT_POSTFIX = '_precommit'
39 CREATE_LOG = 'create_log'
40 CREATE_LOG_PRECOMMIT = CREATE_LOG + PRECOMMIT_POSTFIX
41 UPDATE_LOG = 'update_log'
42 UPDATE_LOG_PRECOMMIT = UPDATE_LOG + PRECOMMIT_POSTFIX
43 DELETE_LOG = 'delete_log'
44 DELETE_LOG_PRECOMMIT = DELETE_LOG + PRECOMMIT_POSTFIX
45 # Tell to agent when resources related log_objects update
46 RESOURCE_UPDATE = 'resource_update'
47
48 LOG_CALL_METHODS = (
49 CREATE_LOG,
50 CREATE_LOG_PRECOMMIT,
51 UPDATE_LOG,
52 UPDATE_LOG_PRECOMMIT,
53 DELETE_LOG,
54 DELETE_LOG_PRECOMMIT,
55 RESOURCE_UPDATE
56 )
57
58 DIRECTION_IP_PREFIX = {'ingress': 'source_ip_prefix',
59 'egress': 'dest_ip_prefix'}