main: switch to argh

A few breaking changes:

1. `-vvv` needs to be written as `-v -v -v`.
2. `--disk D1 D2` and others need to be written as `--disk D1 --disk D2`.
3. `--option=value` needs to be written as `--option value`

Change integration tests to adapt to the breaking changes.

Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
Wei Liu
2023-01-12 18:50:20 +00:00
committed by Rob Bradford
parent fe49056129
commit 111225a2a5
9 changed files with 400 additions and 649 deletions
+3 -2
View File
@@ -1159,7 +1159,7 @@ impl ToString for VerbosityLevel {
match self {
Warn => "".to_string(),
Info => "-v".to_string(),
Debug => "-vv".to_string(),
Debug => "-v -v".to_string(),
}
}
}
@@ -1210,7 +1210,7 @@ impl<'a> GuestCommand<'a> {
self.command.arg("-v");
}
Debug => {
self.command.arg("-vv");
self.command.args(["-v", "-v"]);
}
};
@@ -1278,6 +1278,7 @@ impl<'a> GuestCommand<'a> {
.unwrap()
)
.as_str(),
"--disk",
format!(
"path={}",
self.guest.disk_config.disk(DiskType::CloudInit).unwrap()