pulp/pulp — pull request #473 by jdob (2013-05-09 19:41:12+00:00)
Title: Added get_destination_units call to the ImportUnitsConduit

This pull request looks WAY more complicated than the actual change is.

The change was to add a get_destination_units method. In the mixins module, there's a method called do_get_repo_units that takes care of looking up units for a repo and packaging them for the plugin API. So the implementation of the new API call was to simply call that.

The existing get_source_units was written before that do_get_repo_units existed, so it was also changed to use that. Lotta code ripped out for that.

The initial idea was to use the SingleRepoUnitsMixin to provide a get_units call scoped to the destination repository. First off, it was created incorrectly, passing the source ID instead. Secondly, that's ambiguous; get_source_units sets a good standard that getting the destination units should follow. So SingleRepoUnitsMixin was removed from the conduit and the test that looked for it removed as well.

That conduit had its own specific subclass of ImporterConduitException but no other conduits do that, so I removed that and replaced it with the base class itself.

And because that wasn't all chaotic enough, I changed the epydoc format to rst.