bugfix for handling match=strict in iosxr_config

Resolves an issue where match=strict would act like match=exact when
evaluating the configuration
pull/18777/head
Peter Sprygada 9 years ago committed by Matt Clay
parent b0a9308e0d
commit 7cd3793128

@ -153,15 +153,12 @@ def build_candidate(lines, parents, config, strategy):
candidate = list()
if strategy == 'strict':
if len(lines) != len(config):
candidate = list(lines)
else:
for index, cmd in enumerate(lines):
try:
if cmd != config[index]:
candidate.append(cmd)
except IndexError:
for index, cmd in enumerate(lines):
try:
if cmd != config[index]:
candidate.append(cmd)
except IndexError:
candidate.append(cmd)
elif strategy == 'exact':
if len(lines) != len(config):

Loading…
Cancel
Save