Commit 69576056 authored by Heinz N. Gies's avatar Heinz N. Gies

Add correct type to listing

parent 6e32a2c9
Pipeline #12323448 passed with stage
in 2 minutes and 45 seconds
[root]
name = "vmadm"
version = "0.2.1"
version = "0.2.2"
dependencies = [
"aud 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
"bzip2 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
......
......@@ -273,6 +273,14 @@ impl<'a> JDB<'a> {
Some(jail) => jail.id,
_ => 0,
};
let os = match conf.brand.as_str() {
"jail" => "OS",
"lx-jail" => "LX",
brand => {
warn!("Unknown brand: {}.", brand);
"OS"
}
};
let state = match id {
0 => &entry.state,
_ => "running",
......@@ -281,7 +289,7 @@ impl<'a> JDB<'a> {
println!(
"{}:{}:{}:{}:{}",
conf.uuid,
"OS",
os,
conf.max_physical_memory,
state,
conf.alias
......@@ -289,7 +297,7 @@ impl<'a> JDB<'a> {
} else {
table.add_row(Row::new(vec![
Cell::new(conf.uuid.hyphenated().to_string().as_str()),
Cell::new("OS"),
Cell::new(os),
Cell::new(conf.max_physical_memory.to_string().as_str()),
Cell::new(state),
Cell::new(conf.alias.as_str()),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment