dell / OpenManage-Enterprise

Script collateral leveraging the OME/OME-M REST APIs
Apache License 2.0
95 stars 49 forks source link

update_firmware_using_catalog.py does not initiate the update job #221

Closed elikkayaemircan closed 3 years ago

elikkayaemircan commented 3 years ago

https://github.com/dell/OpenManage-Enterprise/blob/4c9121a794268f648c16a80e72eedea390377201/Python/update_firmware_using_catalog.py#L209

Dear All,

I use update_firmware_using_catalog.py to update the specified hosts with Service Tags. I run the command below and the update job does not start.

[root@localhost:~/]# python update_firmware_using_catalog.py --ip "1.1.1.1" --user "admin" --password "admin123" --updateactions upgrade --service-tags 12AB345 --catalog-name "Latest"
Getting a list of catalogs...
Successfully retrieved the catalog!
Creating a new Baseline!
Retrieving information for all devices...
Polling 21867 to completion ...
Iteration 1: Status of 21867 is Completed
Job completed successfully!
No results found!
Unable to create baseline
[root@localhost:~/]#

After I check the OME, I see the created baseline which is named "Dell baseline update:2021:06:01-12:57:57". If I run a compliance on OME with this baseline, it works without any problem.

After I examine the issue (as much as I can), I noticed that this request returns as following which @odata.count is zero and the following if block return empty dict.

{'@odata.context': '/api/$metadata#Collection(UpdateService.Baselines)', '@odata.count': 0, 'value': []}

I debug the issue by comment out the if check, but it mustn’t be the formal way. The problem might be related with the api.

Cheers, Emircan Elikkaya

RaajeevKalyan commented 3 years ago

Can you provide some detail on what version of OME you are using that manifests this problem?

elikkayaemircan commented 3 years ago

Can you provide some detail on what version of OME you are using that manifests this problem?

I forgot to mention that. I use OpenManage Enterprise Version 3.5.0 (Build 60)

grantcurell commented 3 years ago

Eh, one sec I think the update system may have changed some names. Taking a look now.

grantcurell commented 3 years ago

Sorry, haven't looked at this code in a long time. It works as expected. Do you actually have the correct catalog name from your OME instance? That is to say, do you have a catalog called Latest?