Match VLAN ID as whole line instead of searching for digits in line (#51019)

Searching for digits somewhere in the output line will also match VLAN name (lines) starting with digits.

Fixes issue #50998

(cherry picked from commit b1c295386f)
pull/54918/head
Albert Siersema 7 years ago committed by Toshio Kuratomi
parent d06193d013
commit 41d999998d

@ -576,7 +576,7 @@ def map_config_to_obj(module):
if len(line) > 0:
line = line.strip()
if line[0].isdigit():
match = re.search(r'(\d+)', line, re.M)
match = re.search(r'^(\d+)$', line, re.M)
if match:
v = match.group(1)
pos1 = splitted_line.index(v)

Loading…
Cancel
Save