Skip to content

Commit 196b6b1

Browse files
authored
hardware-cosmo#601 swadm compliance subcommand (#48)
* Add compliance subcommand Adds "swadm compliance links <action> <pattern>" command, for more user-friendly manipulation of links (listing, enabling and disabling). Signed-off-by: Trey Aspelund <trey@oxidecomputer.com> * compliance: make pattern optional, default to all Signed-off-by: Trey Aspelund <trey@oxidecomputer.com> * compliance: use up/down instead of on/off Signed-off-by: Trey Aspelund <trey@oxidecomputer.com> * compliance: improve help/error text Signed-off-by: Trey Aspelund <trey@oxidecomputer.com> * compliance: move to using enums and improve help/error text Signed-off-by: Trey Aspelund <trey@oxidecomputer.com> * compliance: make clippy happy Signed-off-by: Trey Aspelund <trey@oxidecomputer.com> * compliance: add on/off aliases Signed-off-by: Trey Aspelund <trey@oxidecomputer.com> * compliance: update help text Signed-off-by: Trey Aspelund <trey@oxidecomputer.com> * compliance: make cargo fmt happy Signed-off-by: Trey Aspelund <trey@oxidecomputer.com> * compliance: add setup subcommand Signed-off-by: Trey Aspelund <trey@oxidecomputer.com> * compliance: simplify filter logic, default to qsfp only Signed-off-by: Trey Aspelund <trey@oxidecomputer.com> * compliance: fix typo in comment Signed-off-by: Trey Aspelund <trey@oxidecomputer.com> * compliance: add teardown cmd, kr flag, make fec an Option Signed-off-by: Trey Aspelund <trey@oxidecomputer.com> * compliance: add pattern to setup/teardown cmds Signed-off-by: Trey Aspelund <trey@oxidecomputer.com> * compliance: add power handling, rename links to ports Renames "links" to "ports" since the power handling is done per port. "swadm compliance ports" now has a power subcommand which puts a port into manual management mode (optionally deleting all links for a port) and sets the transceiver power high/low/off. Signed-off-by: Trey Aspelund <trey@oxidecomputer.com> * compliance: fix clap parser crash ``` BRM42220023-switch # swadm compliance ports power --help thread 'main' panicked at /home/trey/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/clap-2.34.0/src/app/parser.rs:636:21: Found positional argument which is not required with a lower index than a required positional argument: "pattern" index 1 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace Abort (core dumped) ``` Signed-off-by: Trey Aspelund <trey@oxidecomputer.com> * compliance: add power column to ls Signed-off-by: Trey Aspelund <trey@oxidecomputer.com> * compliance: tweak output of ls Signed-off-by: Trey Aspelund <trey@oxidecomputer.com> * compliance: make clippy happy again Signed-off-by: Trey Aspelund <trey@oxidecomputer.com> * compliance: small cleanup Signed-off-by: Trey Aspelund <trey@oxidecomputer.com> --------- Signed-off-by: Trey Aspelund <trey@oxidecomputer.com>
1 parent 50856e3 commit 196b6b1

File tree

2 files changed

+611
-0
lines changed

2 files changed

+611
-0
lines changed

0 commit comments

Comments
 (0)