mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
main, vmm: Remove deprecated --vhost-user-blk
This has been superseded by using --disk with vhost_user=true and socket=<socket> Fixes: #678 Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
committed by
Samuel Ortiz
parent
d04e0dc9e1
commit
ffd816ebfa
118
src/main.rs
118
src/main.rs
@@ -233,19 +233,6 @@ fn create_app<'a, 'b>(
|
||||
.min_values(1)
|
||||
.group("vm-config"),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("vhost-user-blk")
|
||||
.long("vhost-user-blk")
|
||||
.help(
|
||||
"Vhost user Block parameters \"sock=<socket_path>,\
|
||||
num_queues=<number_of_queues>,\
|
||||
queue_size=<size_of_each_queue>, \
|
||||
wce=<true|false, default true>\"",
|
||||
)
|
||||
.takes_value(true)
|
||||
.min_values(1)
|
||||
.group("vm-config"),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("v")
|
||||
.short("v")
|
||||
@@ -523,7 +510,6 @@ mod unit_tests {
|
||||
},
|
||||
devices: None,
|
||||
vhost_user_net: None,
|
||||
vhost_user_blk: None,
|
||||
vsock: None,
|
||||
iommu: false,
|
||||
};
|
||||
@@ -1342,110 +1328,6 @@ mod unit_tests {
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_valid_vm_config_vublk() {
|
||||
vec![
|
||||
(
|
||||
vec![
|
||||
"cloud-hypervisor",
|
||||
"--vhost-user-blk",
|
||||
"sock=/path/to/sock/1",
|
||||
"sock=/path/to/sock/2",
|
||||
],
|
||||
r#"{
|
||||
"vhost_user_blk": [
|
||||
{"sock": "/path/to/sock/1"},
|
||||
{"sock": "/path/to/sock/2"}
|
||||
]
|
||||
}"#,
|
||||
true,
|
||||
),
|
||||
(
|
||||
vec![
|
||||
"cloud-hypervisor",
|
||||
"--vhost-user-blk",
|
||||
"sock=/path/to/sock/1",
|
||||
"sock=/path/to/sock/2",
|
||||
],
|
||||
r#"{
|
||||
"vhost_user_blk": [
|
||||
{"sock": "/path/to/sock/1"}
|
||||
]
|
||||
}"#,
|
||||
false,
|
||||
),
|
||||
(
|
||||
vec![
|
||||
"cloud-hypervisor",
|
||||
"--vhost-user-blk",
|
||||
"sock=/path/to/sock/1,num_queues=4",
|
||||
],
|
||||
r#"{
|
||||
"vhost_user_blk": [
|
||||
{"sock": "/path/to/sock/1", "num_queues": 4}
|
||||
]
|
||||
}"#,
|
||||
true,
|
||||
),
|
||||
(
|
||||
vec![
|
||||
"cloud-hypervisor",
|
||||
"--vhost-user-blk",
|
||||
"sock=/path/to/sock/1,num_queues=4,queue_size=1024",
|
||||
],
|
||||
r#"{
|
||||
"vhost_user_blk": [
|
||||
{"sock": "/path/to/sock/1", "num_queues": 4, "queue_size": 1024}
|
||||
]
|
||||
}"#,
|
||||
true,
|
||||
),
|
||||
(
|
||||
vec![
|
||||
"cloud-hypervisor",
|
||||
"--vhost-user-blk",
|
||||
"sock=/path/to/sock/1,num_queues=4,queue_size=1024,wce=true",
|
||||
],
|
||||
r#"{
|
||||
"vhost_user_blk": [
|
||||
{"sock": "/path/to/sock/1", "num_queues": 4, "queue_size": 1024, "wce": true}
|
||||
]
|
||||
}"#,
|
||||
true,
|
||||
),
|
||||
(
|
||||
vec![
|
||||
"cloud-hypervisor",
|
||||
"--vhost-user-blk",
|
||||
"sock=/path/to/sock/1,num_queues=1,queue_size=128,wce=true",
|
||||
],
|
||||
r#"{
|
||||
"vhost_user_blk": [
|
||||
{"sock": "/path/to/sock/1"}
|
||||
]
|
||||
}"#,
|
||||
true,
|
||||
),
|
||||
(
|
||||
vec![
|
||||
"cloud-hypervisor",
|
||||
"--vhost-user-blk",
|
||||
"sock=/path/to/sock/1",
|
||||
],
|
||||
r#"{
|
||||
"vhost_user_blk": [
|
||||
{"sock": "/path/to/sock/1", "num_queues": 1, "queue_size": 128, "wce": true}
|
||||
]
|
||||
}"#,
|
||||
true,
|
||||
),
|
||||
]
|
||||
.iter()
|
||||
.for_each(|(cli, openapi, equal)| {
|
||||
compare_vm_config_cli_vs_json(cli, openapi, *equal);
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_valid_vm_config_vsock() {
|
||||
vec![
|
||||
|
||||
Reference in New Issue
Block a user