From a6d412b45a90feb4d2f53f69d4ff298bc5950446 Mon Sep 17 00:00:00 2001 From: zsdc Date: Wed, 11 Aug 2021 13:46:54 +0300 Subject: User-Data: T3735: Fixed "multi" nodes type search Several nodes with "multi" type contain extra space character after the `multi:` mark, which prevents the `cc_vyos_userdata` module to detect their type properly. This commit changes the regex used for detecting such nodes to fix the problem. --- cloudinit/config/cc_vyos_userdata.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloudinit/config/cc_vyos_userdata.py b/cloudinit/config/cc_vyos_userdata.py index c10e417a..d50bb2b5 100644 --- a/cloudinit/config/cc_vyos_userdata.py +++ b/cloudinit/config/cc_vyos_userdata.py @@ -57,7 +57,7 @@ def get_multi_nodes(): # search for node.def files node_def_files = Path(TEMPLATES_DIR).rglob('node.def') # prepare filter to match multi node files - regex_filter = re.compile(r'^multi:$', re.MULTILINE) + regex_filter = re.compile(r'^multi:.*$', re.MULTILINE) # add each node.def with multi mark to list for node_def_file in node_def_files: file_content = node_def_file.open().read() -- cgit v1.2.3