From a48081f2717f069d456ec09f31d9e639b232dbed Mon Sep 17 00:00:00 2001 From: cloudhead Date: Mon, 26 Feb 2024 14:23:13 +0100 Subject: [PATCH] cli: Move node addresses command To make things a little more consistent, move the `rad self --address` command to `rad node config --addresses`, since it's more about externally-facing configuration of the node, rather than your local user or profile. --- radicle-cli/examples/rad-node.md | 6 ++++++ radicle-cli/examples/rad-self.md | 5 ----- radicle-cli/src/commands/node.rs | 25 +++++++++++++++++++++---- radicle-cli/src/commands/self.rs | 12 ------------ radicle-cli/tests/commands.rs | 12 +++++++++--- 5 files changed, 36 insertions(+), 24 deletions(-) diff --git a/radicle-cli/examples/rad-node.md b/radicle-cli/examples/rad-node.md index fd44566ae..fbb525879 100644 --- a/radicle-cli/examples/rad-node.md +++ b/radicle-cli/examples/rad-node.md @@ -18,6 +18,12 @@ $ rad node status ✓ Node is running and listening on [..]. ``` +``` +$ rad node config --addresses +z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi@41.12.98.112:8776 +z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi@seed.cloudhead.io:8776 +``` + The node also allows us to query data that it has access to such as the follow policies and the routing table. Before we explore those commands we'll first follow a peer so that we have something to diff --git a/radicle-cli/examples/rad-self.md b/radicle-cli/examples/rad-self.md index 6acf3ba9c..a486efc8c 100644 --- a/radicle-cli/examples/rad-self.md +++ b/radicle-cli/examples/rad-self.md @@ -38,8 +38,3 @@ ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHahWSBEpuT1ESZbynOmBNkLBSnR32Ar4woZqSV2YNH1 $ rad self --home [..]/home/alice/.radicle ``` - -``` -$ rad self --address -z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi@seed.alice.acme:8776 -``` diff --git a/radicle-cli/src/commands/node.rs b/radicle-cli/src/commands/node.rs index 341d3a0fc..28ccf69ba 100644 --- a/radicle-cli/src/commands/node.rs +++ b/radicle-cli/src/commands/node.rs @@ -4,6 +4,8 @@ use std::time; use anyhow::anyhow; +use radicle::node::config::ConnectAddress; +use radicle::node::Handle as _; use radicle::node::{Address, Node, NodeId, PeerAddr}; use radicle::prelude::RepoId; @@ -32,7 +34,7 @@ Usage rad node connect @ [