feat(smd): add list alias to rfe and component get commands - #121
feat(smd): add list alias to rfe and component get commands#121TheSabari07 wants to merge 1 commit into
Conversation
|
|
||
| *get* [-F _format_] [--nid _nid_] [--xname _xname_] | ||
| Get all components or one identified by xname or node ID. | ||
| Get all components or one identified by xname or node ID. Note: `list` is an available alias for this command. |
There was a problem hiding this comment.
@synackd Is this how you want to specify aliases in the man page documentation or do you have another way?
There was a problem hiding this comment.
We'll want the aliases to be discoverable, so they should be near the top of the command section. I'm thinking we do it like this:
*get* [-F _format_] [--nid _nid_] [--xname _xname_]
Aliases: *list*
Get all components or one identified by xname or node ID.
This seems idiomatic with manual pages of some other popular projects I've come across.
|
One thing that stood out at a glance is that this only covers |
|
Yes, we'll want to implement this for all commands that have a |
|
Thanks for the feedback, @synackd and @davidallendj! Just to confirm, can I start implementing the man page formatting as suggested and add the list alias to all get subcommands across the entire CLI? |
|
Yes. All service commands with a |
Okay @synackd, |
f61e33d to
505c4d9
Compare
|
Hi @synackd and @davidallendj, First, I'm really sorry for the late reply! I haven't been feeling well for the past few days. I've just pushed the updates.
Please review at your convenience and let me know if any changes are needed. |
synackd
left a comment
There was a problem hiding this comment.
The boot and metadata commands' resources already have a list command, so we shouldn't add a list alias to their get commands (they are different commands). We should only add them to bss, smd, and cloud-init.
Signed-off-by: Sabari07 <sabursd18@gmail.com>
505c4d9 to
e8b5298
Compare
|
@synackd! Thank you for pointing that out. The list alias is now correctly scoped to just smd, bss, and cloud-init. |
synackd
left a comment
There was a problem hiding this comment.
Much better, thank you.
Just a small change requested (and a requested change I missed) and we should be good to go.
There was a problem hiding this comment.
Can we revert the changes in this file? They are inconsistent with ochami-metadata.1.sc and are out-of-scope for this PR.
There was a problem hiding this comment.
I just realized that there's no iface command documentation in here! Could you add it in this PR? Just apply the following diff (git apply ...):
diff --git a/man/ochami-smd.1.sc b/man/ochami-smd.1.sc
index dc7e481..78830b7 100644
--- a/man/ochami-smd.1.sc
+++ b/man/ochami-smd.1.sc
@@ -440,6 +440,56 @@ Subcommands for this command are as follows:
this flag can be specified multiple times or this flag can be specified
once and multiple xnames, separated by commas.
+## iface
+
+Manage Ethernet interfaces.
+
+*get* [-F _format_] [--by-ip] [--comp-id _xname_,...] [-i _id_] [--ip _ip_,...] [-m _mac_,...] [--net _network_,...] [--newer-than _timestamp_] [--older-than _timestamp_] [--type _type_,...]
+ Aliases: *list*
+
+ Get all Ethernet interfaces or a subset based on filter options.
+
+ This command sends a GET request to SMD's /Inventory/EthernetInterfaces
+ endpoint.
+
+ This command accepts the following options:
+
+ *--by-ip*
+ Get all IP addresses for the Ethernet interface specified by *--id*.
+
+ *--comp-id* _xname_,...
+ Filter Ethernet interfaces by one or more component IDs.
+
+ *-F, --format-output* _format_
+ Output response data in specified _format_. Supported values are:
+
+ - _json_ (default)
+ - _json-pretty_
+ - _yaml_
+
+ *-i, --id* _id_
+ Get an Ethernet interface by its ID.
+
+ *--ip* _ip_,...
+ Filter Ethernet interfaces by one or more IP addresses.
+
+ *-m, --mac* _mac_,...
+ Filter Ethernet interfaces by one or more MAC addresses.
+
+ *--net* _network_,...
+ Filter Ethernet interfaces by IP address on one or more networks.
+
+ *--newer-than* _timestamp_
+ Filter Ethernet interfaces by update time newer than the specified
+ RFC3339-formatted timestamp.
+
+ *--older-than* _timestamp_
+ Filter Ethernet interfaces by update time older than the specified
+ RFC3339-formatted timestamp.
+
+ *--type* _type_,...
+ Filter Ethernet interfaces by one or more types.
+
## rfe
Manage Redfish endpoints.
|
Also, if you could rebase onto the current |
Checklist
make test(or equivalent) locally and all tests passgit commit -s) with my real name and email<filename>.licensesidecarLICENSES/directoryDescription
Summary:
This PR introduces
listas an alias for theochami smd rfe getandochami smd component getcommands.Motivation and Context:
Older CSM-based commands lacked a
listalias, causing inconsistencies in user experience when compared to newer commands in the OpenCHAMI CLI. This simple quality-of-life update allows users to typelistintuitively while mapping directly to the underlyinggetlogic. The respectivemanpages (ochami-smd.1.sc) have also been updated to reflect the availability of the alias.Fixes #(issue)
#116
Type of Change
For more info, see Contributing Guidelines.