mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
virsh command names cleanup
This commit is contained in:
parent
f7e40ae879
commit
48e85b5c41
@ -1,3 +1,8 @@
|
|||||||
|
Tue Apr 4 22:49:33 CEST 2006 Karel Zak <kzak@redhat.com>
|
||||||
|
|
||||||
|
* src/virsh.c: rename dstate, idof and nameof to domstate,
|
||||||
|
domname and domid
|
||||||
|
|
||||||
Tue Apr 4 12:41:53 CEST 2006 Karel Zak <kzak@redhat.com>
|
Tue Apr 4 12:41:53 CEST 2006 Karel Zak <kzak@redhat.com>
|
||||||
|
|
||||||
* src/virsh.c: add new command "nodeinfo"
|
* src/virsh.c: add new command "nodeinfo"
|
||||||
|
52
src/virsh.c
52
src/virsh.c
@ -344,22 +344,22 @@ cmdList(vshControl * ctl, vshCmd * cmd ATTRIBUTE_UNUSED)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* "dstate" command
|
* "domstate" command
|
||||||
*/
|
*/
|
||||||
static vshCmdInfo info_dstate[] = {
|
static vshCmdInfo info_domstate[] = {
|
||||||
{"syntax", "dstate <domain>"},
|
{"syntax", "domstate <domain>"},
|
||||||
{"help", "domain state"},
|
{"help", "domain state"},
|
||||||
{"desc", "Returns state about a running domain."},
|
{"desc", "Returns state about a running domain."},
|
||||||
{NULL, NULL}
|
{NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
static vshCmdOptDef opts_dstate[] = {
|
static vshCmdOptDef opts_domstate[] = {
|
||||||
{"domain", VSH_OT_DATA, VSH_OFLAG_REQ, "domain name or id"},
|
{"domain", VSH_OT_DATA, VSH_OFLAG_REQ, "domain name or id"},
|
||||||
{NULL, 0, 0, NULL}
|
{NULL, 0, 0, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
static int
|
static int
|
||||||
cmdDstate(vshControl * ctl, vshCmd * cmd)
|
cmdDomstate(vshControl * ctl, vshCmd * cmd)
|
||||||
{
|
{
|
||||||
virDomainInfo info;
|
virDomainInfo info;
|
||||||
virDomainPtr dom;
|
virDomainPtr dom;
|
||||||
@ -852,21 +852,21 @@ cmdDumpXML(vshControl * ctl, vshCmd * cmd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* "nameof" command
|
* "domname" command
|
||||||
*/
|
*/
|
||||||
static vshCmdInfo info_nameof[] = {
|
static vshCmdInfo info_domname[] = {
|
||||||
{"syntax", "nameof <id>"},
|
{"syntax", "domname <id>"},
|
||||||
{"help", "convert a domain Id to domain name"},
|
{"help", "convert a domain Id to domain name"},
|
||||||
{NULL, NULL}
|
{NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
static vshCmdOptDef opts_nameof[] = {
|
static vshCmdOptDef opts_domname[] = {
|
||||||
{"id", VSH_OT_DATA, VSH_OFLAG_REQ, "domain Id"},
|
{"id", VSH_OT_DATA, VSH_OFLAG_REQ, "domain Id"},
|
||||||
{NULL, 0, 0, NULL}
|
{NULL, 0, 0, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
static int
|
static int
|
||||||
cmdNameof(vshControl * ctl, vshCmd * cmd)
|
cmdDomname(vshControl * ctl, vshCmd * cmd)
|
||||||
{
|
{
|
||||||
int found;
|
int found;
|
||||||
int id = vshCommandOptInt(cmd, "id", &found);
|
int id = vshCommandOptInt(cmd, "id", &found);
|
||||||
@ -889,21 +889,21 @@ cmdNameof(vshControl * ctl, vshCmd * cmd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* "idof" command
|
* "domid" command
|
||||||
*/
|
*/
|
||||||
static vshCmdInfo info_idof[] = {
|
static vshCmdInfo info_domid[] = {
|
||||||
{"syntax", "idof <name>"},
|
{"syntax", "domid <name>"},
|
||||||
{"help", "convert a domain name to domain Id"},
|
{"help", "convert a domain name to domain Id"},
|
||||||
{NULL, NULL}
|
{NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
static vshCmdOptDef opts_idof[] = {
|
static vshCmdOptDef opts_domid[] = {
|
||||||
{"name", VSH_OT_DATA, VSH_OFLAG_REQ, "domain name"},
|
{"name", VSH_OT_DATA, VSH_OFLAG_REQ, "domain name"},
|
||||||
{NULL, 0, 0, NULL}
|
{NULL, 0, 0, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
static int
|
static int
|
||||||
cmdIdof(vshControl * ctl, vshCmd * cmd)
|
cmdDomid(vshControl * ctl, vshCmd * cmd)
|
||||||
{
|
{
|
||||||
char *name = vshCommandOptString(cmd, "name", NULL);
|
char *name = vshCommandOptString(cmd, "name", NULL);
|
||||||
virDomainPtr dom;
|
virDomainPtr dom;
|
||||||
@ -1026,23 +1026,23 @@ cmdQuit(vshControl * ctl, vshCmd * cmd ATTRIBUTE_UNUSED)
|
|||||||
static vshCmdDef commands[] = {
|
static vshCmdDef commands[] = {
|
||||||
{"connect", cmdConnect, opts_connect, info_connect},
|
{"connect", cmdConnect, opts_connect, info_connect},
|
||||||
{"create", cmdCreate, opts_create, info_create},
|
{"create", cmdCreate, opts_create, info_create},
|
||||||
|
{"destroy", cmdDestroy, opts_destroy, info_destroy},
|
||||||
|
{"domid", cmdDomid, opts_domid, info_domid},
|
||||||
{"dominfo", cmdDominfo, opts_dominfo, info_dominfo},
|
{"dominfo", cmdDominfo, opts_dominfo, info_dominfo},
|
||||||
{"nodeinfo", cmdNodeinfo, NULL, info_nodeinfo},
|
{"domname", cmdDomname, opts_domname, info_domname},
|
||||||
|
{"domstate", cmdDomstate, opts_domstate, info_domstate},
|
||||||
{"dumpxml", cmdDumpXML, opts_dumpxml, info_dumpxml},
|
{"dumpxml", cmdDumpXML, opts_dumpxml, info_dumpxml},
|
||||||
{"dstate", cmdDstate, opts_dstate, info_dstate},
|
{"help", cmdHelp, opts_help, info_help},
|
||||||
{"suspend", cmdSuspend, opts_suspend, info_suspend},
|
{"list", cmdList, NULL, info_list},
|
||||||
|
{"nodeinfo", cmdNodeinfo, NULL, info_nodeinfo},
|
||||||
|
{"quit", cmdQuit, NULL, info_quit},
|
||||||
|
{"reboot", cmdReboot, opts_reboot, info_reboot},
|
||||||
|
{"restore", cmdRestore, opts_restore, info_restore},
|
||||||
{"resume", cmdResume, opts_resume, info_resume},
|
{"resume", cmdResume, opts_resume, info_resume},
|
||||||
{"save", cmdSave, opts_save, info_save},
|
{"save", cmdSave, opts_save, info_save},
|
||||||
{"restore", cmdRestore, opts_restore, info_restore},
|
|
||||||
{"shutdown", cmdShutdown, opts_shutdown, info_shutdown},
|
{"shutdown", cmdShutdown, opts_shutdown, info_shutdown},
|
||||||
{"reboot", cmdReboot, opts_reboot, info_reboot},
|
{"suspend", cmdSuspend, opts_suspend, info_suspend},
|
||||||
{"destroy", cmdDestroy, opts_destroy, info_destroy},
|
|
||||||
{"help", cmdHelp, opts_help, info_help},
|
|
||||||
{"idof", cmdIdof, opts_idof, info_idof},
|
|
||||||
{"list", cmdList, NULL, info_list},
|
|
||||||
{"nameof", cmdNameof, opts_nameof, info_nameof},
|
|
||||||
{"version", cmdVersion, NULL, info_version},
|
{"version", cmdVersion, NULL, info_version},
|
||||||
{"quit", cmdQuit, NULL, info_quit},
|
|
||||||
{NULL, NULL, NULL, NULL}
|
{NULL, NULL, NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user