Closed stdevel closed 6 years ago
Unfortunately, the Foreman API currently offers no call for this.
Things have changed, yas: https://theforeman.org/plugins/katello/3.5/api/apidoc/v2/host_packages.html
PUT /api/hosts/:host_id/packages/upgrade_all
Update packages remotely
Investigating in branch feature-pkg_updates-issue33
Was thinking about adding an exclude parameter to katprep_maintenance
- unfortunately I found no way to implement this. The API call upgrade_all
upgrades all packages, while upgrade
requires a list of package IDs. For this it would be necessary to have a list of "upgradable" packages for a particular host - and there is no such API call.
In the web interface it is possible to list available package upgrades, so there must be a way to retrieve this information. Gonna ask the developers.
In the web interface it is possible to list available package upgrades, so there must be a way to retrieve this information. Gonna ask the developers. Discussion started: https://community.theforeman.org/t/looking-for-api-call-for-retrieving-upgradable-packages-per-content-host/9985
Added code for installing all available package upgrades in commit 63ba47a6daaf19bd9e17f7b5f1e24ec7a795a5e5. Successfully tested with Foreman 1.17.1 and Katello 3.6.
Beginning with Foreman 1.14.3, non-errata package updates can be triggered/installed using the UI - would be handy if
katprep_maintenance
could do the same.