Skip to content

Commit 2e1955b

Browse files
committed
fixed vlan regexp
1 parent 988042f commit 2e1955b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cloudshell/networking/cisco/command_actions/add_remove_vlan_actions.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ def verify_interface_has_vlan_assigned(vlan_range, current_config):
7575
vlans_list.extend(str_vlan_range_ls)
7676
for vlan in vlans_list:
7777
if not re.search(
78-
rf"switchport.*vlan.*\b{vlan}\b", current_config, re.IGNORECASE
78+
r"switchport.*vlan.*\b{vlan}\b".format(vlan=vlan),
79+
current_config,
80+
re.IGNORECASE,
7981
):
8082
success = False
8183
return success

0 commit comments

Comments
 (0)