diff --git a/dev-tools/omdb/src/bin/omdb/db.rs b/dev-tools/omdb/src/bin/omdb/db.rs index 9c43d0d670..d971545087 100644 --- a/dev-tools/omdb/src/bin/omdb/db.rs +++ b/dev-tools/omdb/src/bin/omdb/db.rs @@ -1299,10 +1299,10 @@ async fn lookup_project( #[derive(Tabled)] #[tabled(rename_all = "SCREAMING_SNAKE_CASE")] struct DiskIdentity { - name: String, id: Uuid, size: String, state: String, + name: String, } impl From<&'_ db::model::Disk> for DiskIdentity { @@ -3325,17 +3325,14 @@ async fn cmd_db_instance_info( println!("\n{:=<80}", "== ATTACHED DISKS "); check_limit(&disks, fetch_opts.fetch_limit, ctx); - let table = if fetch_opts.include_deleted { + let mut table = if fetch_opts.include_deleted { tabled::Table::new(disks.iter().map(MaybeDeletedDiskRow::from)) - .with(tabled::settings::Style::empty()) - .with(tabled::settings::Padding::new(0, 1, 0, 0)) - .to_string() } else { tabled::Table::new(disks.iter().map(DiskRow::from)) - .with(tabled::settings::Style::empty()) - .with(tabled::settings::Padding::new(0, 1, 0, 0)) - .to_string() }; + table + .with(tabled::settings::Style::empty()) + .with(tabled::settings::Padding::new(0, 1, 0, 0)); println!("{table}"); } @@ -3502,11 +3499,11 @@ struct VmmStateRow { #[tabled(rename_all = "SCREAMING_SNAKE_CASE")] struct CustomerInstanceRow { id: String, - name: String, state: String, propolis_id: MaybePropolisId, sled_id: MaybeSledId, host_serial: String, + name: String, } /// Run `omdb db instances`: list data about customer VMs. diff --git a/dev-tools/omdb/tests/successes.out b/dev-tools/omdb/tests/successes.out index 1e99dbd3a8..6974c0b36b 100644 --- a/dev-tools/omdb/tests/successes.out +++ b/dev-tools/omdb/tests/successes.out @@ -2,7 +2,7 @@ EXECUTING COMMAND: omdb ["db", "disks", "list"] termination: Exited(0) --------------------------------------------- stdout: -NAME ID SIZE STATE ATTACHED_TO +ID SIZE STATE NAME ATTACHED_TO --------------------------------------------- stderr: note: using database URL postgresql://root@[::1]:REDACTED_PORT/omicron?sslmode=disable @@ -52,7 +52,7 @@ EXECUTING COMMAND: omdb ["db", "instances"] termination: Exited(0) --------------------------------------------- stdout: -ID NAME STATE PROPOLIS_ID SLED_ID HOST_SERIAL +ID STATE PROPOLIS_ID SLED_ID HOST_SERIAL NAME --------------------------------------------- stderr: note: using database URL postgresql://root@[::1]:REDACTED_PORT/omicron?sslmode=disable