pulp/pulp_rpm — pull request #49 by jdob (2012-12-04 19:38:28+00:00)
Title: 880441 - Ported over group commands from builtins

https://bugzilla.redhat.com/show_bug.cgi?id=880441

Here's what happened. The consumer stuff used the old model of adding into the standard consumer section with RPM-specific stuff. We've moved away from that in favor of the root-level branching by support bundle so that we can fit Puppet stuff in.

As part of the root-level branching support, the repo commands were extracted out to pulp.client with the intention that the bundle extensions would leverage them and simply add in the specifics they need. All was right with the world.

We ran out of time to do the same for consumers. However, for 2.0 we need to at least have the consumer commands/sections under the rpm section so that they don't move post-2.0. A few weeks ago, a quick version of this was done by copying the commands out of the builtins and stuffing them directly into the RPM extensions. The builtins extension for this functionality was simply disabled (it's a no-op in it's init method).

In disabling that extension, however, we lost the group manipulation stuff. So for this fix, I basically copied with some structural changes these consumer group commands into the RPM extension. I left the originals and their unit tests alone and didn't carry over the unit tests since in January these will be refactored again to move into pulp.client (which I didn't have time to do cleanly with proper test coverage and docstrings now).

Where I'm going with all this is don't be surprised to find a lack of unit tests in this pull request. It's a 2.0 dirtiness and I feel dirty for it, but given the explanation above realize this isn't a few hundred lines of brand new untested code.