Skip to content

Commit

Permalink
xapi_sr: remove commented code from 2009
Browse files Browse the repository at this point in the history
Signed-off-by: Pau Ruiz Safont <[email protected]>
  • Loading branch information
psafont committed Dec 9, 2024
1 parent f14fcdf commit 21b56b4
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions ocaml/xapi/xapi_sr.ml
Original file line number Diff line number Diff line change
Expand Up @@ -360,23 +360,6 @@ let create ~__context ~host ~device_config ~(physical_size : int64) ~name_label
Helpers.assert_rolling_upgrade_not_in_progress ~__context ;
debug "SR.create name_label=%s sm_config=[ %s ]" name_label
(String.concat "; " (List.map (fun (k, v) -> k ^ " = " ^ v) sm_config)) ;
(* This breaks the udev SR which doesn't support sr_probe *)
(*
let probe_result = probe ~__context ~host ~device_config ~_type ~sm_config in
begin
match Xml.parse_string probe_result with
| Xml.Element("SRlist", _, children) -> ()
| _ ->
(* Figure out what was missing, then throw the appropriate error *)
match String.lowercase_ascii _type with
| "lvmoiscsi" ->
if not (List.exists (fun (s,_) -> "targetiqn" = String.lowercase_ascii s) device_config)
then raise (Api_errors.Server_error ("SR_BACKEND_FAILURE_96",["";"";probe_result]))
else if not (List.exists (fun (s,_) -> "scsiid" = String.lowercase_ascii s) device_config)
then raise (Api_errors.Server_error ("SR_BACKEND_FAILURE_107",["";"";probe_result]))
| _ -> ()
end;
*)
let sr_uuid = Uuidx.make () in
let sr_uuid_str = Uuidx.to_string sr_uuid in
(* Create the SR in the database before creating on disk, so the backends can read the sm_config field. If an error happens here
Expand Down

0 comments on commit 21b56b4

Please sign in to comment.