- let nodes = Mclu_conf.nodes () in
- let node =
- match host with
- | Some host ->
- (try List.find (fun n -> host = n.Mclu_conf.hostname) nodes
- with Not_found ->
- eprintf "mclu: host '%s' not found\n" host;
- exit 1)
- | None ->
- (* No 'host:' prefix given, so we need to find the host. *)
- let guests = Mclu_list.active_guests ~verbose ~nodes () in
- let node, _ =
- try
- List.find (
- fun (node, doms) ->
- List.exists (
- fun dom ->
- name = dom.Mclu_list.dom_name
- ) doms
- ) guests
- with
- Not_found ->
- eprintf "mclu: guest '%s' not found\n" name;
- exit 1 in
- node in
-