1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/plugins
patchback[bot] 396b94183d
[PR #6658/42f7531f backport][stable-7] redhat_subscription: refactor of internal Rhsm class (#6667)
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.

(cherry picked from commit 42f7531f21)

Co-authored-by: Pino Toscano <ptoscano@redhat.com>
2023-06-10 21:10:56 +02:00
..
action Shutdown systemd without sysv (#6171) 2023-05-09 20:10:09 +02:00
become [PR #6627/011b2f8b backport][stable-7] Start using semantic markup (#6664) 2023-06-10 10:53:50 +02:00
cache [PR #6627/011b2f8b backport][stable-7] Start using semantic markup (#6664) 2023-06-10 10:53:50 +02:00
callback [PR #6627/011b2f8b backport][stable-7] Start using semantic markup (#6664) 2023-06-10 10:53:50 +02:00
connection Add 'inventory_hostname' to the jail plugin documentation (#6118) 2023-03-03 22:56:24 +01:00
doc_fragments [PR #6627/011b2f8b backport][stable-7] Start using semantic markup (#6664) 2023-06-10 10:53:50 +02:00
filter [PR #6627/011b2f8b backport][stable-7] Start using semantic markup (#6664) 2023-06-10 10:53:50 +02:00
inventory [PR #6627/011b2f8b backport][stable-7] Start using semantic markup (#6664) 2023-06-10 10:53:50 +02:00
lookup [PR #6627/011b2f8b backport][stable-7] Start using semantic markup (#6664) 2023-06-10 10:53:50 +02:00
module_utils [PR #6663/78c42def backport][stable-7] Deprecate module_utils.redhat (#6666) 2023-06-10 14:59:48 +02:00
modules [PR #6658/42f7531f backport][stable-7] redhat_subscription: refactor of internal Rhsm class (#6667) 2023-06-10 21:10:56 +02:00
test Fix more copyright lines, add more default copyright lines (#5095) 2022-08-08 14:24:58 +02:00