On Thu, Dec 24, 2020 at 08:14:42AM -0600, Jonathon Jongsma wrote:
Add a virsh command that maps to virNodeDeviceUndefine().
Signed-off-by: Jonathon Jongsma <jjongsma(a)redhat.com>
---
tools/virsh-nodedev.c | 65 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 65 insertions(+)
diff --git a/tools/virsh-nodedev.c b/tools/virsh-nodedev.c
index 5df75013de..97d2a34056 100644
--- a/tools/virsh-nodedev.c
+++ b/tools/virsh-nodedev.c
@@ -1012,6 +1012,65 @@ cmdNodeDeviceEvent(vshControl *ctl, const vshCmd *cmd)
}
+/*
+ * "nodedev-undefine" command
+ */
+static const vshCmdInfo info_node_device_undefine[] = {
+ {.name = "help",
+ .data = N_("Undefine an inactive node device")
+ },
+ {.name = "desc",
+ .data = N_("Undefines the configuration for an inactive node device")
+ },
+ {.name = NULL}
+};
+
+static const vshCmdOptDef opts_node_device_undefine[] = {
+ {.name = "name",
+ .type = VSH_OT_ALIAS,
+ .help = "device"
^This is a new command, so there should not introduce any alias. We tend to add
aliases when at some point we realize the design was a mistake and we need the
virsh argument names, e.g. for virt-admin commands
Reviewed-by: Erik Skultety <eskultet(a)redhat.com>