diff options
author | Christian Breunig <christian@breunig.cc> | 2024-12-12 21:25:42 +0100 |
---|---|---|
committer | Christian Breunig <christian@breunig.cc> | 2024-12-16 22:24:50 +0100 |
commit | 7d99257902c2d638dbf9a8a095660d6aa0d92e38 (patch) | |
tree | def8b5ed6e15c64bcbe92062e60d0d751bc2bdd9 /src/conf_mode/interfaces_ethernet.py | |
parent | 176f974d1c50aae44ec985467aa37f01ca6e0169 (diff) | |
download | vyos-1x-7d99257902c2d638dbf9a8a095660d6aa0d92e38.tar.gz vyos-1x-7d99257902c2d638dbf9a8a095660d6aa0d92e38.zip |
frr: T6746: do not use FRRender apply() method when vyos-configd is running
Diffstat (limited to 'src/conf_mode/interfaces_ethernet.py')
-rwxr-xr-x | src/conf_mode/interfaces_ethernet.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/conf_mode/interfaces_ethernet.py b/src/conf_mode/interfaces_ethernet.py index accfb6b8e..5024e6982 100755 --- a/src/conf_mode/interfaces_ethernet.py +++ b/src/conf_mode/interfaces_ethernet.py @@ -41,6 +41,7 @@ from vyos.utils.dict import dict_search from vyos.utils.dict import dict_to_paths_values from vyos.utils.dict import dict_set from vyos.utils.dict import dict_delete +from vyos.utils.process import is_systemd_service_running from vyos import ConfigError from vyos import airbag airbag.enable() @@ -321,14 +322,13 @@ def verify_ethernet(ethernet): return None def generate(ethernet): - if 'frr_dict' in ethernet and 'frrender_cls' not in ethernet['frr_dict']: + if 'frr_dict' in ethernet and not is_systemd_service_running('vyos-configd.service'): FRRender().generate(ethernet['frr_dict']) return None def apply(ethernet): - if 'frr_dict' in ethernet and 'frrender_cls' not in ethernet['frr_dict']: + if 'frr_dict' in ethernet and not is_systemd_service_running('vyos-configd.service'): FRRender().apply() - e = EthernetIf(ethernet['ifname']) if 'deleted' in ethernet: e.remove() @@ -341,7 +341,6 @@ if __name__ == '__main__': c = get_config() verify(c) generate(c) - apply(c) except ConfigError as e: print(e) |