fixes problem where wrong ACL could be selected (#3099)

This fixes a bug where the wrong acl name could be matched in the running
config if the desired acl name is a starting subset.
This commit is contained in:
Peter Sprygada 2016-10-05 20:14:32 -04:00 committed by Matt Clay
parent 6f0477a780
commit 817881d64f

View file

@ -153,7 +153,7 @@ def get_config(module, acl_name):
filtered_config = list()
for item in contents.split('\n'):
if item.startswith('access-list %s' % acl_name):
if item.startswith('access-list %s ' % acl_name):
filtered_config.append(item)
return NetworkConfig(indent=1, contents='\n'.join(filtered_config))