Skip to content

[2/n][omdb] add initial webhook receiver OMDB commands #7808

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Apr 30, 2025
7 changes: 7 additions & 0 deletions dev-tools/omdb/src/bin/omdb/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,11 @@ use std::sync::Arc;
use strum::IntoEnumIterator;
use tabled::Tabled;
use uuid::Uuid;
use webhook::WebhookArgs;
use webhook::cmd_db_webhook;

mod saga;
mod webhook;

const NO_ACTIVE_PROPOLIS_MSG: &str = "<no active Propolis>";
const NOT_ON_SLED_MSG: &str = "<not on any sled>";
Expand Down Expand Up @@ -383,6 +386,8 @@ enum DbCommands {
Vmms(VmmListArgs),
/// Print information about the oximeter collector.
Oximeter(OximeterArgs),
/// Print information about webhooks
Webhook(WebhookArgs),
/// Commands for querying and interacting with pools
Zpool(ZpoolArgs),
}
Expand Down Expand Up @@ -1460,6 +1465,8 @@ impl DbArgs {
DbCommands::Oximeter(OximeterArgs {
command: OximeterCommands::ListProducers
}) => cmd_db_oximeter_list_producers(&datastore, fetch_opts).await,

DbCommands::Webhook(args) => cmd_db_webhook(&opctx, &datastore, &fetch_opts, &args).await,
DbCommands::Zpool(ZpoolArgs {
command: ZpoolCommands::List(args)
}) => cmd_db_zpool_list(&opctx, &datastore, &args).await,
Expand Down
Loading
Loading