mirror of
https://github.com/linux-system-roles/network.git
synced 2026-01-23 02:15:17 +00:00
ci: Check spelling with codespell
* You can ignore words inline by adding a comment like `# codespell:ignore word`. * You can ignore words by adding them to the `.codespell_ignores` file. * You can ignore files and directories by adding them with `skip = ` to the `.codespellrc` file. Signed-off-by: Sergei Petrosian <spetrosi@redhat.com>
This commit is contained in:
parent
1b57520aa9
commit
62d3bdc110
12 changed files with 64 additions and 38 deletions
1
.codespell_ignores
Normal file
1
.codespell_ignores
Normal file
|
|
@ -0,0 +1 @@
|
|||
iif
|
||||
8
.codespellrc
Normal file
8
.codespellrc
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
[codespell]
|
||||
check-hidden = true
|
||||
# Note that `-w` doesn't work when ignore-multiline-regex is set
|
||||
# https://github.com/codespell-project/codespell/issues/3642
|
||||
ignore-multiline-regex = codespell:ignore-begin.*codespell:ignore-end
|
||||
ignore-words = .codespell_ignores
|
||||
# skip-file is not available https://github.com/codespell-project/codespell/pull/2759
|
||||
skip = .pandoc_template.html5,.README.html,./tests/files/client.key.nocrypt,./tests/files/client.pem
|
||||
17
.github/workflows/codespell.yml
vendored
Normal file
17
.github/workflows/codespell.yml
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
# Codespell configuration is within .codespellrc
|
||||
---
|
||||
name: Codespell
|
||||
on: # yamllint disable-line rule:truthy
|
||||
- pull_request
|
||||
permissions:
|
||||
contents: read
|
||||
jobs:
|
||||
codespell:
|
||||
name: Check for spelling errors
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Codespell
|
||||
uses: codespell-project/actions-codespell@v2
|
||||
2
.github/workflows/tft_citest_bad.yml
vendored
2
.github/workflows/tft_citest_bad.yml
vendored
|
|
@ -36,7 +36,7 @@ jobs:
|
|||
RUN_ID=$(gh api "repos/$REPO/actions/workflows/tft.yml/runs?event=issue_comment" \
|
||||
| jq -r "[.workflow_runs[] | select( .display_title == \"$PR_TITLE\" ) | select( .conclusion == \"failure\" ) | .id][0]")
|
||||
if [ "$RUN_ID" = "null" ]; then
|
||||
echo "Failed workflow not found, exitting"
|
||||
echo "Failed workflow not found, exiting"
|
||||
exit 1
|
||||
fi
|
||||
echo "Re-running workflow $RUN_ID"
|
||||
|
|
|
|||
58
README.md
58
README.md
|
|
@ -1,6 +1,6 @@
|
|||
# linux-system-roles/network
|
||||
|
||||
[](https://github.com/linux-system-roles/network/actions/workflows/ansible-lint.yml) [](https://github.com/linux-system-roles/network/actions/workflows/ansible-test.yml) [](https://github.com/linux-system-roles/network/actions/workflows/codeql.yml) [](https://github.com/linux-system-roles/network/actions/workflows/integration.yml) [](https://github.com/linux-system-roles/network/actions/workflows/markdownlint.yml) [](https://github.com/linux-system-roles/network/actions/workflows/python-unit-test.yml) [](https://github.com/linux-system-roles/network/actions/workflows/shellcheck.yml) [](https://github.com/linux-system-roles/network/actions/workflows/tft.yml) [](https://github.com/linux-system-roles/network/actions/workflows/tft_citest_bad.yml) [](https://github.com/linux-system-roles/network/actions/workflows/woke.yml) [](https://coveralls.io/github/linux-system-roles/network) [](https://github.com/ambv/black) [](https://lgtm.com/projects/g/linux-system-roles/network/context:python)
|
||||
[](https://github.com/linux-system-roles/network/actions/workflows/ansible-lint.yml) [](https://github.com/linux-system-roles/network/actions/workflows/ansible-test.yml) [](https://github.com/linux-system-roles/network/actions/workflows/codeql.yml) [](https://github.com/linux-system-roles/network/actions/workflows/codespell.yml) [](https://github.com/linux-system-roles/network/actions/workflows/integration.yml) [](https://github.com/linux-system-roles/network/actions/workflows/markdownlint.yml) [](https://github.com/linux-system-roles/network/actions/workflows/python-unit-test.yml) [](https://github.com/linux-system-roles/network/actions/workflows/shellcheck.yml) [](https://github.com/linux-system-roles/network/actions/workflows/tft.yml) [](https://github.com/linux-system-roles/network/actions/workflows/tft_citest_bad.yml) [](https://github.com/linux-system-roles/network/actions/workflows/woke.yml) [](https://coveralls.io/github/linux-system-roles/network) [](https://github.com/ambv/black) [](https://lgtm.com/projects/g/linux-system-roles/network/context:python)
|
||||
|
||||
## Overview
|
||||
|
||||
|
|
@ -480,7 +480,7 @@ In general these work like shell globs.
|
|||
|
||||
- `*`, matches zero or more of any character
|
||||
- `?`, matches any single character
|
||||
- `[fo]` - matches any single `f` or `o` character - also supports ranges - `[0-9]`
|
||||
- `[fo]` - matches any single `f` or `o` character - also supports ranges - `[0-9]` <!-- codespell:ignore fo -->
|
||||
will match any single digit character
|
||||
|
||||
### `path`
|
||||
|
|
@ -788,31 +788,31 @@ The ethtool configuration supports the following options:
|
|||
coalesce:
|
||||
adaptive_rx: true|false # optional
|
||||
adaptive_tx: true|false # optional
|
||||
pkt_rate_high: 0 # optional mininum=0 maximum=0xffffffff
|
||||
pkt_rate_low: 0 # optional mininum=0 maximum=0xffffffff
|
||||
rx_frames: 0 # optional mininum=0 maximum=0xffffffff
|
||||
rx_frames_high: 0 # optional mininum=0 maximum=0xffffffff
|
||||
rx_frames_irq: 0 # optional mininum=0 maximum=0xffffffff
|
||||
rx_frames_low: 0 # optional mininum=0 maximum=0xffffffff
|
||||
rx_usecs: 0 # optional mininum=0 maximum=0xffffffff
|
||||
rx_usecs_high: 0 # optional mininum=0 maximum=0xffffffff
|
||||
rx_usecs_irq: 0 # optional mininum=0 maximum=0xffffffff
|
||||
rx_usecs_low: 0 # optional mininum=0 maximum=0xffffffff
|
||||
sample_interval: 0 # optional mininum=0 maximum=0xffffffff
|
||||
stats_block_usecs: 0 # optional mininum=0 maximum=0xffffffff
|
||||
tx_frames: 0 # optional mininum=0 maximum=0xffffffff
|
||||
tx_frames_high: 0 # optional mininum=0 maximum=0xffffffff
|
||||
tx_frames_irq: 0 # optional mininum=0 maximum=0xffffffff
|
||||
tx_frames_low: 0 # optional mininum=0 maximum=0xffffffff
|
||||
tx_usecs: 0 # optional mininum=0 maximum=0xffffffff
|
||||
tx_usecs_high: 0 # optional mininum=0 maximum=0xffffffff
|
||||
tx_usecs_irq: 0 # optional mininum=0 maximum=0xffffffff
|
||||
tx_usecs_low: 0 # optional mininum=0 maximum=0xffffffff
|
||||
pkt_rate_high: 0 # optional minimum=0 maximum=0xffffffff
|
||||
pkt_rate_low: 0 # optional minimum=0 maximum=0xffffffff
|
||||
rx_frames: 0 # optional minimum=0 maximum=0xffffffff
|
||||
rx_frames_high: 0 # optional minimum=0 maximum=0xffffffff
|
||||
rx_frames_irq: 0 # optional minimum=0 maximum=0xffffffff
|
||||
rx_frames_low: 0 # optional minimum=0 maximum=0xffffffff
|
||||
rx_usecs: 0 # optional minimum=0 maximum=0xffffffff
|
||||
rx_usecs_high: 0 # optional minimum=0 maximum=0xffffffff
|
||||
rx_usecs_irq: 0 # optional minimum=0 maximum=0xffffffff
|
||||
rx_usecs_low: 0 # optional minimum=0 maximum=0xffffffff
|
||||
sample_interval: 0 # optional minimum=0 maximum=0xffffffff
|
||||
stats_block_usecs: 0 # optional minimum=0 maximum=0xffffffff
|
||||
tx_frames: 0 # optional minimum=0 maximum=0xffffffff
|
||||
tx_frames_high: 0 # optional minimum=0 maximum=0xffffffff
|
||||
tx_frames_irq: 0 # optional minimum=0 maximum=0xffffffff
|
||||
tx_frames_low: 0 # optional minimum=0 maximum=0xffffffff
|
||||
tx_usecs: 0 # optional minimum=0 maximum=0xffffffff
|
||||
tx_usecs_high: 0 # optional minimum=0 maximum=0xffffffff
|
||||
tx_usecs_irq: 0 # optional minimum=0 maximum=0xffffffff
|
||||
tx_usecs_low: 0 # optional minimum=0 maximum=0xffffffff
|
||||
ring:
|
||||
rx: 0 # optional mininum=0 maximum=0xffffffff
|
||||
rx_jumbo: 0 # optional mininum=0 maximum=0xffffffff
|
||||
rx_mini: 0 # optional mininum=0 maximum=0xffffffff
|
||||
tx: 0 # optional mininum=0 maximum=0xffffffff
|
||||
rx: 0 # optional minimum=0 maximum=0xffffffff
|
||||
rx_jumbo: 0 # optional minimum=0 maximum=0xffffffff
|
||||
rx_mini: 0 # optional minimum=0 maximum=0xffffffff
|
||||
tx: 0 # optional minimum=0 maximum=0xffffffff
|
||||
```
|
||||
|
||||
### `ieee802_1x`
|
||||
|
|
@ -959,7 +959,7 @@ following options:
|
|||
|
||||
- `lacp_rate`
|
||||
|
||||
In `802.3ad` bonding mode, this option defines the rate in which we requst link
|
||||
In `802.3ad` bonding mode, this option defines the rate in which we request link
|
||||
partner to transmit LACPDU packets. The possible values are: `slow`, `fast`.
|
||||
|
||||
- `lp_interval`
|
||||
|
|
@ -978,7 +978,7 @@ following options:
|
|||
|
||||
- `num_grat_arp`
|
||||
|
||||
This option specify the number of peer notifications (gratuitious ARPs) to be
|
||||
This option specify the number of peer notifications (gratuitous ARPs) to be
|
||||
issued after a failover event. The allowed range for the value is 0 - 255.
|
||||
|
||||
- `packets_per_port`
|
||||
|
|
@ -1464,7 +1464,7 @@ role treats like RHEL, such as AlmaLinux, CentOS, OracleLinux, Rocky.
|
|||
As Ansible usually works via the network, for example via SSH, there are some
|
||||
limitations to be considered:
|
||||
|
||||
The `network` role does not support bootstraping networking configuration. One option
|
||||
The `network` role does not support bootstrapping networking configuration. One option
|
||||
may be
|
||||
[ansible-pull](https://docs.ansible.com/ansible/latest/cli/ansible-pull.html).
|
||||
Another option maybe be to initially auto-configure the host during installation (ISO
|
||||
|
|
|
|||
|
|
@ -306,7 +306,7 @@ class IfcfgUtil:
|
|||
return value
|
||||
|
||||
if any(ord(c) < ord(" ") for c in value):
|
||||
# needs ansic escaping due to ANSI control caracters (newline)
|
||||
# needs ansic escaping due to ANSI control characters (newline)
|
||||
s = "$'"
|
||||
for c in value:
|
||||
if ord(c) < ord(c):
|
||||
|
|
@ -2194,7 +2194,7 @@ class Cmd(object):
|
|||
"""Hook before making changes"""
|
||||
|
||||
def finish_transaction(self):
|
||||
"""Hook for after all changes where made successfuly"""
|
||||
"""Hook for after all changes where made successfully"""
|
||||
|
||||
def rollback_transaction(self, idx, action, error):
|
||||
"""Hook if configuring a profile results in an error
|
||||
|
|
|
|||
|
|
@ -2012,7 +2012,7 @@ class ArgValidator_DictConnection(ArgValidatorDict):
|
|||
# If there are no runtime changes, "wait" and "force_state_change" do
|
||||
# not make sense
|
||||
# FIXME: Maybe this restriction can be removed. Need to make sure that
|
||||
# defaults for wait or force_state_change do not interfer
|
||||
# defaults for wait or force_state_change do not interfere
|
||||
if not state:
|
||||
while "wait" in valid_fields:
|
||||
valid_fields.remove("wait")
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ class _NmMainLoop(object):
|
|||
self._mainloop = None
|
||||
|
||||
def quit(self):
|
||||
logging.debug("NM mainloop quiting")
|
||||
logging.debug("NM mainloop quitting")
|
||||
self._mainloop.quit()
|
||||
self._clean_up()
|
||||
|
||||
|
|
|
|||
2
pylintrc
2
pylintrc
|
|
@ -52,7 +52,7 @@ confidence=
|
|||
# can either give multiple identifiers separated by comma (,) or put this
|
||||
# option multiple times (only on the command line, not in the configuration
|
||||
# file where it should appear only once).You can also use "--disable=all" to
|
||||
# disable everything first and then reenable specific checks. For example, if
|
||||
# disable everything first and then re-enable specific checks. For example, if
|
||||
# you want to run only the similarities checker, you can use "--disable=all
|
||||
# --enable=similarities". If you want to run only the classes checker, but have
|
||||
# no Warning level messages displayed, use"--disable=all --enable=classes
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ def parse_validator(validator):
|
|||
if not validator.required:
|
||||
comment += " optional"
|
||||
if minval is not None:
|
||||
comment += " mininum=" + str(minval)
|
||||
comment += " minimum=" + str(minval)
|
||||
if maxval:
|
||||
if maxval == 0xFFFFFFFF:
|
||||
maxval = hex(maxval)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# This test is supposed to check that checkpoints are properly cleaned-up after
|
||||
# failures in the module. This test currently uses the initscripts provider to
|
||||
# mark a device as unmanaged for NM and then tries to activiate it using NM.
|
||||
# mark a device as unmanaged for NM and then tries to activate it using NM.
|
||||
# This failed without removing the checkpoint.
|
||||
---
|
||||
- name: Play for testing checkpoint cleanup
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
changed_when: false
|
||||
- name: Set up veth as managed by NetworkManager
|
||||
command: nmcli d set {{ interface }} managed true
|
||||
# The varible for `network_provider` is not exists yet,
|
||||
# The variable for `network_provider` is not exists yet,
|
||||
# just ignore error for initscripts
|
||||
ignore_errors: true # noqa ignore-errors
|
||||
when: "type == 'veth' and state == 'present'"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue