Fix anomalous backslashes and enable pylint test.

This commit is contained in:
Matt Clay
2017-11-21 22:22:40 -08:00
parent 9735a70059
commit c6bb6c72cc
30 changed files with 76 additions and 77 deletions

View File

@@ -208,7 +208,7 @@ def validate_local_http_port(value, module):
def validate_vrf(value, module):
out = run_commands(module, ['show vrf'])
configured_vrfs = re.findall('^\s+(\w+)(?=\s)', out[0], re.M)
configured_vrfs = re.findall(r'^\s+(\w+)(?=\s)', out[0], re.M)
configured_vrfs.append('default')
if value not in configured_vrfs:
module.fail_json(msg='vrf `%s` is not configured on the system' % value)