Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ All notable changes to this project will be documented in this file.
- Migrate `location get` to the RFC-20 conforming verb pattern as the project's reference. `GetLocationCliCommand::execute` is now `async fn`, takes `&CliContext` as its first non-self argument, and emits a `tracing::debug!` event so `-v` surfaces what the verb is doing. The verb's user-facing args, flags, table layout, and JSON schema are unchanged. The unit test consumes the shared `doublezero_cli_core::testing::cli_context_default_for_tests()` helper and continues to use the existing `MockCliCommand` (auto-generated by `#[automock]`) as the backend. Binary dispatch arms in `client/doublezero` and `controlplane/doublezero-admin` are updated to `.await` the new method; other location verbs (Create, Update, List, Delete) keep their current sync signatures and migrate opportunistically.
- Add `docs/cli-standard.md`, the contributor-facing summary of RFC-20 with the `location get` worked example and pointers to the shared validators, formatters, logging facade, and test helpers in `doublezero-cli-core`.
- Update `CLAUDE.md` with a CLI-standard section pointing at RFC-20, the contributor doc, and the reference verb so future contributors land on the standard quickly.
- Move the per-resource serviceability subcommand wrapper files (`accesspass`, `config`, `contributor`, `device`, `exchange`, `globalconfig`, `link`, `location`, `multicastgroup`, `permission`, `resource`, `tenant`, `user`) from `client/doublezero/src/cli/` into the module crate at `smartcontract/cli/src/cli/` per RFC-20 §Module contract item 2. Internal imports in the moved files switch from `doublezero_serviceability_cli::<resource>::*` to `crate::<resource>::*`. Binary import paths in `client/doublezero/src/{cli/command.rs,main.rs}` switch to `doublezero_serviceability_cli::cli::<resource>::*`. `cli/multicast.rs` stays in the binary because its `Subscribe`/`Unsubscribe`/`Publish`/`Unpublish` variants are async and depend on binary-local daemon-control infrastructure (`ServiceControllerImpl`, `crate::command::helpers::resolve_client_ip`); the binary now imports `MulticastGroupCliCommand` from the library.
- Introduce `doublezero_serviceability_cli::cli::ServiceabilityCommand`, the module crate's top-level subcommand enum + `async fn execute(ctx, client, out)` dispatcher per RFC-20 §Module contract item 2. Aggregates 17 serviceability variants (`Init`, `Migrate`, `Address`, `Balance`, `Config`, `GlobalConfig`, `Location`, `Exchange`, `Contributor`, `Permission`, `Tenant`, `Device`, `Link`, `AccessPass`, `User`, `Export`, `Keygen`, `Resource`) and owns the full dispatch tree currently inlined in `client/doublezero/src/main.rs`. Defined but not yet wired into the unified binary; the next PR adds `#[command(flatten)] Serviceability(ServiceabilityCommand)` to the binary's `Command` enum and collapses `main.rs` to a single dispatch arm. Binary `Command` enum and `main.rs` dispatch are unchanged; this is pure file relocation.

## [v0.24.0](https://github.com/malbeclabs/doublezero/compare/client/v0.23.0...client/v0.24.0) - 2026-05-22

Expand Down
30 changes: 18 additions & 12 deletions client/doublezero/src/cli/command.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
use super::multicast::MulticastCliCommand;
use crate::{
cli::{
accesspass::AccessPassCliCommand, config::ConfigCliCommand,
contributor::ContributorCliCommand, device::DeviceCliCommand, exchange::ExchangeCliCommand,
geolocation::GeolocationCliCommand, globalconfig::GlobalConfigCliCommand,
link::LinkCliCommand, location::LocationCliCommand, permission::PermissionCliCommand,
resource::ResourceCliCommand, tenant::TenantCliCommand, user::UserCliCommand,
},
cli::{geolocation::GeolocationCliCommand, multicast::MulticastCliCommand},
command::{
connect::ProvisioningCliCommand, disable::DisableCliCommand,
disconnect::DecommissioningCliCommand, enable::EnableCliCommand,
Expand All @@ -16,10 +9,23 @@ use crate::{
use clap::{Args, Subcommand};
use clap_complete::Shell;
use doublezero_serviceability_cli::{
account::GetAccountCliCommand, accounts::GetAccountsCliCommand, address::AddressCliCommand,
balance::BalanceCliCommand, export::ExportCliCommand,
geolocation::programconfig::init::InitProgramConfigCliCommand, init::InitCliCommand,
keygen::KeyGenCliCommand, logcommand::LogCliCommand, migrate::MigrateCliCommand,
account::GetAccountCliCommand,
accounts::GetAccountsCliCommand,
address::AddressCliCommand,
balance::BalanceCliCommand,
cli::{
accesspass::AccessPassCliCommand, config::ConfigCliCommand,
contributor::ContributorCliCommand, device::DeviceCliCommand, exchange::ExchangeCliCommand,
globalconfig::GlobalConfigCliCommand, link::LinkCliCommand, location::LocationCliCommand,
permission::PermissionCliCommand, resource::ResourceCliCommand, tenant::TenantCliCommand,
user::UserCliCommand,
},
export::ExportCliCommand,
geolocation::programconfig::init::InitProgramConfigCliCommand,
init::InitCliCommand,
keygen::KeyGenCliCommand,
logcommand::LogCliCommand,
migrate::MigrateCliCommand,
};

#[derive(Subcommand, Debug)]
Expand Down
13 changes: 0 additions & 13 deletions client/doublezero/src/cli/mod.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
pub mod accesspass;
pub mod command;
pub mod config;
pub mod contributor;
pub mod device;
pub mod exchange;
pub mod geolocation;
pub mod globalconfig;
pub mod link;
pub mod location;
pub mod multicast;
pub mod multicastgroup;
pub mod permission;
pub mod resource;
pub mod tenant;
pub mod user;
2 changes: 1 addition & 1 deletion client/doublezero/src/cli/multicast.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use clap::{Args, Subcommand};

use super::multicastgroup::MulticastGroupCliCommand;
use doublezero_serviceability_cli::cli::multicastgroup::MulticastGroupCliCommand;

#[derive(Args, Debug)]
pub struct MulticastCliCommand {
Expand Down
Loading
Loading