Skip to content

Commit ac02a4a

Browse files
committed
Fixup: choose_network_name_for_pif
Construct a explicit name label of network by adding "(slot %d)" Signed-off-by: Changlei Li <[email protected]>
1 parent d95662a commit ac02a4a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ocaml/xapi/helpers.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ let call_script ?(log_output = Always) ?env ?stdin ?timeout script args =
131131
(** Construct a descriptive network name (used as name_label) for a give network interface. *)
132132
let choose_network_name_for_pif device pos_opt =
133133
let pos_str =
134-
match pos_opt with None -> "" | Some pos -> Printf.sprintf "[%d]" pos
134+
Option.fold ~none:"" ~some:(Printf.sprintf " (slot %d)") pos_opt
135135
in
136136
Printf.sprintf "Pool-wide network associated with %s%s" device pos_str
137137

0 commit comments

Comments
 (0)