pulp/pulp — pull request #754 by jortel (2014-01-06 18:05:11+00:00)
Title: port agent manager for distributed tasks

The goal is to port the agent manger (and how it interacts with the agent) to work with our new distributed tasks environment. To achieve this:
- decouple from existing dispatcher.
- get rid of celery task stuff in the agent manager. no need to dispatch it twice.
- track outstanding agent requests as pseudo tasks in the task_status collection.
- update reply consumer to update the task_status instead of the dispatcher.
- add needed methods to task status manager to support agent reply.

While I was in the code:
- convert epydoc to rest syntax.
- add missing unit tests
- streamline code in various places.
- got rid of heartbeat support not used by pulp v2. We can always add it back if we decide to use it. Didn't want to include in this PR but heartbeat stuff did not have 100% test coverage and wanted this PR to result in 100% coverage. Doing in a separate PR introduced too many merge conflicts.

```
Name Stmts Miss Cover Missing
-------------------------------------------------------------------
pulp.server.managers.consumer.agent 156 0 100%
----------------------------------------------------------------------
Ran 12 tests in 2.277s

Name Stmts Miss Cover Missing
------------------------------------------------------------------
pulp.server.agent 4 0 100%
pulp.server.agent.context 18 0 100%
pulp.server.agent.direct 0 0 100%
pulp.server.agent.direct.pulpagent 48 0 100%
pulp.server.agent.direct.services 67 0 100%
------------------------------------------------------------------
TOTAL 137 0 100%
----------------------------------------------------------------------
Ran 20 tests in 0.323s
```