Make spacetime list <identity> CLI command also show db_names associated with database #1072
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.
Description of Changes
#1046 Mentions a need to see the database name when listing databases for an identity. I agree with this being useful so here is an implementation supporting that. There may be better ways that the StDB team could do this, but here is what I use locally when developing if I want to easily get a database name.
Updated the
spacetime list <identity>
to also display adb_name
column in the response. Thisdb_name
column is populated by making a request to the/database/reverse_dns/<db_address>
endpoint for each db_address returned for the identity.API and ABI breaking changes
N/A ?
Expected complexity level and risk
I believe the complexity and risk of this change to be a 1/5.
Testing
I tested this by making multiple databases, then running the
spacetime list <identity>
command. This should show a response in the CLI as a table with two columns:db_name
anddb_address
. You can verify the db_address' all match the db_names via spacetime profile dashboard, as well as by creating new databases, and renaming databases. After that, the command should reflect new database names correctly, as well as updated database names.Test 1
spacetime list <identity>
commandspacetime dns reverse_lookup <address>
command that they matchTest 2
spacetime list <identity>
commandspacetime dns reverse_lookup <address>
command that they matchspacetime list <identity>
command