mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-08 14:20:04 -07:00
redhat_subscription: refactor of internal Rhsm class (#6658)
The two RegistrationBase & Rhsm classes were copied from the ones in the shared module_utils.redhat module; that said: - the versions here got improvements over the years - the RegistrationBase in module_utils.redhat is used only by the RHN modules, which are deprecated and slated for removal Hence, the classes here can be kept and simplified a bit: - fold the non-dummy content of RegistrationBase into Rhsm: there is no more need for the separate RegistrationBase base class - drop the init arguments "username", "password", and "token": the instance variables of them are not used anywhere, as the needed credentials (together with other variables) are passed to the register() method - create the Rhsm object later in main(), after the AnsibleModule creation and the uid check: this avoids the creation of Rhsm with a null module variable, changing it later There should be no behaviour change.
This commit is contained in:
parent
78c42def04
commit
42f7531f21
3 changed files with 15 additions and 37 deletions
|
@ -0,0 +1,6 @@
|
|||
minor_changes:
|
||||
- |
|
||||
redhat_subscription - the internal ``RegistrationBase`` class was folded
|
||||
into the other internal ``Rhsm`` class, as the separation had no purpose
|
||||
anymore
|
||||
(https://github.com/ansible-collections/community.general/pull/6658).
|
Loading…
Add table
Add a link
Reference in a new issue