Merge lp:~bbaude/cloud-init/rh_subscription into lp:~cloud-init-dev/cloud-init/trunk
| Status: | Merged |
|---|---|
| Merged at revision: | 1113 |
| Proposed branch: | lp:~bbaude/cloud-init/rh_subscription |
| Merge into: | lp:~cloud-init-dev/cloud-init/trunk |
| Diff against target: |
675 lines (+661/-0) 3 files modified
cloudinit/config/cc_rh_subscription.py (+404/-0) doc/examples/cloud-config-rh_subscription.txt (+49/-0) tests/unittests/test_rh_subscription.py (+208/-0) |
| To merge this branch: | bzr merge lp:~bbaude/cloud-init/rh_subscription |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Dan Watkins | 2015-05-14 | Approve on 2015-06-10 | |
|
Review via email:
|
|||
Description of the Change
This patch adds a cloud-init plugin for helping users register
and subscribe their RHEL based systems. As inputs, it can take:
- user and password OR activation key and org | requires on of the
two pair
- auto-attach: True or False | optional
- service-level: <string> | optional
- add-pool [list, of, pool, ids] | optional
- enable-repos [list, of, yum, repos, to, enable] | optional
- disable-repos [list, of, yum, repos, to, disable] | optional
You can also pass the following to influence your registration via rhsm.conf:
- rhsm-baseurl | optional
- server-hostname | optional
- 1103. By Brent Baude on 2015-05-14
-
Adding an example file for rh_subscription in doc/examples
| Scott Moser (smoser) wrote : | # |
- 1104. By Brent Baude on 2015-05-21
-
This commit consists of three things based on feedback from smosher:
cc_rh_subscription: Use of self.log.info limited, uses the util.subp for subprocesses, removed full path for subscription-
manager cloud-config-
rh_subscription .txt: A heavily commented example file on how to use rh_subscription and its main keys test_rh_
subscription. py: a set of unittests for rh_subscription
| Dan Watkins (daniel-thewatkins) wrote : | # |
Some testing comments (in addition to those in IRC); will now review the code itself.
| Dan Watkins (daniel-thewatkins) wrote : | # |
A bit more detail on self.assertRaises.
- 1105. By Brent Baude on 2015-05-27
-
Updated files with upstream review comments thanks to Dan and Scott
- 1106. By Brent Baude on 2015-05-28
-
Tightening up an error message and isinstance usage based on feedback from Dan
- 1107. By Brent Baude on 2015-05-29
-
Corrected spelling error on variable name


Brent,
this looks good, thanks for submitting.
a couple other minor things
a.) please don't use 'log.info' more than once.
that goes to the console or cloud-init's stdout. and i dont really want cloud-init to spam the console with "everything looks good" types of messages.
a single "registered with rhn" is probably fine.
others can be debug.
I do hope to have better rules in the future on what messages should go at what version.
b.) some unit tests would be nice.
c.) is there a reason for the hard coded /bin/subscripti on-manager ?
my preference is to always assume PATH is sane. if not, something else is probably wrong.
d.) instead of _captureRun, or even subprocess. use util.subp.
just nicer to have a single path for all that stuff.
thanks.