ooici/pyon — pull request #99 by daf (2012-05-18 21:02:28+00:00)
Title: Allow multiple connections to brokers

Connections to brokers are defined in `res/config/pyon.yml`, in two sections, `container.messaging.server` to get names like `primary` and `priviledged` [sic], and they key into connection information in `server`.

These changes move the concept of managing multiple nodes into the `ExchangeManager` class which every Container has. Instead of `ExchangeManager.start` returning the default node and ioloop greenlet to be saved by the Container, it is now saved by the EM and indexable.

- If some connections fail but at least one succeeds, just warns about it. If all fail or none are defined, throws an Exception
- `Container.node` is now a property that passes through to `ExchangeManager.default_node`, also a property, which returns `primary`, failing that any available, failing that a None. Endpoints automatically get the `primary` still via this scheme.
- Exchange objects will use the `priviledged` [sic] connection if available. (TODO: make sure EMS service uses it as well, it should)
- Full set of tests (unit/int)

TBR @mmeisinger, please don't merge until we've reviewed either offline or Monday.