Fixing nxos modules when interface is loopback (#20645)

* Fixing modules when interface is loopback

* Remove capitalize
This commit is contained in:
Gabriele 2017-02-14 18:10:46 +01:00 committed by Nathaniel Case
parent 9008e8017b
commit 5fbe64a324
2 changed files with 6 additions and 1 deletions

View file

@ -604,6 +604,9 @@ def main():
'message_digest_password']],
supports_check_mode=True)
if not module.params['interface'].startswith('loopback'):
module.params['interface'] = module.params['interface'].capitalize()
for param in ['message_digest_encryption_type',
'message_digest_algorithm_type',
'message_digest_password']:

View file

@ -385,7 +385,9 @@ def get_vrf_list(module):
def get_interface_info(interface, module):
command = 'show run | section interface.{0}'.format(interface.capitalize())
if not interface.startswith('loopback'):
interface = interface.capitalize()
command = 'show run | section interface.{0}'.format(interface)
vrf_regex = ".*vrf\s+member\s+(?P<vrf>\S+).*"
try: