Skip to content

Commit 68e1f6f

Browse files
committed
Merge pull request xapi-project#11 from robhoes/trunk-ring3-car-2144
Make use of the new default records for Vbd and Vif
2 parents 7e69eee + 8271d8a commit 68e1f6f

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

src/xn.ml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -240,16 +240,12 @@ let parse_disk_info x = match Re_str.split_delim (Re_str.regexp "[,]") x with
240240

241241
let vbd_of_disk_info vm_id info =
242242
{
243+
Vbd.default_t with
243244
Vbd.id = vm_id, info.id;
244245
position = Some info.position;
245246
mode = info.mode;
246247
backend = info.disk;
247248
ty = info.ty;
248-
unpluggable = true;
249-
extra_backend_keys = [];
250-
extra_private_keys = [];
251-
qos = None;
252-
persistent = true;
253249
}
254250

255251
let print_disk vbd =
@@ -281,16 +277,11 @@ let parse_vif vm_id (x, idx) =
281277
Printf.fprintf stderr "I don't understand '%s'. Please use 'mac=xx:xx:xx:xx:xx:xx,bridge=xenbrX'.\n" x;
282278
exit 2
283279
) xs in {
280+
Vif.default_t with
284281
Vif.id = vm_id, string_of_int idx;
285282
position = idx;
286283
mac = if List.mem_assoc _mac kvpairs then List.assoc _mac kvpairs else "";
287-
carrier = true;
288-
mtu = 1500;
289-
rate = None;
290-
backend = if List.mem_assoc _bridge kvpairs then Network.Local (List.assoc _bridge kvpairs) else Network.Local "xenbr0";
291-
other_config = [];
292-
locking_mode = Vif.Unlocked;
293-
extra_private_keys = [];
284+
backend = if List.mem_assoc _bridge kvpairs then Network.Local (List.assoc _bridge kvpairs) else Network.default_t;
294285
}
295286

296287
let print_vm id =

0 commit comments

Comments
 (0)