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

nxos_install_os Remove kickstart_image_required check #36319

Merged
Merged
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
16 changes: 1 addition & 15 deletions lib/ansible/modules/network/nxos/nxos_install_os.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
kickstart_image_file:
description:
- Name of the kickstart image file on flash.
(Not required on all Nexus platforms)
required: false
default: null
issu:
Expand Down Expand Up @@ -181,17 +182,6 @@ def get_platform(module):
return type


def kickstart_image_required(module):
'''Determine if platform requires a kickstart image'''
data = execute_show_command(module, 'show version')[0]
kickstart_required = False
for x in data.split('\n'):
if re.search(r'kickstart image file is:', x):
kickstart_required = True

return kickstart_required


def parse_show_install(data):
"""Helper method to parse the output of the 'show install all impact' or
'install all' commands.
Expand Down Expand Up @@ -564,10 +554,6 @@ def main():
if kif == 'null' or kif == '':
kif = None

if kickstart_image_required(module) and kif is None:
msg = 'This platform requires a kickstart_image_file'
module.fail_json(msg=msg)

install_result = do_install_all(module, issu, sif, kick=kif)
if install_result['error']:
msg = "Failed to upgrade device using image "
Expand Down