You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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` ref cell is populated when `Query.query`
is called, which should be the first call of each plugin. Once it is
populated, it will then be used by different plugin functions. We do
need a separate version for each plugin though, so create a new module
(which contains a new version) each time bind is called, just as before.
Signed-off-by: Vincent Liu <[email protected]>
0 commit comments