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-net
This has been superseded by using --net 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
ffd816ebfa
commit
374ac77c63
96
src/main.rs
96
src/main.rs
@@ -509,7 +509,6 @@ mod unit_tests {
|
||||
iommu: false,
|
||||
},
|
||||
devices: None,
|
||||
vhost_user_net: None,
|
||||
vsock: None,
|
||||
iommu: false,
|
||||
};
|
||||
@@ -1233,101 +1232,6 @@ mod unit_tests {
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_valid_vm_config_vunet() {
|
||||
vec![
|
||||
// This test is expected to fail because the default MAC address is
|
||||
// randomly generated. There's no way we can have twice the same
|
||||
// default value.
|
||||
(
|
||||
vec![
|
||||
"cloud-hypervisor",
|
||||
"--vhost-user-net",
|
||||
"sock=/path/to/sock/1",
|
||||
"sock=/path/to/sock/2",
|
||||
],
|
||||
r#"{
|
||||
"vhost_user_net": [
|
||||
{"sock": "/path/to/sock/1"},
|
||||
{"sock": "/path/to/sock/2"}
|
||||
]
|
||||
}"#,
|
||||
false,
|
||||
),
|
||||
(
|
||||
vec![
|
||||
"cloud-hypervisor",
|
||||
"--vhost-user-net",
|
||||
"sock=/path/to/sock/1,mac=12:34:56:78:90:ab",
|
||||
"sock=/path/to/sock/2,mac=12:34:56:78:90:cd",
|
||||
],
|
||||
r#"{
|
||||
"vhost_user_net": [
|
||||
{"sock": "/path/to/sock/1", "mac": "12:34:56:78:90:ab"},
|
||||
{"sock": "/path/to/sock/2", "mac": "12:34:56:78:90:cd"}
|
||||
]
|
||||
}"#,
|
||||
true,
|
||||
),
|
||||
(
|
||||
vec![
|
||||
"cloud-hypervisor",
|
||||
"--vhost-user-net",
|
||||
"sock=/path/to/sock,mac=12:34:56:78:90:ab,num_queues=4",
|
||||
],
|
||||
r#"{
|
||||
"vhost_user_net": [
|
||||
{"sock": "/path/to/sock", "mac": "12:34:56:78:90:ab", "num_queues": 4}
|
||||
]
|
||||
}"#,
|
||||
true,
|
||||
),
|
||||
(
|
||||
vec![
|
||||
"cloud-hypervisor",
|
||||
"--vhost-user-net",
|
||||
"sock=/path/to/sock,mac=12:34:56:78:90:ab,num_queues=4,queue_size=128",
|
||||
],
|
||||
r#"{
|
||||
"vhost_user_net": [
|
||||
{"sock": "/path/to/sock", "mac": "12:34:56:78:90:ab", "num_queues": 4, "queue_size": 128}
|
||||
]
|
||||
}"#,
|
||||
true,
|
||||
),
|
||||
(
|
||||
vec![
|
||||
"cloud-hypervisor",
|
||||
"--vhost-user-net",
|
||||
"sock=/path/to/sock,mac=12:34:56:78:90:ab,num_queues=2,queue_size=256",
|
||||
],
|
||||
r#"{
|
||||
"vhost_user_net": [
|
||||
{"sock": "/path/to/sock", "mac": "12:34:56:78:90:ab"}
|
||||
]
|
||||
}"#,
|
||||
true,
|
||||
),
|
||||
(
|
||||
vec![
|
||||
"cloud-hypervisor",
|
||||
"--vhost-user-net",
|
||||
"sock=/path/to/sock,mac=12:34:56:78:90:ab",
|
||||
],
|
||||
r#"{
|
||||
"vhost_user_net": [
|
||||
{"sock": "/path/to/sock", "mac": "12:34:56:78:90:ab", "num_queues": 2, "queue_size": 256}
|
||||
]
|
||||
}"#,
|
||||
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