Skip to content

Commit 28532e6

Browse files
authored
[omdb] add initial webhook receiver OMDB commands (#7808)
As a follow-up from #7277, this commit adds some OMDB commands for querying and displaying the status of webhook receivers, webhook deliveries, and webhook events.
1 parent ca9abfd commit 28532e6

File tree

7 files changed

+1173
-1
lines changed

7 files changed

+1173
-1
lines changed

dev-tools/omdb/src/bin/omdb/db.rs

+7
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,11 @@ use std::sync::Arc;
168168
use strum::IntoEnumIterator;
169169
use tabled::Tabled;
170170
use uuid::Uuid;
171+
use webhook::WebhookArgs;
172+
use webhook::cmd_db_webhook;
171173

172174
mod saga;
175+
mod webhook;
173176

174177
const NO_ACTIVE_PROPOLIS_MSG: &str = "<no active Propolis>";
175178
const NOT_ON_SLED_MSG: &str = "<not on any sled>";
@@ -383,6 +386,8 @@ enum DbCommands {
383386
Vmms(VmmListArgs),
384387
/// Print information about the oximeter collector.
385388
Oximeter(OximeterArgs),
389+
/// Print information about webhooks
390+
Webhook(WebhookArgs),
386391
/// Commands for querying and interacting with pools
387392
Zpool(ZpoolArgs),
388393
}
@@ -1460,6 +1465,8 @@ impl DbArgs {
14601465
DbCommands::Oximeter(OximeterArgs {
14611466
command: OximeterCommands::ListProducers
14621467
}) => cmd_db_oximeter_list_producers(&datastore, fetch_opts).await,
1468+
1469+
DbCommands::Webhook(args) => cmd_db_webhook(&opctx, &datastore, &fetch_opts, &args).await,
14631470
DbCommands::Zpool(ZpoolArgs {
14641471
command: ZpoolCommands::List(args)
14651472
}) => cmd_db_zpool_list(&opctx, &datastore, &args).await,

0 commit comments

Comments
 (0)