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

WIP: Implement Uyuni support #155

Open
wants to merge 331 commits into
base: master
Choose a base branch
from
Open

WIP: Implement Uyuni support #155

wants to merge 331 commits into from

Conversation

stdevel
Copy link
Owner

@stdevel stdevel commented May 6, 2021

See also issue #43

@stdevel stdevel requested a review from okin May 6, 2021 09:09
@stdevel stdevel self-assigned this May 6, 2021
@stdevel stdevel marked this pull request as draft May 6, 2021 09:09
@stdevel stdevel added this to To do in 0.5.x via automation May 6, 2021
@stdevel stdevel added this to the 0.5.x milestone May 6, 2021
Copy link
Collaborator

@okin okin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can also add support for Uyuni in README.md :)

What are the multiple requirements files (requirements_uyuni.yml & requirements_uyuniclient.yml) for?

I think the next step would be that ForemanAPIClient and UyuniApiClient provide the same interface to any caller. Work in this regard seems to have been done for Uyuni already but is missing for Foreman.
If we are tackling this I'd suggest also making use of our abstract host class for this. This should allow us to have all IDs belonging to one client in different systems in one object in our codebase.

In the modules that provide a CLI interface only ForemanAPIClient is instantiated.
Once there is a common interface these occurances should be replaced by using the factory katprep.management.get_management_client.

katprep/exceptions.py Outdated Show resolved Hide resolved
katprep/exceptions.py Outdated Show resolved Hide resolved
katprep/management/uyuni.py Outdated Show resolved Hide resolved
katprep/management/uyuni.py Outdated Show resolved Hide resolved
katprep/management/uyuni.py Outdated Show resolved Hide resolved
tests/test_UyuniAPIClient.py Outdated Show resolved Hide resolved
tests/test_UyuniAPIClient.py Show resolved Hide resolved
tests/test_UyuniAPIClient.py Outdated Show resolved Hide resolved
tests/test_UyuniAPIClient.py Outdated Show resolved Hide resolved
tests/test_UyuniAPIClient.py Outdated Show resolved Hide resolved
okin and others added 17 commits January 17, 2022 16:24
Strip leading and trailing whitespace from credentials
* add pre/post script parameters

* update documentation

* update manpages

* update documentation

* fix linting

* add call for getting host custom info keys

* add API calls and tests for custom variables

* update docstrings

* add calls/tests for managing host custom values

* added call/tests for running host commands

* fix typo

* add calls/tests for action chains

* use similiar variable names

* add properties to retrieve pre/post scripts

* add abstract methods for pre/post scripts

* implement optional pre/post script handling

* fix linting

* fix parameter names

* run action chain for patches/upgrades

* fix missing returns for action chains

* fix pre/post script property

* add missing parameters for patches/upgrades

* fix host references

* add action chain tests

* add call/test for getting script task info

* print still running jobs

* include script execution tasks

* show message if errata already installed

* fix incorrect errata ID format and missing script hints

* print action type instead of long description

* fix broken script task counter

* fix incorrect hostname parameter

* use safe full YAML loader

* fix linting

* add URLs for Uyuni 2022.01 and 2022.02

* add hint about PATH variable during installation

* add note about Python dependencies

* update documentation

* make finding hosts modular

* ensure that VMs without IP won't crash search

* Refactor handling of pre- and post-scripts

This allows running pre and post independent from each other and also if only one of them is set.

* added Uyuni 2022.03 links

* add new post/pre script parameters

used for setting effective user/group

* update documentation

* add pre/post script user/group properties

* run pre/post script with appropriate user

* add host filter calls

* add calls for getting hostname by ID

* remove Python 2 support

* add missing Uyuni support to parameters.py

* fix linting

* remove unneeded filter references

* update tested products

* add Uyuni 2022.04 links

* update Python installation notes

* add Uyuni user preparation

* bump documentation

* update/order parameter documentation

* bump documentation release

* updated changelog

* bump documentation version

* formatted hint about breaking changes in 0.6.0

* bump box and Ansible role versions

* drop Nagios sites as it's supported by OMD anymore

* fix typo

* add fix for Vagrantbox

* bump Uyuni version

* bump documentation

* rename pre/post script parameters

We're also going to implement reboot pre/post scripts

* update documentation

* add reboot pre/post script parameters

* update documentation

* bump documentation

* add reboot pre/post scripts

* update documentation

* bump documentation

Co-authored-by: Niko Wenselowski <[email protected]>
otherwise reboots will intefere with patching
@stdevel stdevel marked this pull request as ready for review May 13, 2022 08:47
@stdevel stdevel dismissed okin’s stale review May 13, 2022 08:48

We fixed this in the meantime :3

self.actionchain_add_upgrades(chain_label, system_id, upgrades)
)
except EmptySetException as err:
if err == "No upgrades defined":
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will not work. You have to use access the attribute containing the message for the comparison otherwise this will never be true.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
0.5.x
  
To do
Development

Successfully merging this pull request may close these issues.

None yet

3 participants