Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

[docs] Update cleos net commands and net plugin description #10360

Merged
merged 6 commits into from
May 18, 2021

Conversation

lparisc
Copy link
Contributor

@lparisc lparisc commented May 14, 2021

Change Description

Resolves devrel-1468 - update cleos net command reference with template
Resolves devrel-1080 (#9868) - cleos net peers refers to cleos net status instead

Change Type

Select ONE:

  • Documentation
  • Stability bug fix
  • Other
  • Other - special case

Testing Changes

Select ANY that apply:

  • New Tests
  • Existing Tests
  • Test Framework
  • CI System
  • Other

Consensus Changes

  • Consensus Changes

API Changes

  • API Changes

Documentation Additions

  • Documentation Additions

@lparisc lparisc assigned lparisc and unassigned lparisc May 14, 2021
Copy link
Contributor

@halsaphi halsaphi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the net_api_plugin description change:

I think you have added the sentence in the wrong place. It should come after describing what the net plugin api is. The emphasis is now on the ability of bp's to manage their connections rather than what it is / does.

Also is it only for producing nodes?

## Description
Start a new connection to a peer
Start a new connection to a specified peer. This command allows an operator's node to connect to another peer without restarting the node.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

passive?

This command allows an operator's node to connect to another peer without restarting the node.

to

Use this command to

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i.e. Use this command to connect to a peer without restarting the node.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Point taken, but I want to highlight the fact that this command is particularly useful for node operators. "Use this command" for a generic user won't stress this fact. Therefore, to achieve this and make it active voice I changed to: "A node operator can use this command..."

## Examples
The following examples demonstrate how to use the `cleos net connect` command:

* Instruct default local node (listening at default http address `http://127.0.0.1:8888`) to connect to peer node listening at p2p address `localhost:9022`:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the examples be numbered rather than bulleted?

Copy link
Contributor Author

@lparisc lparisc May 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought bullets were used when sequence doesn't matter - the case in point. If we want to identify the examples, then I think we should create explicit subtitles; e.g. Example 1, Example 2, etc. because numbered bullets in a list are used for a different purpose. @bobgt ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good scenario.

If we use numbered list here, it may give a quick illusion that it's a procedure. So numbered list won't be a good fit.

If we go with bullets, it's not inappropriate but the 2 examples are not standing out clearly.

I would go with the explicit subtitles, L3 Headers:

Example 1

Instruct default local node (listening at default http address http://127.0.0.1:8888) to connect to peer node listening at p2p address localhost:9022:

cleos net connect localhost:9022

Output:

"added connection"

Example 2

I will consult with Virginia and update the Command Reference template. Thanks for flagging this!

## Description
close an existing connection
Close an existing connection to a specified peer. This command allows an operator's node to disconnect from another peer without restarting the node.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agin should this be Use this command to ....

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to: "A node operator can use this command..."

## Examples
The following examples demonstrate how to use the `cleos net disconnect` command:

* Instruct default local node (listening at default http address `http://127.0.0.1:8888`) to disconnect from peer node listening at p2p address `localhost:9022`:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Numbers vs Bullets?

## Description
status of all existing peers
Returns a list with the status of all peer connections. This command allows a node operator to check the status of a node's peer connections.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be Use this command to ....

## Examples
The following examples demonstrate how to use the `cleos net peers` command:

* List the status of all peer connections for a local node listening at http address `http://127.0.0.1:8001`:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bullets vs numbering

## Description
status of existing connection
Returns the status of a connected peer. This command allows a node operator to check the status of a node's connected peer.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use this command to ...


* List the status of a connected peer listening at p2p address `localhost:9001` for a local node listening at http address `http://127.0.0.1:8002`:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bullet vs numbering

```
**Output**
### Positionals
* `host` _TEXT_ REQUIRED - The hostname:port to query status of connection.
Copy link
Contributor

@halsaphi halsaphi May 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full stop at end ... template indicate this list doesn't have them

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed trailing period. Indeed, parameter descriptions will mainly consist of non-full sentences, so a trailing period is not needed. But if these were full sentences, a period is required.

The following information shows the different positionals and options you can use with the `cleos net connect` command:

### Positionals
* `host` _TEXT_ REQUIRED - The hostname:port to connect to.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full stop at end ... template indicate this list doesn't have them

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.

The following information shows the different positionals and options you can use with the `cleos net disconnect` command:

### Positionals
* `host` _TEXT_ REQUIRED - The hostname:port to disconnect from.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full stop at end ... template indicate this list doesn't have them

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.

* `host` _TEXT_ REQUIRED - The hostname:port to disconnect from.

### Options
* `-h,--help` - Print this help message and exit.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full stop at end ... template indicate this list doesn't have them

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.

* `host` _TEXT_ REQUIRED - The hostname:port to connect to.

### Options
* `-h,--help` - Print this help message and exit.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full stop at end ... template indicate this list doesn't have them

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.


**Command**
### Positionals
* `host` _TEXT_ REQUIRED - The hostname:port to disconnect from.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full stop at end ... template indicate this list doesn't have them

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.

* `host` _TEXT_ REQUIRED - The hostname:port to disconnect from.

### Options
* `-h,--help` - Print this help message and exit.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full stop at end ... template indicate this list doesn't have them

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.

```console
Usage: cleos net status host
### Options
* `-h,--help` - Print this help message and exit.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full stop at end ... template indicate this list doesn't have them

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.

@lparisc
Copy link
Contributor Author

lparisc commented May 14, 2021

For the net_api_plugin description change:

I think you have added the sentence in the wrong place. It should come after describing what the net plugin api is. The emphasis is now on the ability of bp's to manage their connections rather than what it is / does.

Also is it only for producing nodes?

Point taken. I swapped the order of the sentences. Also removed "producing" since the net api can also be used on non-producing nodes.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants