NIM SUMA Overview
NIM SUMA Overview
NIM SUMA refers to the use of the Service Update Management Assistant (SUMA) to download fixes, service packs (SP), or technology levels (TL) from the IBM Fix Central website. The fixes are downloaded to update specified target systems to a specific technology level or service pack level. The downloaded fixes are then used to create a related NIM resource on the NIM master. This allows users to run another task to install the systems with the new resource. Updates are downloaded based on the lowest technical level of all target systems.
How to Use NIM SUMA
To use NIM SUMA, you need to specify the action (either 'download' or 'preview'), the target systems, the desired OS level, and optionally the download directory and other parameters. The suma_download
lpp_source
Where NIM SUMA is Used
The NIM SUMA functionality is primarily used in the suma_download
plugins/modules/nim_suma.py
module.
Example Usage of NIM SUMA
An example usage of NIM SUMA is to check, download, and create the NIM resource to install the latest updates on a target system. This can be done using the nim_suma
This code snippet shows an example of how to use the nim_suma
'''
EXAMPLES = r'''
- name: Check, download and create the NIM resource to install latest updates
nim_suma:
action: download
targets: nimclient01
oslevel: Latest
download_dir: /usr/sys/inst.images
'''
Main Functions
There are several main functions in this folder. Some of them are min_oslevel
max_oslevel
nim_exec
run_oslevel_cmd
expand_targets
get_nim_clients
get_oslevels
get_nim_lpp_source
compute_rq_type
find_sp_version
compute_rq_name
compute_filter_ml
compute_lpp_source_name
compute_dl_target
suma_command
suma_download
suma_download
suma_command
suma_download
suma_download
The suma_download
suma_command
This code snippet shows the suma_download
def suma_download(module, suma_params):
"""
Dowload (or preview) action
suma_params['action'] should be set to either 'preview' or 'download'.
arguments:
module (dict): The Ansible module
suma_params (dict): parameters to build the suma command
note:
Exits with fail_json in case of error
"""
targets_list = suma_params['targets']
req_oslevel = suma_params['req_oslevel']
if not targets_list:
if req_oslevel == 'Latest':
msg = 'Oslevel target could not be empty or equal "Latest" when' \
' target machine list is empty'
module.log(msg)
suma_command
suma_command
The suma_command
This code snippet shows the suma_command
def suma_command(module, action, suma_params):
"""
Run a suma command.
arguments:
module (dict): The Ansible module
action (str): preview or download
suma_params (dict): parameters to build the suma command
note:
Exits with fail_json in case of error
return:
stdout suma command output
"""
rq_type = suma_params['RqType']
if rq_type == 'Latest':
rq_type = 'SP'
cmd_FilterML = suma_params['FilterMl']
cmd_DLTarget = suma_params['DLTarget']
cmd_RqName = suma_params['RqName']
This is an auto-generated document by Swimm 🌊 and has not yet been verified by a human