cli: add tunnel_endpoint to user list output#3588
Open
juan-malbeclabs wants to merge 7 commits intomainfrom
Open
cli: add tunnel_endpoint to user list output#3588juan-malbeclabs wants to merge 7 commits intomainfrom
juan-malbeclabs wants to merge 7 commits intomainfrom
Conversation
Users created via `user create` store 0.0.0.0 as a sentinel meaning "use device.public_ip". Only users created via `connect ibrl` have the endpoint resolved explicitly by select_tunnel_endpoint.
9a149d5 to
9f2ae83
Compare
…t IP The activator resolves the 0.0.0.0 sentinel to la2-dz01's public IP (207.45.216.134) during activation and writes it back to the onchain account, so the CLI shows the resolved IP. The previous revert was incorrect.
The activator resolves 0.0.0.0 to the device's public IP in stateful mode, but passes it through unchanged in stateless (onchain allocation) mode. Hardcoding either value causes failures depending on the env. Capture tunnel_endpoint via parseIBRLTunnelInfo and use it as a template variable, matching the existing pattern for tunnel_id and tunnel_net.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of Changes
tunnel_endpointfield toUserDisplayindoublezero user list, exposing it in both table and JSON (--json) outputDiff Breakdown
Minimal change: one new field surfaced in the CLI, test fixtures updated to match.
Key files (click to expand)
smartcontract/cli/src/user/list.rs-- addstunnel_endpoint: Ipv4AddrtoUserDisplayand maps it fromuser.tunnel_endpointTesting Verification
user::listupdated and passing (table and JSON output assertions cover the new column)tunnel_endpointcolumn (0.0.0.0for users with no explicit endpoint set)