Skip to content

docs(smd): document iface add and delete in ochami-smd(1) - #217

Closed
anyingiit wants to merge 1 commit into
OpenCHAMI:mainfrom
anyingiit:docs-smd-iface-man
Closed

anyingiit wants to merge 1 commit into
OpenCHAMI:mainfrom
anyingiit:docs-smd-iface-man

Conversation

@anyingiit

Copy link
Copy Markdown
Contributor

Requested by winshyon · project thread

Fixes #206

This adds add and delete entries to the iface section of man/ochami-smd.1.sc, which until now covered only get. The new entries follow the existing compep and rfe sections.

  • add describes:
    • the positional form comp_id mac_addr net_name,ip_addr;
    • the -d data, -d @path and -d @- forms;
    • the -D/--description option, including its default and that it cannot be combined with -d;
    • the -f/--format-input option.
  • delete describes:

make man builds cleanly with scdoc 1.11, and the generated ochami-smd.1 now lists add, delete and get under iface.

Possible follow-up for iface add

While checking the positional form of iface add against the code, I noticed two things:

  • The Use string and --help say "one or more pairs of network name and IP address", and one of the examples passes two pairs. PreRunE, however, requires exactly 3 arguments (len(args) != 3), so ochami smd iface add x3000c1s7b55n0 de:ca:fc:0f:fe:ee external,10.1.0.55 internal,172.16.0.55 fails with expected -d or >= 3 arguments ..., got 4.
  • A network argument without a comma, such as ... de:ca:fc:0f:fe:ee external, panics with index out of range [1] with length 1 at cmd/smd/iface/add.go:92.

The man page above documents what the command does today, which is a single net_name,ip_addr pair. I'm happy to open a separate fix if you'd like add to accept multiple pairs as its help text says.

The commit is signed off (DCO).

This change was prepared with AI assistance (Claude Code). I reviewed the diff and the generated man page, and I ran the commands above myself.

🤖 Generated with Claude Code

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-22T21:42:19.894058Z 283c5fe PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

The iface section of ochami-smd(1) only described "get". Add entries for
"add" and "delete", following the compep and rfe sections: their forms,
the payload input options, --all and --no-confirm for delete, and the
rule that delete only uses each payload item's ID (blank or path-like IDs
are a usage error, and no ID is derived from MACAddress).

Fixes OpenCHAMI#206

Signed-off-by: anyingiit <49945850+anyingiit@users.noreply.github.com>
@synackd
synackd force-pushed the docs-smd-iface-man branch from 283c5fe to a8c8f3b Compare October 22, 2026 23:02

@synackd synackd left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Commits must have verified GPG/SSH signatures. Please edit your commit.

@synackd

synackd commented Oct 23, 2026

Copy link
Copy Markdown
Collaborator

Apologies, I think the signature might have gotten messed up when I rebased. (Should have known better not to trust GitHub with that...)

@synackd

synackd commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator

This is superseded by #225.

@synackd synackd closed this Oct 28, 2026
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.

[DOCS] ochami-smd(1) documents only smd iface get

2 participants