Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor xapi-storage-script to use modules
The `bind` function in xapi-storage-script has lots of implementaions all over the place, making it hard to maintain. Use module abstractions to separate different storage functions. The tricky bit of this is the need to pass `version` and `volume_script_dir` into each storage function calls, and these two variables are determined at runtime. Hence functors are used for this purpose, once the `volume_script_dir` is determined when `bind` is called, pass this as inside the `RuntimeMeta` module to the relevant implementations. The `version` global variable, however, is populated when `Query.query` is called, so create an alias in the `RuntimeMeta` module so that it can be used in the storage function implementations. Signed-off-by: Vincent Liu <[email protected]>
- Loading branch information