return ret;
}
+
+
+char **
+virshNetworkUpdateSectionCompleter(vshControl *ctl G_GNUC_UNUSED,
+ const vshCmd *cmd G_GNUC_UNUSED,
+ unsigned int flags)
+{
+ char **ret = NULL;
+ size_t i;
+
+ virCheckFlags(0, NULL);
+
+ ret = g_new0(char *, VIR_NETWORK_SECTION_LAST);
+
+ /* The first item in the enum is not accepted by virsh. */
+ for (i = 1; i < VIR_NETWORK_SECTION_LAST; i++)
+ ret[i - 1] = g_strdup(virshNetworkSectionTypeToString(i));
+
+ return ret;
+}
virshNetworkUpdateCommandCompleter(vshControl *ctl,
const vshCmd *cmd,
unsigned int flags);
+
+char **
+virshNetworkUpdateSectionCompleter(vshControl *ctl,
+ const vshCmd *cmd,
+ unsigned int flags);
{.name = "section",
.type = VSH_OT_DATA,
.flags = VSH_OFLAG_REQ,
+ .completer = virshNetworkUpdateSectionCompleter,
.help = N_("which section of network configuration to update")
},
{.name = "xml",
VIR_NETWORK_UPDATE_COMMAND_LAST,
"none", "modify", "delete", "add-last", "add-first");
-VIR_ENUM_DECL(virshNetworkSection);
VIR_ENUM_IMPL(virshNetworkSection,
VIR_NETWORK_SECTION_LAST,
"none", "bridge", "domain", "ip", "ip-dhcp-host",
extern virshNetworkEventCallback virshNetworkEventCallbacks[];
VIR_ENUM_DECL(virshNetworkUpdateCommand);
+VIR_ENUM_DECL(virshNetworkSection);
extern const vshCmdDef networkCmds[];