Merge lp:~dbuliga/charm-helpers/charm-helpers into lp:charm-helpers
Status: | Merged |
---|---|
Merged at revision: | not available |
Proposed branch: | lp:~dbuliga/charm-helpers/charm-helpers |
Merge into: | lp:charm-helpers |
Diff against target: | 0 lines |
To merge this branch: | bzr merge lp:~dbuliga/charm-helpers/charm-helpers |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
charmers | Pending | ||
Review via email: mp+285044@code.launchpad.net |
Description of the change
Considering that now there is CentOS support in Juju, it would be great to also support this platform in charmhelpers. As a result, this branch attempts to add cross platform support for RPM based systems, with CentOS as the first such OS.
This branch introduces a factory that based on platform, loads the proper functionality for that platform. There is currently a module "ubuntu", which is basically the old code moved into its own submodule, and a "centos" which implements the same functionality. The factory itself defines a number of functions that are common between the 2 OSs. For backwards compatibility, it also does a:
from .ubuntu import *
So you still get the same behavior as you previously did. So far only 2 modules have been touched by this branch: core and fetch. Most of the others are not really needed for basic charm building (contrib/openstack for example)
There was the need of a method in charmhelpers/
The need of changing methods name in fetch appeared because, in CentOS it was not feasible to have methods with name such as: (apt_install for example)
It will be easier to transition charms from using functions like: "apt_install" to just "install". More than this, at the bottom of the fetch/__init__.py there are some aliases created for backwards compatibility.
Greetings Denis,
Thanks for this massive contribution to charm-helpers! I've taken some time to look this over and I really like your approach to abstracting the distro's nuances. I'm pretty happy with how you've done this, and would ideally like to see unit tests bundled with a change this large.
However that being said, this looks like some great work. I additionally like how you've maintained backwords compat while this settles out and starts to land. Approving this MP today would potentially disrupt a lot of work going on with the rest of the ecosystem, so I'll leave my +1 and have someone else come by to take a look at the merge.
Thanks again for being patient and making such a great contribution! We really appreciate it.
If you have any questions/ comments/ concerns about the review contact us in #juju on irc.freenode.net or email the mailing list <email address hidden>, or ask a question tagged with "juju" on http:// askubuntu. com.