summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/vyos/frrender.py17
-rw-r--r--python/vyos/kea.py1
-rw-r--r--python/vyos/vpp/config_verify.py1
-rw-r--r--python/vyos/vpp/nat/det44.py22
4 files changed, 35 insertions, 6 deletions
diff --git a/python/vyos/frrender.py b/python/vyos/frrender.py
index b3af4bf0a..75824fcf9 100644
--- a/python/vyos/frrender.py
+++ b/python/vyos/frrender.py
@@ -243,6 +243,8 @@ def get_frrender_dict(conf, argv=None) -> dict:
get_first_key=True,
with_recursive_defaults=True)
dict.update({'babel' : babel})
+ elif conf.exists_effective(babel_cli_path):
+ dict.update({'babel' : {'deleted' : ''}})
# We need to check the CLI if the BFD node is present and thus load in all the default
# values present on the CLI - that's why we have if conf.exists()
@@ -253,6 +255,8 @@ def get_frrender_dict(conf, argv=None) -> dict:
no_tag_node_value_mangle=True,
with_recursive_defaults=True)
dict.update({'bfd' : bfd})
+ elif conf.exists_effective(bfd_cli_path):
+ dict.update({'bfd' : {'deleted' : ''}})
# We need to check the CLI if the BGP node is present and thus load in all the default
# values present on the CLI - that's why we have if conf.exists()
@@ -716,9 +720,18 @@ class FRRender:
debug('FRR: START CONFIGURATION RENDERING')
# we can not reload an empty file, thus we always embed the marker
output = '!\n'
+
# Enable FRR logging
- output += 'log syslog\n'
- output += 'log facility local7\n'
+ output += 'log facility daemon\n'
+ output += 'log timestamp precision 3\n'
+ # Extend logging depending on operating mode
+ if os.path.exists(frr_debug_enable):
+ output += 'log syslog informational\n'
+ output += 'log unique-id\n'
+ else:
+ output += 'log syslog notifications\n'
+ output += 'no log unique-id\n'
+
# Enable SNMP agentx support
# SNMP AgentX support cannot be disabled once enabled
if 'snmp' in config_dict:
diff --git a/python/vyos/kea.py b/python/vyos/kea.py
index f3334a688..5ce6f47f1 100644
--- a/python/vyos/kea.py
+++ b/python/vyos/kea.py
@@ -45,6 +45,7 @@ kea4_options = {
'ipv6_only_preferred': 'v6-only-preferred',
'captive_portal': 'v4-captive-portal',
'capwap_controller': 'capwap-ac-v4',
+ 'interface_mtu': 'interface-mtu',
}
kea6_options = {
diff --git a/python/vyos/vpp/config_verify.py b/python/vyos/vpp/config_verify.py
index 39f909f8a..18859331b 100644
--- a/python/vyos/vpp/config_verify.py
+++ b/python/vyos/vpp/config_verify.py
@@ -19,6 +19,7 @@
import psutil
from vyos import ConfigError
+from vyos.base import Warning
from vyos.utils.cpu import get_core_count as total_core_count, get_cpus
from vyos.vpp.control_host import get_eth_driver
diff --git a/python/vyos/vpp/nat/det44.py b/python/vyos/vpp/nat/det44.py
index 70f903086..51ad41dc8 100644
--- a/python/vyos/vpp/nat/det44.py
+++ b/python/vyos/vpp/nat/det44.py
@@ -44,10 +44,10 @@ class Det44:
is_add=True,
)
- def delete_det44_interface_outside(self, interface_out):
+ def delete_det44_interface_outside(self, interface_out_index):
"""Delete DET44 outside interface"""
self.vpp.api.det44_interface_add_del_feature(
- sw_if_index=self.vpp.get_sw_if_index(interface_out),
+ sw_if_index=interface_out_index,
is_inside=False,
is_add=False,
)
@@ -60,10 +60,10 @@ class Det44:
is_add=True,
)
- def delete_det44_interface_inside(self, interface_in):
+ def delete_det44_interface_inside(self, interface_in_index):
"""Delete DET44 inside interface"""
self.vpp.api.det44_interface_add_del_feature(
- sw_if_index=self.vpp.get_sw_if_index(interface_in),
+ sw_if_index=interface_in_index,
is_inside=True,
is_add=False,
)
@@ -104,3 +104,17 @@ class Det44:
tcp_established=tcp_established,
tcp_transitory=tcp_transitory,
)
+
+ def get_det44_interfaces_outside(self):
+ ifaces_outside = []
+ for iface in self.vpp.api.det44_interface_dump():
+ if iface.is_outside:
+ ifaces_outside.append(iface.sw_if_index)
+ return ifaces_outside
+
+ def get_det44_interfaces_inside(self):
+ ifaces_inside = []
+ for iface in self.vpp.api.det44_interface_dump():
+ if iface.is_inside:
+ ifaces_inside.append(iface.sw_if_index)
+ return ifaces_inside