rackerlabs/otter — pull request #816 by radix (2014-12-11 18:11:08+00:00)
Title: structurally reorganize the convergence code into a package

I don't recommend reading through the whole diff. It may be useful to mostly look at import statements and the new directory structure. I've made no logic change, only code location and import statements.

This is what I did:

- added an otter.convergence package
- deleted the otter.converger package
- moved all code from otter/convergence.py into modules in otter.convergence:
- gathering: the code that gathers data about the state of the world
- planning: the "converge" function, along with subordinates, and the optimization code
- effecting: right now, just _reqs_to_effect, but more code should be factored into this.
- steps: IStep, all the Step classes, and the Convergence class (which I think should be removed)
- model: the basic data structures that are shared between the otter.convergence.* modules
- composition: execute_convergence and tenant_is_enabled

I decided not to put any code (even imports) in otter/convergence/__init__.py; I think it's fine to have users import from the composition module.

This doesn't *fully* implement #801, but I think we should probably mark that closed when this PR is merged. I'll create tickets for some of the things, mostly about better factoring out "execute_convergence" so it can look more like the "convergeration" function in #801.