-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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
fix nxos_gir issues #41809
fix nxos_gir issues #41809
Conversation
elif network_api == 'nxapi': | ||
body = run_commands(module, cmds) | ||
|
||
body = run_commands(module, cmds) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@saichint Is execute_show_command
even required? We can directly use run_commands
since this method is calling run_commands
only.
elif module.params['system_mode_maintenance_shutdown'] is True: | ||
elif (module.params[ | ||
'system_mode_maintenance_shutdown'] is True and | ||
mode == 'normal'): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about elif (module.params['system_mode_maintenance_shutdown'] and mode == 'normal'):
?
commands.append('system mode maintenance shutdown') | ||
elif (module.params[ | ||
'system_mode_maintenance_shutdown'] is False and | ||
mode == 'maintenance'): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about elif not module.params['system_mode_maintenance_shutdown'] and mode == 'maintenance
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This cannot be done because system_mode_maintenance_shutdown
is a boolean. If this parameter is completely omitted in the playbook it will be None and this condition will still be satisfied if we do the way you suggested. So I am leaving it as it.
- block: | ||
- name: "Put system in maintenance mode with reload reset reason" | ||
nxos_gir: &reset_reason | ||
system_mode_maintenance_on_reload_reset_reason: manual_reload |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add provider: {{ connection }}
also in the testcases as we are restoring nxapi tests #41818
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added provider
@trishnaguha Made changes as requested except one and I put my comments for that. Let me know if this is fine |
Due to stale_ci this is pr is being closed and will reopen soon |
reopening for needs_ci |
SUMMARY
fixes #41807
ISSUE TYPE
COMPONENT NAME
nxos_gir
ANSIBLE VERSION
ADDITIONAL INFORMATION