Add some initial boilerplate

Signed-off-by: David Scott <dave.scott@citrix.com>
Regenerate OASIS

Signed-off-by: David Scott <dave.scott@citrix.com>
Add a 'root' directory, which will contain the adapter directories

Each directory will ultimately have a set of scripts inside. The
queue name will be taken from the directory name.

Signed-off-by: David Scott <dave.scott@citrix.com>
Generate manpage as part of the build (thanks, cmdliner)

Signed-off-by: David Scott <dave.scott@citrix.com>
Use inotify to watch the root-dir for new sub-directories

Signed-off-by: David Scott <dave.scott@citrix.com>
Add queues in the message switch for new files/directories

Signed-off-by: David Scott <dave.scott@citrix.com>
make: the server depends on main.ml (obviously)

Signed-off-by: David Scott <dave.scott@citrix.com>
Regenerate OASIS

Signed-off-by: David Scott <dave.scott@citrix.com>
inotify: the 'file_info' list always seems to be empty

... so we ignore it and list the files ourselves. This might cause us
to experience a duplicate event, so we should make create/destroy
idempotent.

Signed-off-by: David Scott <dave.scott@citrix.com>
Respond to xapi's storage Query.query method.

Signed-off-by: David Scott <dave.scott@citrix.com>
Hook up Query.query

Signed-off-by: David Scott <dave.scott@citrix.com>
The Plugin query interface is now separate

Signed-off-by: David Scott <dave.scott@citrix.com>
Marshal Error.t as Backend_error(SCRIPT_FAILURE, [ Error.to_string_hum ])

If the script doesn't exist you get:

$ sm-cli query --queue org.xen.xcp.storage.test
Error from storage backend:
SCRIPT_FAILURE: [ (Unix.Exit_or_signal (Exit_non_zero 254)) ]

Signed-off-by: David Scott <dave.scott@citrix.com>
If the script invocation fails, perform some error diagnosis.

Signed-off-by: David Scott <dave.scott@citrix.com>
Catch the exception if we can't parse the result of the script

Signed-off-by: David Scott <dave.scott@citrix.com>
Factor out the fork/exec/parse logic

This will be common across all commands.

Signed-off-by: David Scott <dave.scott@citrix.com>
Add SR.attach

Signed-off-by: David Scott <dave.scott@citrix.com>
Add 'uri' to the reported configuration

SMAPIv2 lients expect device_config parameters to be enumerated.

Signed-off-by: David Scott <dave.scott@citrix.com>
Add SR.detach

Signed-off-by: David Scott <dave.scott@citrix.com>
Add SR.create

Signed-off-by: David Scott <dave.scott@citrix.com>