Skip to content

Commit 21b56b4

Browse files
committed
xapi_sr: remove commented code from 2009
Signed-off-by: Pau Ruiz Safont <pau.ruizsafont@cloud.com>
1 parent f14fcdf commit 21b56b4

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

ocaml/xapi/xapi_sr.ml

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -360,23 +360,6 @@ let create ~__context ~host ~device_config ~(physical_size : int64) ~name_label
360360
Helpers.assert_rolling_upgrade_not_in_progress ~__context ;
361361
debug "SR.create name_label=%s sm_config=[ %s ]" name_label
362362
(String.concat "; " (List.map (fun (k, v) -> k ^ " = " ^ v) sm_config)) ;
363-
(* This breaks the udev SR which doesn't support sr_probe *)
364-
(*
365-
let probe_result = probe ~__context ~host ~device_config ~_type ~sm_config in
366-
begin
367-
match Xml.parse_string probe_result with
368-
| Xml.Element("SRlist", _, children) -> ()
369-
| _ ->
370-
(* Figure out what was missing, then throw the appropriate error *)
371-
match String.lowercase_ascii _type with
372-
| "lvmoiscsi" ->
373-
if not (List.exists (fun (s,_) -> "targetiqn" = String.lowercase_ascii s) device_config)
374-
then raise (Api_errors.Server_error ("SR_BACKEND_FAILURE_96",["";"";probe_result]))
375-
else if not (List.exists (fun (s,_) -> "scsiid" = String.lowercase_ascii s) device_config)
376-
then raise (Api_errors.Server_error ("SR_BACKEND_FAILURE_107",["";"";probe_result]))
377-
| _ -> ()
378-
end;
379-
*)
380363
let sr_uuid = Uuidx.make () in
381364
let sr_uuid_str = Uuidx.to_string sr_uuid in
382365
(* Create the SR in the database before creating on disk, so the backends can read the sm_config field. If an error happens here

0 commit comments

Comments
 (0)