Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing nxos modules when interface is loopback #20645

Merged
merged 2 commits into from
Feb 14, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/ansible/modules/network/nxos/nxos_interface_ospf.py
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,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']:
Expand Down
4 changes: 3 additions & 1 deletion lib/ansible/modules/network/nxos/nxos_vrf_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down