dell / dellemc-openmanage-ansible-modules

Dell OpenManage Ansible Modules
GNU General Public License v3.0
336 stars 163 forks source link

ome_firmware_baseline and ome_firmware_baseline_compliance_info modules return DeviceServiceTag is invalid #185

Closed elikkayaemircan closed 3 years ago

elikkayaemircan commented 3 years ago

When I try to use ome_firmware_baseline module with ServiceTag option I get error; "msg": "Unable to complete the operation because the entered target DeviceServiceTag 'ABCDV63' is invalid."

When I try to use ome_firmware_baseline_compliance_info module with ServiceTag options I get error; "msg": "Device details not available as the service tag(s) provided are invalid." but the same module with Base baseline_name option works well and returns the same DeviceServiceTag that I used before.

It looks an issue on DeviceServiceTag option.

fatal: [delomelnx01]: FAILED! => { "ansible_facts": { "discovered_interpreter_python": "/usr/bin/python" }, "changed": false, "invocation": { "module_args": { "baseline_description": "Baseline for OKDANK hosts.", "baseline_name": "OKDANK_test", "catalog_name": "Catalog_2020-11-28", "device_group_names": null, "device_ids": null, "device_service_tags": [ "ABCDV63", "ABCEV63" ], "downgrade_enabled": true, "hostname": "10.214.90.222", "is_64_bit": true, "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "port": 443, "username": "username" } }, "msg": "Unable to complete the operation because the entered target DeviceServiceTag 'ABCDV63' is invalid." }

mdn19866 commented 3 years ago

I found the same issue when using device ids. We have several OME installations in our landscape. For those with only a few servers connected it works flawlessly. But I found for OME instances with > 50 connected server that there is a pagination of which the underlying python plugin is not aware of.

In the output of the API call you can find it (/api/DeviceService/Devices):

"@odata.nextLink": "/api/DeviceService/Devices?$skip=50&$top=50"

I suspect the part here: https://github.com/dell/dellemc-openmanage-ansible-modules/blob/0eeb66afac36b74b627ad7bc276b2d27b3e51f1c/plugins/modules/ome_firmware_baseline.py#L192-L211

jagadeeshnv commented 3 years ago

@elikkayaemircan This has been addressed in the latest release 3.3.0 Please verify and provide your feedback

mdn19866 commented 3 years ago

At least for me it works. Thank you!

elikkayaemircan commented 3 years ago

It worked for me as well. Thank you!