Coverage for birdplan/bird_config/sections/tables/master/master_attributes.py: 100%
20 statements
« prev ^ index » next coverage.py v7.4.4, created at 2024-04-23 03:27 +0000
« prev ^ index » next coverage.py v7.4.4, created at 2024-04-23 03:27 +0000
1#
2# SPDX-License-Identifier: GPL-3.0-or-later
3#
4# Copyright (c) 2019-2024, AllWorldIT
5#
6# This program is free software: you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation, either version 3 of the License, or
9# (at your option) any later version.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License
17# along with this program. If not, see <http://www.gnu.org/licenses/>.
19"""BIRD master table attributes."""
20__all__ = ["MasterTableRoutePolicyExportKernel", "MasterTableRoutePolicyExport", "MasterTableAttributes"]
23class MasterTableRoutePolicyExportKernel: # pylint: disable=too-few-public-methods
24 """
25 Master table route policy for exporting of routes to the kernel.
27 Attributes
28 ----------
29 bgp : bool
30 Export BGP routes to the kernel table. Defaults to `False`.
31 ospf : bool
32 Export OSPF routes to the kernel table. Defaults to `False`.
33 rip : bool
34 Export RIP routes to the kernel table. Defaults to `False`.
35 static : bool
36 Export static routes to the kernel table. Defaults to `False`.
38 """
40 bgp: bool
41 ospf: bool
42 rip: bool
43 static: bool
45 def __init__(self) -> None:
46 """Initialize object."""
47 self.bgp = True
48 self.ospf = True
49 self.rip = True
50 self.static = True
53class MasterTableRoutePolicyExport: # pylint: disable=too-few-public-methods
54 """
55 Master table route policy for exporting of routes to the kernel.
57 Attributes
58 ----------
59 kernel : MasterTableRoutePolicyExportKernel
60 Route policies for exporting routes to the kernel table.
62 """
64 kernel: MasterTableRoutePolicyExportKernel
66 def __init__(self) -> None:
67 """Initialize object."""
68 self.kernel = MasterTableRoutePolicyExportKernel()
71class MasterTableAttributes: # pylint: disable=too-few-public-methods
72 """
73 RIP attributes.
75 Attributes
76 ----------
77 route_policy_export : MasterTableRoutePolicyExport
78 Route policy for exporting of routes from the master table.
80 """
82 route_policy_export: MasterTableRoutePolicyExport
84 def __init__(self) -> None:
85 """Initialize object."""
87 self.route_policy_export = MasterTableRoutePolicyExport()