Skip to content

Commit

Permalink
fix omdb compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewjstone committed Nov 16, 2023
1 parent d5d7678 commit d737ba0
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions dev-tools/omdb/src/bin/omdb/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ use nexus_db_model::Zpool;
use nexus_db_queries::context::OpContext;
use nexus_db_queries::db;
use nexus_db_queries::db::datastore::DataStoreConnection;
use nexus_db_queries::db::datastore::DataStoreInventoryTest;
use nexus_db_queries::db::datastore::InstanceAndActiveVmm;
use nexus_db_queries::db::identity::Asset;
use nexus_db_queries::db::lookup::LookupPath;
Expand Down Expand Up @@ -383,8 +382,13 @@ impl DbArgs {
.await
}
DbCommands::Inventory(inventory_args) => {
cmd_db_inventory(&datastore, self.fetch_limit, inventory_args)
.await
cmd_db_inventory(
&opctx,
&datastore,
self.fetch_limit,
inventory_args,
)
.await
}
DbCommands::Services(ServicesArgs {
command: ServicesCommands::ListInstances,
Expand Down Expand Up @@ -1751,6 +1755,7 @@ fn format_record(record: &DnsRecord) -> impl Display {
// Inventory

async fn cmd_db_inventory(
opctx: &OpContext,
datastore: &DataStore,
limit: NonZeroU32,
inventory_args: &InventoryArgs,
Expand All @@ -1768,7 +1773,9 @@ async fn cmd_db_inventory(
}) => cmd_db_inventory_collections_list(&conn, limit).await,
InventoryCommands::Collections(CollectionsArgs {
command: CollectionsCommands::Show(CollectionsShowArgs { id }),
}) => cmd_db_inventory_collections_show(datastore, id, limit).await,
}) => {
cmd_db_inventory_collections_show(opctx, datastore, id, limit).await
}
}
}

Expand Down Expand Up @@ -1928,12 +1935,13 @@ async fn cmd_db_inventory_collections_list(
}

async fn cmd_db_inventory_collections_show(
opctx: &OpContext,
datastore: &DataStore,
id: Uuid,
limit: NonZeroU32,
) -> Result<(), anyhow::Error> {
let (collection, incomplete) = datastore
.inventory_collection_read_best_effort(id, limit)
.inventory_collection_read_best_effort(opctx, id, limit)
.await
.context("reading collection")?;
if incomplete {
Expand Down

0 comments on commit d737ba0

Please sign in to comment.