@@ -61,11 +61,11 @@ let output_result ((hdr, reply) as wire) =
61
61
| `Unikernel_image (compressed , image ) ->
62
62
let name = hdr.Vmm_commands. name in
63
63
write_to_file name compressed image
64
- | `Old_unikernels vms ->
64
+ | `Old_unikernels unikernels ->
65
65
List. iter (fun (name , cfg ) ->
66
66
if String. length cfg.Vmm_core.Unikernel. image > 0 then
67
67
write_to_file name cfg.compressed cfg.image)
68
- vms
68
+ unikernels
69
69
| `Block_device_image (compressed , image ) ->
70
70
let name = hdr.Vmm_commands. name in
71
71
write_to_file name compressed image
@@ -175,7 +175,7 @@ let prepare_update ~happy_eyeballs level host dryrun = function
175
175
Lwt. return (Error Communication_failed )
176
176
| Error _ -> Lwt. return (Error Communication_failed )
177
177
178
- let create_vm force image cpuid memory argv block_devices bridges compression restart_on_fail exit_codes =
178
+ let create_unikernel force image cpuid memory argv block_devices bridges compression restart_on_fail exit_codes =
179
179
let ( let * ) = Result. bind in
180
180
let * () =
181
181
if Vmm_core.String_set. (cardinal (of_list (List. map (fun (n , _ , _ ) -> n) bridges))) = List. length bridges then
@@ -222,15 +222,15 @@ let create_block size compression data =
222
222
else
223
223
Error (`Msg " data exceeds size" )
224
224
225
- let policy vms memory cpus block bridgesl =
225
+ let policy unikernels memory cpus block bridgesl =
226
226
let bridges = Vmm_core.String_set. of_list bridgesl
227
227
and cpuids = Vmm_core.IS. of_list cpus
228
228
in
229
229
if not (Vmm_core.String_set. cardinal bridges = List. length bridgesl) then
230
230
Logs. warn (fun m -> m " Bridges is not a set" );
231
231
if not (Vmm_core.IS. cardinal cpuids = List. length cpus) then
232
232
Logs. warn (fun m -> m " CPUids is not a set" );
233
- Vmm_core.Policy. { vms ; cpuids ; memory ; block ; bridges }
233
+ Vmm_core.Policy. { unikernels ; cpuids ; memory ; block ; bridges }
234
234
235
235
let to_exit_code = function
236
236
| Error `Eof -> Error Success
@@ -668,8 +668,8 @@ let info_policy () path =
668
668
let remove_policy () path =
669
669
jump (`Policy_cmd `Policy_remove ) (Vmm_core.Name. create_of_path path)
670
670
671
- let add_policy () vms memory cpus block bridges path d cert key ca key_type tmpdir =
672
- let p = policy vms memory cpus block bridges in
671
+ let add_policy () unikernels memory cpus block bridges path d cert key ca key_type tmpdir =
672
+ let p = policy unikernels memory cpus block bridges in
673
673
match Vmm_core.Policy. usable p with
674
674
| Error `Msg msg ->
675
675
Logs. err (fun m -> m " %s" msg);
@@ -689,7 +689,7 @@ let destroy () = jump (`Unikernel_cmd `Unikernel_destroy)
689
689
690
690
let create () force image cpuid memory argv block network compression restart_on_fail exit_code
691
691
name d cert key ca key_type tmpdir =
692
- match create_vm force image cpuid memory argv block network (compress_default compression d) restart_on_fail exit_code with
692
+ match create_unikernel force image cpuid memory argv block network (compress_default compression d) restart_on_fail exit_code with
693
693
| Ok cmd -> jump (`Unikernel_cmd cmd) name d cert key ca key_type tmpdir
694
694
| Error _ as e -> e
695
695
@@ -972,7 +972,7 @@ let cpus =
972
972
let doc = " CPUids to allow for this policy (argument may be repeated)." in
973
973
Arg. (value & opt_all int [] & info [ " cpu" ] ~doc )
974
974
975
- let vms =
975
+ let unikernels =
976
976
let doc = " Number of unikernels to allow running at the same time." in
977
977
Arg. (required & pos 1 (some int ) None & info [] ~doc ~docv: " UNIKERNELS" )
978
978
@@ -1016,7 +1016,7 @@ let cpu =
1016
1016
let doc = " CPUid to use." in
1017
1017
Arg. (value & opt int 0 & info [ " cpu" ] ~doc )
1018
1018
1019
- let vm_mem =
1019
+ let unikernel_mem =
1020
1020
let doc = " Memory to assign (in MB)." in
1021
1021
Arg. (value & opt int 32 & info [ " mem" ] ~doc )
1022
1022
@@ -1127,23 +1127,23 @@ let path =
1127
1127
let doc = " Path to unikernels." in
1128
1128
Arg. (required & pos 0 (some path_c) None & info [] ~doc ~docv: " PATH" )
1129
1129
1130
- let vm_c = Arg. conv (Name. of_string, Name. pp)
1130
+ let unikernel_c = Arg. conv (Name. of_string, Name. pp)
1131
1131
1132
- let opt_vm_name =
1132
+ let opt_unikernel_name =
1133
1133
let doc = " Name of unikernel." in
1134
- Arg. (value & opt vm_c Name. root & info [ " n" ; " name" ] ~doc )
1134
+ Arg. (value & opt unikernel_c Name. root & info [ " n" ; " name" ] ~doc )
1135
1135
1136
- let vm_name =
1136
+ let unikernel_name =
1137
1137
let doc = " Name of unikernel." in
1138
- Arg. (required & pos 0 (some vm_c ) None & info [] ~doc ~docv: " UNIKERNEL-NAME" )
1138
+ Arg. (required & pos 0 (some unikernel_c ) None & info [] ~doc ~docv: " UNIKERNEL-NAME" )
1139
1139
1140
1140
let block_name =
1141
1141
let doc = " Name of block device." in
1142
- Arg. (required & pos 0 (some vm_c ) None & info [] ~doc ~docv: " BLOCK-NAME" )
1142
+ Arg. (required & pos 0 (some unikernel_c ) None & info [] ~doc ~docv: " BLOCK-NAME" )
1143
1143
1144
1144
let opt_block_name =
1145
1145
let doc = " Name of block device." in
1146
- Arg. (value & opt vm_c Name. root & info [ " name" ] ~doc )
1146
+ Arg. (value & opt unikernel_c Name. root & info [ " name" ] ~doc )
1147
1147
1148
1148
let remote_host default_port =
1149
1149
let parse s =
@@ -1225,7 +1225,7 @@ let destroy_cmd =
1225
1225
`P " Destroy a unikernel." ]
1226
1226
in
1227
1227
let term =
1228
- Term. (term_result (const destroy $ (Albatross_cli. setup_log (const false )) $ vm_name $ dst $ ca_cert $ ca_key $ server_ca $ pub_key_type $ Albatross_cli. tmpdir))
1228
+ Term. (term_result (const destroy $ (Albatross_cli. setup_log (const false )) $ unikernel_name $ dst $ ca_cert $ ca_key $ server_ca $ pub_key_type $ Albatross_cli. tmpdir))
1229
1229
and info = Cmd. info " destroy" ~doc ~man ~exits
1230
1230
in
1231
1231
Cmd. v info term
@@ -1237,7 +1237,7 @@ let restart_cmd =
1237
1237
`P " Restarts a unikernel." ]
1238
1238
in
1239
1239
let term =
1240
- Term. (term_result (const restart $ (Albatross_cli. setup_log (const false )) $ vm_name $ dst $ ca_cert $ ca_key $ server_ca $ pub_key_type $ Albatross_cli. tmpdir))
1240
+ Term. (term_result (const restart $ (Albatross_cli. setup_log (const false )) $ unikernel_name $ dst $ ca_cert $ ca_key $ server_ca $ pub_key_type $ Albatross_cli. tmpdir))
1241
1241
and info = Cmd. info " restart" ~doc ~man ~exits
1242
1242
in
1243
1243
Cmd. v info term
@@ -1261,7 +1261,7 @@ let info_cmd =
1261
1261
`P " Shows information about unikernels." ]
1262
1262
in
1263
1263
let term =
1264
- Term. (term_result (const info_ $ (Albatross_cli. setup_log (const false )) $ opt_vm_name $ dst $ ca_cert $ ca_key $ server_ca $ pub_key_type $ Albatross_cli. tmpdir))
1264
+ Term. (term_result (const info_ $ (Albatross_cli. setup_log (const false )) $ opt_unikernel_name $ dst $ ca_cert $ ca_key $ server_ca $ pub_key_type $ Albatross_cli. tmpdir))
1265
1265
and info = Cmd. info " info" ~doc ~man ~exits
1266
1266
in
1267
1267
Cmd. v info term
@@ -1273,7 +1273,7 @@ let get_cmd =
1273
1273
`P " Downloads a unikernel image from albatross to disk." ]
1274
1274
in
1275
1275
let term =
1276
- Term. (term_result (const get $ (Albatross_cli. setup_log (const false )) $ compress_level $ vm_name $ dst $ ca_cert $ ca_key $ server_ca $ pub_key_type $ Albatross_cli. tmpdir))
1276
+ Term. (term_result (const get $ (Albatross_cli. setup_log (const false )) $ compress_level $ unikernel_name $ dst $ ca_cert $ ca_key $ server_ca $ pub_key_type $ Albatross_cli. tmpdir))
1277
1277
and info = Cmd. info " get" ~doc ~man ~exits
1278
1278
in
1279
1279
Cmd. v info term
@@ -1297,7 +1297,7 @@ let add_policy_cmd =
1297
1297
`P " Adds a policy." ]
1298
1298
in
1299
1299
let term =
1300
- Term. (term_result (const add_policy $ (Albatross_cli. setup_log (const false )) $ vms $ mem $ cpus $ opt_block_size $ bridge $ path $ dst $ ca_cert $ ca_key $ server_ca $ pub_key_type $ Albatross_cli. tmpdir))
1300
+ Term. (term_result (const add_policy $ (Albatross_cli. setup_log (const false )) $ unikernels $ mem $ cpus $ opt_block_size $ bridge $ path $ dst $ ca_cert $ ca_key $ server_ca $ pub_key_type $ Albatross_cli. tmpdir))
1301
1301
and info = Cmd. info " add-policy" ~doc ~man ~exits
1302
1302
in
1303
1303
Cmd. v info term
@@ -1309,7 +1309,7 @@ let create_cmd =
1309
1309
`P " Creates a unikernel." ]
1310
1310
in
1311
1311
let term =
1312
- Term. (term_result (const create $ (Albatross_cli. setup_log (const false )) $ force $ image $ cpu $ vm_mem $ args $ block $ net $ compress_level $ restart_on_fail $ exit_code $ vm_name $ dst $ ca_cert $ ca_key $ server_ca $ pub_key_type $ Albatross_cli. tmpdir))
1312
+ Term. (term_result (const create $ (Albatross_cli. setup_log (const false )) $ force $ image $ cpu $ unikernel_mem $ args $ block $ net $ compress_level $ restart_on_fail $ exit_code $ unikernel_name $ dst $ ca_cert $ ca_key $ server_ca $ pub_key_type $ Albatross_cli. tmpdir))
1313
1313
and info = Cmd. info " create" ~doc ~man ~exits
1314
1314
in
1315
1315
Cmd. v info term
@@ -1321,7 +1321,7 @@ let console_cmd =
1321
1321
`P " Shows console output of a unikernel." ]
1322
1322
in
1323
1323
let term =
1324
- Term. (term_result (const console $ (Albatross_cli. setup_log (const false )) $ since $ count $ vm_name $ dst $ ca_cert $ ca_key $ server_ca $ pub_key_type $ Albatross_cli. tmpdir))
1324
+ Term. (term_result (const console $ (Albatross_cli. setup_log (const false )) $ since $ count $ unikernel_name $ dst $ ca_cert $ ca_key $ server_ca $ pub_key_type $ Albatross_cli. tmpdir))
1325
1325
and info = Cmd. info " console" ~doc ~man ~exits
1326
1326
in
1327
1327
Cmd. v info term
@@ -1333,7 +1333,7 @@ let stats_subscribe_cmd =
1333
1333
`P " Shows statistics of unikernel." ]
1334
1334
in
1335
1335
let term =
1336
- Term. (term_result (const stats_subscribe $ (Albatross_cli. setup_log (const false )) $ opt_vm_name $ dst $ ca_cert $ ca_key $ server_ca $ pub_key_type $ Albatross_cli. tmpdir))
1336
+ Term. (term_result (const stats_subscribe $ (Albatross_cli. setup_log (const false )) $ opt_unikernel_name $ dst $ ca_cert $ ca_key $ server_ca $ pub_key_type $ Albatross_cli. tmpdir))
1337
1337
and info = Cmd. info " stats" ~doc ~man ~exits
1338
1338
in
1339
1339
Cmd. v info term
@@ -1345,7 +1345,7 @@ let stats_remove_cmd =
1345
1345
`P " Removes statistics of unikernel." ]
1346
1346
in
1347
1347
let term =
1348
- Term. (term_result (const stats_remove $ (Albatross_cli. setup_log (const false )) $ opt_vm_name $ dst $ ca_cert $ ca_key $ server_ca $ pub_key_type $ Albatross_cli. tmpdir))
1348
+ Term. (term_result (const stats_remove $ (Albatross_cli. setup_log (const false )) $ opt_unikernel_name $ dst $ ca_cert $ ca_key $ server_ca $ pub_key_type $ Albatross_cli. tmpdir))
1349
1349
and info = Cmd. info " stats-remove" ~doc ~man ~exits
1350
1350
in
1351
1351
Cmd. v info term
@@ -1357,7 +1357,7 @@ let stats_add_cmd =
1357
1357
`P " Add unikernel to statistics gathering." ]
1358
1358
in
1359
1359
let term =
1360
- Term. (term_result (const stats_add $ (Albatross_cli. setup_log (const false )) $ vmm_dev $ pid_req0 $ bridge_taps $ opt_vm_name $ dst $ ca_cert $ ca_key $ server_ca $ pub_key_type $ Albatross_cli. tmpdir))
1360
+ Term. (term_result (const stats_add $ (Albatross_cli. setup_log (const false )) $ vmm_dev $ pid_req0 $ bridge_taps $ opt_unikernel_name $ dst $ ca_cert $ ca_key $ server_ca $ pub_key_type $ Albatross_cli. tmpdir))
1361
1361
and info = Cmd. info " stats-add" ~doc ~man ~exits
1362
1362
in
1363
1363
Cmd. v info term
@@ -1429,7 +1429,7 @@ let update_cmd =
1429
1429
`P " Check and update a unikernel from the binary repository." ]
1430
1430
in
1431
1431
let term =
1432
- Term. (const update $ (Albatross_cli. setup_log (const false )) $ http_host $ dryrun $ compress_level $ vm_name $ dst $ ca_cert $ ca_key $ server_ca $ pub_key_type $ Albatross_cli. tmpdir)
1432
+ Term. (const update $ (Albatross_cli. setup_log (const false )) $ http_host $ dryrun $ compress_level $ unikernel_name $ dst $ ca_cert $ ca_key $ server_ca $ pub_key_type $ Albatross_cli. tmpdir)
1433
1433
and info = Cmd. info " update" ~doc ~man ~exits
1434
1434
in
1435
1435
Cmd. v info term
0 commit comments