blob: 5c0823f9cd459f199a100ca6a2756af65772a7ff (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
Definate is part of Capirca and is a system to develop and manage network
definitions that can be used in Capirca policies.
It was developed by Google for internal use, and is now open source.
Project home page: http://code.google.com/p/capirca/
Please send contributions to capirca-dev@googlegroups.com.
Code should include unit tests and follow the Google Python style guide:
http://code.google.com/p/soc/wiki/PythonStyleGuide
================================================================================
Definate Configuration File
Global section
This section contains directives global in scope.
[pre|post]_filters: Optional list of global filters to run before
(pre_filters) or after (post_filters) the definition file generation.
Each filter may define a set of filter specific arguments in the 'args'
attribute.
'name': Name of the filter used to lookup the filter class to use.
Valid values: There are currently no implementations.
per_file_[pre|post]_filters: Optional list of file filters run before
(pre_filters) or after (post_filters) the generation of each file.
The pre_filters here are run BEFORE the individual filters specified in
the files section and the post_filters are run AFTER the individual
filters specified in the files section.
For a list of possible filters and arguments, see the "Files section".
per_definition_[pre|post]_filters: Optional list of definition filters run
before (pre_filters) or after (post_filters) the generation of each
definition.
The pre_filters here are run BEFORE the individual filters specified in
the definitions section and the post_filters are run AFTER the individual
filters specified in the definitions section.
For a list of possible filters and arguments, see the "Definitions
section".
Files section
This section contains a list of settings and configurations for each
file that gets generated.
path: Path to the definitions file to be generated, relative to the
def path defined in the global section.
[pre|post]_filters: Optional list of file level filters to run before
(pre_filters) or after (post_filters) the file has been generated.
Each filter may define a set of filter specific arguments in the
'args' attribute.
'name': Name of the filter used to lookup the filter class to use.
Valid values:
'PrintFilter': Does not modify input. Just prints it.
'WriteFileFilter': Writes files out locally.
file_header: List of strings that get printed in the beginning of the file.
generators: List of generator blocks.
Generators section
name: The generator defines the source of the information.
Valid values:
'DnsGenerator': For definitions generated based on hostnames with a simple
DNS resolver. Note that the resolver might not return all addresses used
for one hostname depending on the implemented DNS load balancing.
definitions: List of definition blocks.
Definitions section
name: Name of the definition that gets generated. This name is used in the
definitions file and can be used in policies to reference the definition.
header: Optional list of header strings that will be printed before the
definition.
[pre|post]_filters: Optional list of definition level filters to run
before (pre_filters) or after (post_filters) the definition has been
generated. Each filter may define a set of filter specific arguments
in the 'args' attribute.
'name': Name of the filter used to lookup the filter class to use.
Valid values:
'SortFilter': Sort the input list and return one list containing
IPv4 sorted, IPv6 sorted.
'AlignFilter': Take the input list and definition name and create
nicely formated output.
networks: Contains a list of descriptions about how to get a complete set
of networks/IPs for one definition. This section contains
generator-specific configuration directives".
Network directives for DnsGenerator
Networks section
names: List of hostnames that should be resolved.
types: List of types the output should be filtered for. Valid values:
'A': Filter for IPv4 addresses.
'AAAA': Filter for IPv6 addresses.
|