pulp/pulp — pull request #1079 by jortel (2014-08-05 14:45:51+00:00)
Title: Content sources container download implemented using queues.

The main reason for the change is to support passing a generator into ContentContainer.download(). The original algorithm iterated the *requests* passed into download in several passes. In order to iterate the *requests* once (to support generator), each requests is queued to the first source in it's list of sources that provide the requested content. Then, when (and if) a request fails to be satisfied by a given source, it is queue to the next source (and so on ..). The same basic algorithm but implemented using queues instead of multiple passes through the list of requests.

```
[jortel@localhost sources]$ nosetests --with-coverage --cover-package=pulp.server.content.sources
.............................................................................................
Name Stmts Miss Cover Missing
----------------------------------------------------------------------
pulp.server.content.sources 2 0 100%
pulp.server.content.sources.constants 25 0 100%
pulp.server.content.sources.container 196 0 100%
pulp.server.content.sources.descriptor 36 0 100%
pulp.server.content.sources.model 170 0 100%
----------------------------------------------------------------------
TOTAL 429 0 100%
----------------------------------------------------------------------
Ran 93 tests in 0.156s

OK
```