Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Netplan docs rework (Part 2) #337

Merged
merged 3 commits into from
Apr 3, 2023
Merged

Conversation

daniloegea
Copy link
Collaborator

@daniloegea daniloegea commented Mar 28, 2023

Description

Adding man pages for all the commands.

Improving the network types descriptions a little.

Follow-up for #333

Checklist

  • Runs make check successfully.
  • Retains 100% code coverage (make check-coverage).
  • New/changed keys in YAML format are documented.
  • (Optional) Adds example YAML for new feature.
  • (Optional) Closes an open bug in Launchpad.

Add manpages for the commands "info", "ip", "rebind" and "status".
The list of network keys are indexing their respective sections.

Each section was expanded with a short description and explanation about
the network type with a small example.
@daniloegea daniloegea requested a review from slyon March 28, 2023 13:12
Copy link
Collaborator

@slyon slyon left a comment

Choose a reason for hiding this comment

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

Thank you! +1

Just a few wording & formatting refinements inline, which I'll fix myself before merging.

doc/cli.md Outdated
Comment on lines 30 to 31
| [info](/netplan-info) | Show available features |
| [ip](/netplan-ip) | Retrieve IP information from the system |
Copy link
Collaborator

Choose a reason for hiding this comment

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

"ip" and "info" seem to be duplicated in the index. We should drop the two entries above.


**Purpose**: Use the `ethernets` key to configure Ethernet interfaces.

**Structure**: The key consists of a mapping of interface names. Each `ethernet` has a number of configuration options. You don't need to define each interface by their names inside the `ethernets` mapping. You can use any name that describes the interface and match the actual network card using the `match` key. The general configuration structure for ethernets is shown below.
Copy link
Collaborator

Choose a reason for hiding this comment

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

It's not necessarily interface names, but can be generic IDs (if combined with a match stanza)

maybe use "IDs" instead of "interface names"


**Purpose**: Use the `modems` key to configure Modems. GSM/CDMA modem configuration is only supported for the `NetworkManager` backend. `systemd-networkd` does not support modems.

**Structure**: The key consists of a mapping of modem names. Each `modem` has a number of configuration options. The general configuration structure for modems is shown below.
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe replace "modem names" by "modem IDs"


**Purpose**: Use the `tunnels` key to create different virtual tunnel interfaces.

**Structure**: The key consists of a mapping of tunnel names. Each `tunnel` requires the identification of the tunnel mode (see the section `mode` below for the list of supported modes). The general configuration structure for bridges is shown below.
Copy link
Collaborator

Choose a reason for hiding this comment

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

"tunnel names" -> "tunnel interfaces"

"for bridges" -> "for tunnels"


**Purpose**: Use the `vlans` key to create VLAN interfaces.

**Structure**: The key consists of a mapping of VLAN names. The interface used in the `link` option (`enp5s0` in the example below) must also be defined in the Netplan configuration. The general configuration structure for bridges is shown below.
Copy link
Collaborator

Choose a reason for hiding this comment

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

"VLAN names" -> "VLAN interfaces"

"for bridges" -> "for vlans"

The `nm-devices` device type is for internal use only and should not be used in
**Status**: Optional. Its use is not recommended.

**Purpose**: Use the `nm-devices` key to configure device types that are not supported by Netplan. This is Network Manager (NM) specific configuration.
Copy link
Collaborator

Choose a reason for hiding this comment

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

"Network Manager (NM)" -> "NetworkManager"


## NAME

netplan-ip - retrieve IP information from the system
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
netplan-ip - retrieve IP information from the system
netplan-ip - retrieve IP information (like DHCP leases) from the system

Also below.


## DHCP COMMANDS

**leases** `INTERFACE`: Displays IP leases
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
**leases** `INTERFACE`: Displays IP leases
**leases** `INTERFACE`: Displays DHCP IP leases


## DESCRIPTION

**netplan rebind [netdevs]** rebinds SR-IOV virtual functions of given physical functions to their driver.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
**netplan rebind [netdevs]** rebinds SR-IOV virtual functions of given physical functions to their driver.
**netplan rebind [interfaces]** rebinds SR-IOV virtual functions of given physical functions to their driver.

Also below & above.

@slyon slyon changed the title Docs fixes part2 Netplan docs rework (Part 2) Apr 3, 2023
@slyon slyon merged commit 6231cf3 into canonical:main Apr 3, 2023
daniloegea added a commit that referenced this pull request May 17, 2023
Adding man pages for all the commands.

Improving the network types descriptions a little.

Follow-up for #333

COMMITS:
* docs: add missing manpages

Add manpages for the commands "info", "ip", "rebind" and "status".

* docs: improve the Netplan reference

The list of network keys are indexing their respective sections.

Each section was expanded with a short description and explanation about
the network type with a small example.

* doc: refine wording & formatting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants