Pino Toscano
bbd68e26a2
redhat_subscription: require credentials only when needed ( #5664 )
...
The module currently has a static 'required_if' statement for its
parameters that forces any of 'username' or 'activationkey' or 'token'
in case state=present; while this is generally a good idea, it can be
an extra requirements in some cases. In particular, if the system is
already registered, there is no need for credentials -- some of the
operations of the module, such as manipulating pools, can be done
perfectly without credentials.
Hence:
- change the static 'required_if' to require credentials only when
forcing the registration
- check for credentials manually when a registration is needed, i.e.
on an unregistered system; the fail message is the same as the one
shown by 'required_if'
Adapt the tests to this new situation:
- test_without_required_parameters now needs to mock an unregistered
system
- add a new version of test_without_required_parameters to test an
already registered system
- add a simple test case for only state=present usable on an already
registered system
- remove the credentials from a test case for pool attachment that
mocks an already registered system
2023-03-22 20:19:55 +01:00
..
2023-03-09 20:09:13 +01:00
2022-08-05 12:28:29 +02:00
2022-11-02 20:42:29 +00:00
2022-11-02 20:42:29 +00:00
2022-11-02 20:42:29 +00:00
2023-02-12 21:05:08 +01:00
2022-11-02 20:42:29 +00:00
2022-11-02 20:42:29 +00:00
2023-02-12 21:05:08 +01:00
2023-02-12 21:05:08 +01:00
2023-02-12 21:05:08 +01:00
2022-11-02 20:42:29 +00:00
2022-11-02 20:42:29 +00:00
2022-11-02 20:42:29 +00:00
2022-11-02 20:42:29 +00:00
2022-11-02 20:42:29 +00:00
2022-11-02 20:42:29 +00:00
2022-11-02 20:42:29 +00:00
2022-11-02 20:42:29 +00:00
2022-11-02 20:42:29 +00:00
2022-11-07 20:15:00 +01:00
2022-11-02 20:42:29 +00:00
2023-03-04 20:51:50 +01:00
2023-02-12 21:05:08 +01:00
2022-11-02 20:42:29 +00:00
2022-11-02 20:42:29 +00:00
2022-11-02 20:42:29 +00:00
2022-11-15 21:02:45 +01:00
2022-11-02 20:42:29 +00:00
2023-02-12 21:05:08 +01:00
2022-11-02 20:42:29 +00:00
2022-11-02 20:42:29 +00:00
2022-11-02 20:42:29 +00:00
2022-11-02 20:42:29 +00:00
2023-02-12 21:05:08 +01:00
2022-11-02 20:42:29 +00:00
2022-11-02 20:42:29 +00:00
2022-11-02 20:42:29 +00:00
2022-11-02 20:42:29 +00:00
2022-11-02 20:42:29 +00:00
2022-11-02 20:42:29 +00:00
2022-11-02 20:42:29 +00:00
2022-11-02 20:42:29 +00:00
2022-11-02 20:42:29 +00:00
2022-11-10 21:18:01 +01:00
2022-11-02 20:42:29 +00:00
2023-02-12 21:05:08 +01:00
2023-02-12 21:05:08 +01:00
2023-02-12 21:05:08 +01:00
2023-02-12 21:05:08 +01:00
2023-02-12 21:05:08 +01:00
2023-02-12 21:05:08 +01:00
2023-02-12 21:05:08 +01:00
2023-02-12 21:05:08 +01:00
2023-02-12 21:05:08 +01:00
2023-02-12 21:05:08 +01:00
2023-02-12 21:05:08 +01:00
2022-11-02 20:42:29 +00:00
2023-02-12 21:05:08 +01:00
2023-02-12 21:05:08 +01:00
2022-11-02 20:42:29 +00:00
2023-02-26 14:58:58 +01:00
2022-11-02 20:42:29 +00:00
2023-03-04 10:01:52 +01:00
2023-02-12 21:05:08 +01:00
2023-02-12 21:05:08 +01:00
2023-01-22 17:10:36 +01:00
2023-02-12 21:05:08 +01:00
2023-02-12 21:05:08 +01:00
2023-02-12 21:05:08 +01:00
2023-02-12 21:05:08 +01:00
2023-02-12 21:05:08 +01:00
2023-02-12 21:05:08 +01:00
2023-02-12 21:05:08 +01:00
2023-02-12 21:05:08 +01:00
2023-02-12 21:05:08 +01:00
2023-02-12 21:05:08 +01:00
2023-02-12 21:05:08 +01:00
2023-02-12 21:05:08 +01:00
2023-02-12 21:05:08 +01:00
2023-02-12 21:05:08 +01:00
2023-02-12 21:05:08 +01:00
2023-03-02 07:01:15 +01:00
2022-11-02 20:42:29 +00:00
2023-02-12 21:05:08 +01:00
2022-11-02 20:42:29 +00:00
2022-11-02 20:42:29 +00:00
2022-11-02 20:42:29 +00:00
2022-11-02 20:42:29 +00:00
2022-11-02 20:42:29 +00:00
2022-11-02 20:42:29 +00:00
2022-11-02 20:42:29 +00:00
2022-11-02 20:42:29 +00:00
2022-11-02 20:42:29 +00:00
2022-11-02 20:42:29 +00:00
2022-11-02 20:42:29 +00:00
2022-11-02 20:42:29 +00:00
2022-11-02 20:42:29 +00:00
2023-02-12 21:05:08 +01:00
2022-12-14 21:30:03 +01:00
2023-03-22 20:19:55 +01:00
2023-02-12 21:05:08 +01:00
2022-11-02 20:42:29 +00:00
2022-11-02 20:42:29 +00:00
2022-11-02 20:42:29 +00:00
2023-02-12 21:05:08 +01:00
2023-02-12 21:05:08 +01:00
2023-03-22 13:15:32 +01:00
2022-11-02 20:42:29 +00:00
2022-11-02 20:42:29 +00:00
2022-11-02 20:42:29 +00:00
2023-02-03 11:02:14 +01:00
2022-11-02 20:42:29 +00:00
2022-11-02 20:42:29 +00:00
2023-02-12 21:05:08 +01:00
2022-11-02 20:42:29 +00:00
2022-11-02 20:42:29 +00:00
2022-11-02 20:42:29 +00:00
2022-11-02 20:42:29 +00:00
2022-11-02 20:42:29 +00:00
2023-02-12 21:05:08 +01:00
2023-02-12 21:05:08 +01:00
2023-02-12 21:05:08 +01:00
2022-11-02 20:42:29 +00:00
2022-11-02 20:42:29 +00:00
2022-08-08 14:24:58 +02:00
2022-11-02 20:42:29 +00:00
2022-11-02 20:42:29 +00:00