summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2025-07-30 13:52:25 +0100
committerDaniil Baturin <daniil@baturin.org>2025-07-30 13:52:25 +0100
commit57b54f3da7d9c4f5c0700bdd70d39954583ca1b2 (patch)
tree94ddc7dec22779bb034de3ab4769275e0b5bc457 /python
parenta551fa45573ef57858904773d4bcc99dbf553b19 (diff)
downloadvyos-1x-57b54f3da7d9c4f5c0700bdd70d39954583ca1b2.tar.gz
vyos-1x-57b54f3da7d9c4f5c0700bdd70d39954583ca1b2.zip
op-mode: T7669: render placeholders in commands with curly brackets
to distinguish them from fixed parts of the command and allow rendering commands using a template processor
Diffstat (limited to 'python')
-rwxr-xr-xpython/vyos/xml_ref/generate_op_cache.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/vyos/xml_ref/generate_op_cache.py b/python/vyos/xml_ref/generate_op_cache.py
index 266c81cd0..dec693032 100755
--- a/python/vyos/xml_ref/generate_op_cache.py
+++ b/python/vyos/xml_ref/generate_op_cache.py
@@ -81,7 +81,7 @@ def translate_position(s: str, pos: list[str]) -> str:
# preferred to .format(*list) to avoid collisions with braces
for i, p in enumerate(pos):
- t = t.replace(f'_place_holder_{i+1}_', p)
+ t = t.replace(f'_place_holder_{i+1}_', f'{{{{{p}}}}}')
return t