We currently use utils.LazyPluggable and utils.import_class to load classes. We should use a single method. I suggest we use the techniques of LazyPluggable, but modify it so we don't need to specify a list of backends, but can give a class reference like those used in import_class. This way we get the lazy-loading of the backend, so that we can be less concerned with order of operations such as loading flags, and we don't need to maintain a list of possible values and can even reverence classes in other packages and allow drivers to be written outside of the main nova source tree.
Currently, nova uses at least four different methods for lazy loading components:
- utils.import_object (managers and drivers)
- utils.import_class (auth manager)
- utils.LazyPluggable (db backend)
- switch statement (virt connections)
All of them start with a flag. There is no reason to have four different ways of delayed object loading.
- Launchpad Entry: NovaSpec:foo or SwiftSpec:foo
This section should include a paragraph describing the end-user impact of this change. It is meant to be included in the release notes of the first release in which it is implemented. (Not all of these will actually be included in the release notes, at the release manager's discretion; but writing them is a useful exercise.)
It is mandatory.
You can have subsections that better describe specific parts of the issue.
This section should describe a plan of action (the "how") to implement the changes discussed. Could include subsections like:
Should cover changes required to the UI, or specific UI that is required to implement this
Code changes should include an overview of what needs to change, and in some cases even the specific details.
- data migration, if any
- redirects from old URLs to new ones, if any
- how users will be pointed to the new way of doing things, if necessary.
This need not be added or completed until the specification is nearing beta.
This should highlight any issues that should be addressed in further specifications, and not problems with the specification itself; since any specification with problems cannot be approved.
BoF agenda and discussion
Use this section to take notes during the BoF; if you keep it in the approved spec, use it for summarising what was discussed and note any options that were rejected.