Skip to content

Commit ed5bcc2

Browse files
committed
xapi-cli-server: set name description for SRs, when given
Previously the parameter was ignored and this was confusing users that expected the parameter to be used. Signed-off-by: Pau Ruiz Safont <pau.safont@vates.tech>
1 parent 660bdb6 commit ed5bcc2

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

ocaml/xapi-cli-server/cli_operations.ml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2606,6 +2606,7 @@ let parse_host_uuid ?(default_master = true) rpc session_id params =
26062606
26072607
let sr_create fd _printer rpc session_id params =
26082608
let name_label = List.assoc "name-label" params in
2609+
let name_description = Listext.assoc_default "name-description" params "" in
26092610
let shared = get_bool_param params "shared" in
26102611
let host = parse_host_uuid ~default_master:shared rpc session_id params in
26112612
let physical_size =
@@ -2640,21 +2641,21 @@ let sr_create fd _printer rpc session_id params =
26402641
let sm_config = read_map_params "sm-config" params in
26412642
let sr =
26422643
Client.SR.create ~rpc ~session_id ~host ~device_config ~name_label
2643-
~name_description:"" ~physical_size ~_type ~content_type ~shared
2644-
~sm_config
2644+
~name_description ~physical_size ~_type ~content_type ~shared ~sm_config
26452645
in
26462646
let sr_uuid = Client.SR.get_uuid ~rpc ~session_id ~self:sr in
26472647
marshal fd (Command (Print sr_uuid))
26482648
26492649
let sr_introduce printer rpc session_id params =
26502650
let name_label = List.assoc "name-label" params in
2651+
let name_description = Listext.assoc_default "name-description" params "" in
26512652
let _type = List.assoc "type" params in
26522653
let content_type = Listext.assoc_default "content-type" params "" in
26532654
let uuid = List.assoc "uuid" params in
26542655
let shared = get_bool_param params "shared" in
26552656
let sm_config = read_map_params "sm-config" params in
26562657
let _ =
2657-
Client.SR.introduce ~rpc ~session_id ~uuid ~name_label ~name_description:""
2658+
Client.SR.introduce ~rpc ~session_id ~uuid ~name_label ~name_description
26582659
~_type ~content_type ~shared ~sm_config
26592660
in
26602661
printer (Cli_printer.PList [uuid])

0 commit comments

Comments
 (0)