Statistics
| Branch: | Revision:

iof-tools / confFileGenerator / constants.py @ 7c83f065

History | View | Annotate | Download (3.45 KB)

1
#!/usr/bin/env python
2
# -*- coding: utf-8 -*-
3

    
4
# This program is free software: you can redistribute it and/or modify
5
# it under the terms of the GNU General Public License as published by
6
# the Free Software Foundation, either version 3 of the License, or
7
# (at your option) any later version.
8
#
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
# GNU General Public License for more details.
13
#
14
# You should have received a copy of the GNU General Public License
15
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
16
#
17
# Copyright (C) 2019  Mattia Milani <mattia.milani@studenti.unitn.it>
18

    
19
HOLD_TIMER = "15"
20
CONNECT_RETRY_TIMER = "5"
21
CONNECT_DELAY_TIMER = "10"
22
STARTUP_HOLD_TIMER = "10"
23
LOCAL_PREF = "99"
24
LOG_MODE = "all"
25
DBG_MODE = "all"
26
DBG_COMMANDS_MODE = "2"
27
KERNEL_CONF_PATH = "/etc/bird/kernel.conf"
28
DIRECT_CONF_PATH = "/etc/bird/direct.conf"
29
DEVICE_CONF_PATH = "/etc/bird/device.conf"
30
FILTER_CONF_PATH = "/etc/bird/commonFilters.conf"
31

    
32
BGP_SESSION_TEMPLATE_PATH = "templates/bgpSession_template.template"
33
BGP_SESSION_EXPORTER_TEMPLATE_PATH = "templates/bgpSessionExporter_template.template"
34
BGP_SESSION_STATIC_EXPORTER_TEMPLATE_PATH_UPLINKS = "templates/bgpSession_static_route_template_uplinks.template"
35
BGP_SESSION_STATIC_EXPORTER_TEMPLATE_PATH_PEERS = "templates/bgpSession_static_route_template_peers.template"
36
BGP_SESSION_STATIC_EXPORTER_TEMPLATE_PATH_CLIENTS = "templates/bgpSession_static_route_template_clients.template"
37
BIRD_TEMPLATE_PATH = "templates/bird_template.template"
38
MRAI_TEMPLATE_FILE = "templates/mrai.template"
39
NETWORK_TEMPLATE_PATH = "network_config.template"
40

    
41
TYPE_KEY = "type"
42

    
43
gname = "small_g.graphml"
44
outDir = "out/"
45
src = "baseFiles/"
46
node_number = 20
47
mrai_type = 0
48

    
49
HELP_MESSAGE = """
50
Conf file generator for bird written by Mattia Milani, mattia.milani@studenti.unitn.it
51
Mandatory args are: 
52
    --graph [file name] -> name of the graphml (only graphml files are accepted) file that will be used to generate the conf files, this file needs to be correctly formatted and created.
53
                            Is possible to use the 'internet_as_graph()' function that can be found at: 'https://github.com/leonardomaccari/networkx/blob/degree_bug/networkx/generators/tests/test_internet_AS_graph.py'
54
                            Only nodes of type 'C' generates routes
55
                            type of edges:
56
                                transit: the first node of this edge pay the second one to transit through it, so the relation is customer <-> servicer
57
                                peer: the two nodes share a peer relation
58
                            the sharing policy is based on witch node send the information:
59
                                customer: shared with everyone
60
                                servicer: shared with customers
61
                                peer: shared with customers
62
                            If this does not exists yet it will be created with a predefined number of nodes (20)
63
    --out [folder name] -> folder where the conf files will be saved
64
Not mandatory args:
65
    --nnodes [number]-> redefine the default number of nodes used to create the file, if the file already exists this parameter will be ignored
66
    --directories -> this args does not require parameters, if present the output will be formatted to folders for each bird node
67
    '--help', '-h' -> show this help
68
"""