Skip to content

Commit 205a09a

Browse files
authored
Fix: Mismatch between plugin cfg name and its internal name (#3334)
When generating config scripts (or mapped config files), the dots in plugin names are changed into "@" to avoid the Box dot-parsing functionality. That was not taken into account when comparing config names with skip_config list, resulting in mappings that had no corresponding config files. This simple change fixes that problem Also: updated the platform integration test to use both config deployment methods (scripts and Ansible).
1 parent a27641e commit 205a09a

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

netsim/providers/clab.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def add_config_filemaps(node: Box, topology: Box) -> None:
117117
# Adjust the configuration templates based on whether the skip_config is set
118118
#
119119
if skip_config:
120-
add_config = { k:v for k,v in node[kw].items() if k not in skip_config }
120+
add_config = { k:v for k,v in node[kw].items() if k.replace('@','.') not in skip_config }
121121
else:
122122
add_config = node[kw]
123123

tests/platform-integration/config/05-skip-config.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
message: |
22
This topology tests the "skip_config" functionality for daemons and devices
3-
configured with Bash scripts (future) and Ansible
3+
configured with Bash scripts and Ansible
44
55
defaults.sources.extra: [ ../../integration/wait_times.yml ]
66

@@ -19,6 +19,7 @@ nodes:
1919
eos_nd:
2020
device: eos
2121
bgp.as: 65003
22+
netlab_config_mode:
2223
skip_config: [ bgp.session ]
2324
frr_f:
2425
device: frr

0 commit comments

Comments
 (0)