Skip to content

Commit 1cb529b

Browse files
author
David Scott
committed
SMAPIv2 calls the operation "VDI_DELETE" rather than "VDI_DESTROY"
Signed-off-by: David Scott <dave.scott@eu.citrix.com>
1 parent 088765e commit 1cb529b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

main.ml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,9 @@ let process root_dir name x =
147147
fork_exec_rpc root_dir (script root_dir name `Volume "Plugin.Query") args Storage.P.Types.Plugin.Query.Out.t_of_rpc
148148
>>= fun response ->
149149
(* Convert between the xapi-storage interface and the SMAPI *)
150+
let features = List.map ~f:(function
151+
| "VDI_DESTROY" -> "VDI_DELETE"
152+
| x -> x) response.Storage.P.Types.features in
150153
let response = {
151154
driver = response.Storage.P.Types.plugin;
152155
name = response.Storage.P.Types.name;
@@ -155,7 +158,7 @@ let process root_dir name x =
155158
copyright = response.Storage.P.Types.copyright;
156159
version = response.Storage.P.Types.version;
157160
required_api_version = response.Storage.P.Types.required_api_version;
158-
features = response.Storage.P.Types.features;
161+
features;
159162
configuration =
160163
("uri", "URI of the storage medium") ::
161164
response.Storage.P.Types.configuration} in

0 commit comments

Comments
 (0)