Skip to content

Commit 3be9b9a

Browse files
committed
Merge pull request #33 from djs55/SR.destroy
Plumb through SR.destroy
2 parents 0f4eacb + 4764827 commit 3be9b9a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

main.ml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,18 @@ let process root_dir name x =
403403
>>= fun response ->
404404
Deferred.Result.return (R.success (Args.SR.Create.rpc_of_response response))
405405
end
406+
| { R.name = "SR.destroy"; R.params = [ args ] } ->
407+
let open Deferred.Result.Monad_infix in
408+
let args = Args.SR.Destroy.request_of_rpc args in
409+
Attached_SRs.find args.Args.SR.Destroy.sr
410+
>>= fun sr ->
411+
let args = Storage.Volume.Types.SR.Destroy.In.make
412+
args.Args.SR.Destroy.dbg
413+
sr in
414+
let args = Storage.Volume.Types.SR.Destroy.In.rpc_of_t args in
415+
fork_exec_rpc root_dir (script root_dir name `Volume "SR.destroy") args Storage.Volume.Types.SR.Destroy.Out.t_of_rpc
416+
>>= fun response ->
417+
Deferred.Result.return (R.success (Args.SR.Create.rpc_of_response response))
406418
| { R.name = "SR.scan"; R.params = [ args ] } ->
407419
let open Deferred.Result.Monad_infix in
408420
let args = Args.SR.Scan.request_of_rpc args in

0 commit comments

Comments
 (0)