From a0c97e33f59adf68fa77222199143a6ba7a5c794 Mon Sep 17 00:00:00 2001 From: John Estabrook Date: Tue, 29 Nov 2022 16:21:54 -0600 Subject: pki: T4847: fix typos --- src/conf_mode/interfaces-ethernet.py | 2 +- src/conf_mode/pki.py | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'src/conf_mode') diff --git a/src/conf_mode/interfaces-ethernet.py b/src/conf_mode/interfaces-ethernet.py index e02841831..b49c945cd 100755 --- a/src/conf_mode/interfaces-ethernet.py +++ b/src/conf_mode/interfaces-ethernet.py @@ -175,7 +175,7 @@ def generate(ethernet): loaded_pki_cert = load_certificate(pki_cert['certificate']) loaded_ca_certs = {load_certificate(c['certificate']) - for c in ethernet['pki']['ca'].values()} + for c in ethernet['pki']['ca'].values()} if 'ca' in ethernet['pki'] else {} cert_full_chain = find_chain(loaded_pki_cert, loaded_ca_certs) diff --git a/src/conf_mode/pki.py b/src/conf_mode/pki.py index 29ed7b1b7..75807b86f 100755 --- a/src/conf_mode/pki.py +++ b/src/conf_mode/pki.py @@ -281,12 +281,13 @@ def apply(pki): for found_name, found_path in dict_search_recursive(search_dict, key): if found_name == item_name: - path_str = ' '.join(search['path'] + found_path) + path = search['path'] + path_str = ' '.join(path + found_path) print(f'pki: Updating config: {path_str} {found_name}') script = search['script'] - if found_path[0] == 'interfaces': - ifname = found_path[2] + if path[0] == 'interfaces': + ifname = found_path[0] call(f'VYOS_TAGNODE_VALUE={ifname} {script}') else: call(script) -- cgit v1.2.3