virsh: Move command group definition into its own file

* virsh-domain-monitor.c: Add domMonitoringCmds
* virsh-domain.c: Add domManagementCmds
* virsh-host.c: Add hostAndHypervisorCmds
* virsh-interface.c: Add ifaceCmds
* virsh-network.c: Add networkCmds
* virsh-nodedev.c: Add nodedevCmds
* virsh-nwfilter.c: Add nwfilterCmds
* virsh-pool.c: Add storagePoolCmds
* virsh-secret.c: Add secretCmds
* virsh-snapshot.c: Add snapshotCmds
* virsh-volume.c: Add storageVolCmds
* virsh.c: Remove all the above *Cmds.
This commit is contained in:
Osier Yang 2012-07-23 15:19:04 +08:00
parent 49989d7025
commit c4bdf307e0
12 changed files with 308 additions and 318 deletions

View File

@ -1686,3 +1686,19 @@ cleanup:
return ret;
}
#undef FILTER
static const vshCmdDef domMonitoringCmds[] = {
{"domblkerror", cmdDomBlkError, opts_domblkerror, info_domblkerror, 0},
{"domblkinfo", cmdDomblkinfo, opts_domblkinfo, info_domblkinfo, 0},
{"domblklist", cmdDomblklist, opts_domblklist, info_domblklist, 0},
{"domblkstat", cmdDomblkstat, opts_domblkstat, info_domblkstat, 0},
{"domcontrol", cmdDomControl, opts_domcontrol, info_domcontrol, 0},
{"domif-getlink", cmdDomIfGetLink, opts_domif_getlink, info_domif_getlink, 0},
{"domiflist", cmdDomiflist, opts_domiflist, info_domiflist, 0},
{"domifstat", cmdDomIfstat, opts_domifstat, info_domifstat, 0},
{"dominfo", cmdDominfo, opts_dominfo, info_dominfo, 0},
{"dommemstat", cmdDomMemStat, opts_dommemstat, info_dommemstat, 0},
{"domstate", cmdDomstate, opts_domstate, info_domstate, 0},
{"list", cmdList, opts_list, info_list, 0},
{NULL, NULL, NULL, NULL, 0}
};

View File

@ -8047,3 +8047,98 @@ cleanup:
virDomainFree(dom);
return ret;
}
static const vshCmdDef domManagementCmds[] = {
{"attach-device", cmdAttachDevice, opts_attach_device,
info_attach_device, 0},
{"attach-disk", cmdAttachDisk, opts_attach_disk,
info_attach_disk, 0},
{"attach-interface", cmdAttachInterface, opts_attach_interface,
info_attach_interface, 0},
{"autostart", cmdAutostart, opts_autostart, info_autostart, 0},
{"blkdeviotune", cmdBlkdeviotune, opts_blkdeviotune, info_blkdeviotune, 0},
{"blkiotune", cmdBlkiotune, opts_blkiotune, info_blkiotune, 0},
{"blockcopy", cmdBlockCopy, opts_block_copy, info_block_copy, 0},
{"blockjob", cmdBlockJob, opts_block_job, info_block_job, 0},
{"blockpull", cmdBlockPull, opts_block_pull, info_block_pull, 0},
{"blockresize", cmdBlockResize, opts_block_resize, info_block_resize, 0},
{"change-media", cmdChangeMedia, opts_change_media, info_change_media, 0},
#ifndef WIN32
{"console", cmdConsole, opts_console, info_console, 0},
#endif
{"cpu-baseline", cmdCPUBaseline, opts_cpu_baseline, info_cpu_baseline, 0},
{"cpu-compare", cmdCPUCompare, opts_cpu_compare, info_cpu_compare, 0},
{"cpu-stats", cmdCPUStats, opts_cpu_stats, info_cpu_stats, 0},
{"create", cmdCreate, opts_create, info_create, 0},
{"define", cmdDefine, opts_define, info_define, 0},
{"desc", cmdDesc, opts_desc, info_desc, 0},
{"destroy", cmdDestroy, opts_destroy, info_destroy, 0},
{"detach-device", cmdDetachDevice, opts_detach_device,
info_detach_device, 0},
{"detach-disk", cmdDetachDisk, opts_detach_disk, info_detach_disk, 0},
{"detach-interface", cmdDetachInterface, opts_detach_interface,
info_detach_interface, 0},
{"domdisplay", cmdDomDisplay, opts_domdisplay, info_domdisplay, 0},
{"domhostname", cmdDomHostname, opts_domhostname, info_domhostname, 0},
{"domid", cmdDomid, opts_domid, info_domid, 0},
{"domif-setlink", cmdDomIfSetLink, opts_domif_setlink, info_domif_setlink, 0},
{"domiftune", cmdDomIftune, opts_domiftune, info_domiftune, 0},
{"domjobabort", cmdDomjobabort, opts_domjobabort, info_domjobabort, 0},
{"domjobinfo", cmdDomjobinfo, opts_domjobinfo, info_domjobinfo, 0},
{"domname", cmdDomname, opts_domname, info_domname, 0},
{"dompmsuspend", cmdDomPMSuspend,
opts_dom_pm_suspend, info_dom_pm_suspend, 0},
{"dompmwakeup", cmdDomPMWakeup,
opts_dom_pm_wakeup, info_dom_pm_wakeup, 0},
{"domuuid", cmdDomuuid, opts_domuuid, info_domuuid, 0},
{"domxml-from-native", cmdDomXMLFromNative, opts_domxmlfromnative,
info_domxmlfromnative, 0},
{"domxml-to-native", cmdDomXMLToNative, opts_domxmltonative,
info_domxmltonative, 0},
{"dump", cmdDump, opts_dump, info_dump, 0},
{"dumpxml", cmdDumpXML, opts_dumpxml, info_dumpxml, 0},
{"edit", cmdEdit, opts_edit, info_edit, 0},
{"inject-nmi", cmdInjectNMI, opts_inject_nmi, info_inject_nmi, 0},
{"send-key", cmdSendKey, opts_send_key, info_send_key, 0},
{"managedsave", cmdManagedSave, opts_managedsave, info_managedsave, 0},
{"managedsave-remove", cmdManagedSaveRemove, opts_managedsaveremove,
info_managedsaveremove, 0},
{"maxvcpus", cmdMaxvcpus, opts_maxvcpus, info_maxvcpus, 0},
{"memtune", cmdMemtune, opts_memtune, info_memtune, 0},
{"migrate", cmdMigrate, opts_migrate, info_migrate, 0},
{"migrate-setmaxdowntime", cmdMigrateSetMaxDowntime,
opts_migrate_setmaxdowntime, info_migrate_setmaxdowntime, 0},
{"migrate-setspeed", cmdMigrateSetMaxSpeed,
opts_migrate_setspeed, info_migrate_setspeed, 0},
{"migrate-getspeed", cmdMigrateGetMaxSpeed,
opts_migrate_getspeed, info_migrate_getspeed, 0},
{"numatune", cmdNumatune, opts_numatune, info_numatune, 0},
{"reboot", cmdReboot, opts_reboot, info_reboot, 0},
{"reset", cmdReset, opts_reset, info_reset, 0},
{"restore", cmdRestore, opts_restore, info_restore, 0},
{"resume", cmdResume, opts_resume, info_resume, 0},
{"save", cmdSave, opts_save, info_save, 0},
{"save-image-define", cmdSaveImageDefine, opts_save_image_define,
info_save_image_define, 0},
{"save-image-dumpxml", cmdSaveImageDumpxml, opts_save_image_dumpxml,
info_save_image_dumpxml, 0},
{"save-image-edit", cmdSaveImageEdit, opts_save_image_edit,
info_save_image_edit, 0},
{"schedinfo", cmdSchedinfo, opts_schedinfo, info_schedinfo, 0},
{"screenshot", cmdScreenshot, opts_screenshot, info_screenshot, 0},
{"setmaxmem", cmdSetmaxmem, opts_setmaxmem, info_setmaxmem, 0},
{"setmem", cmdSetmem, opts_setmem, info_setmem, 0},
{"setvcpus", cmdSetvcpus, opts_setvcpus, info_setvcpus, 0},
{"shutdown", cmdShutdown, opts_shutdown, info_shutdown, 0},
{"start", cmdStart, opts_start, info_start, 0},
{"suspend", cmdSuspend, opts_suspend, info_suspend, 0},
{"ttyconsole", cmdTTYConsole, opts_ttyconsole, info_ttyconsole, 0},
{"undefine", cmdUndefine, opts_undefine, info_undefine, 0},
{"update-device", cmdUpdateDevice, opts_update_device,
info_update_device, 0},
{"vcpucount", cmdVcpucount, opts_vcpucount, info_vcpucount, 0},
{"vcpuinfo", cmdVcpuinfo, opts_vcpuinfo, info_vcpuinfo, 0},
{"vcpupin", cmdVcpuPin, opts_vcpupin, info_vcpupin, 0},
{"vncdisplay", cmdVNCDisplay, opts_vncdisplay, info_vncdisplay, 0},
{NULL, NULL, NULL, NULL, 0}
};

View File

@ -818,3 +818,22 @@ cmdVersion(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
return true;
}
static const vshCmdDef hostAndHypervisorCmds[] = {
{"capabilities", cmdCapabilities, NULL, info_capabilities, 0},
{"connect", cmdConnect, opts_connect, info_connect,
VSH_CMD_FLAG_NOCONNECT},
{"freecell", cmdFreecell, opts_freecell, info_freecell, 0},
{"hostname", cmdHostname, NULL, info_hostname, 0},
{"nodecpustats", cmdNodeCpuStats, opts_node_cpustats, info_nodecpustats, 0},
{"nodeinfo", cmdNodeinfo, NULL, info_nodeinfo, 0},
{"nodememstats", cmdNodeMemStats, opts_node_memstats, info_nodememstats, 0},
{"nodesuspend", cmdNodeSuspend, opts_node_suspend, info_nodesuspend, 0},
{"qemu-attach", cmdQemuAttach, opts_qemu_attach, info_qemu_attach, 0},
{"qemu-monitor-command", cmdQemuMonitorCommand, opts_qemu_monitor_command,
info_qemu_monitor_command, 0},
{"sysinfo", cmdSysinfo, NULL, info_sysinfo, 0},
{"uri", cmdURI, NULL, info_uri, 0},
{"version", cmdVersion, opts_version, info_version, 0},
{NULL, NULL, NULL, NULL, 0}
};

View File

@ -998,3 +998,35 @@ cmdInterfaceUnbridge(vshControl *ctl, const vshCmd *cmd)
xmlFreeDoc(xml_doc);
return ret;
}
static const vshCmdDef ifaceCmds[] = {
{"iface-begin", cmdInterfaceBegin, opts_interface_begin,
info_interface_begin, 0},
{"iface-bridge", cmdInterfaceBridge, opts_interface_bridge,
info_interface_bridge, 0},
{"iface-commit", cmdInterfaceCommit, opts_interface_commit,
info_interface_commit, 0},
{"iface-define", cmdInterfaceDefine, opts_interface_define,
info_interface_define, 0},
{"iface-destroy", cmdInterfaceDestroy, opts_interface_destroy,
info_interface_destroy, 0},
{"iface-dumpxml", cmdInterfaceDumpXML, opts_interface_dumpxml,
info_interface_dumpxml, 0},
{"iface-edit", cmdInterfaceEdit, opts_interface_edit,
info_interface_edit, 0},
{"iface-list", cmdInterfaceList, opts_interface_list,
info_interface_list, 0},
{"iface-mac", cmdInterfaceMAC, opts_interface_mac,
info_interface_mac, 0},
{"iface-name", cmdInterfaceName, opts_interface_name,
info_interface_name, 0},
{"iface-rollback", cmdInterfaceRollback, opts_interface_rollback,
info_interface_rollback, 0},
{"iface-start", cmdInterfaceStart, opts_interface_start,
info_interface_start, 0},
{"iface-unbridge", cmdInterfaceUnbridge, opts_interface_unbridge,
info_interface_unbridge, 0},
{"iface-undefine", cmdInterfaceUndefine, opts_interface_undefine,
info_interface_undefine, 0},
{NULL, NULL, NULL, NULL, 0}
};

View File

@ -686,3 +686,25 @@ cmdNetworkEdit(vshControl *ctl, const vshCmd *cmd)
return ret;
}
static const vshCmdDef networkCmds[] = {
{"net-autostart", cmdNetworkAutostart, opts_network_autostart,
info_network_autostart, 0},
{"net-create", cmdNetworkCreate, opts_network_create,
info_network_create, 0},
{"net-define", cmdNetworkDefine, opts_network_define,
info_network_define, 0},
{"net-destroy", cmdNetworkDestroy, opts_network_destroy,
info_network_destroy, 0},
{"net-dumpxml", cmdNetworkDumpXML, opts_network_dumpxml,
info_network_dumpxml, 0},
{"net-edit", cmdNetworkEdit, opts_network_edit, info_network_edit, 0},
{"net-info", cmdNetworkInfo, opts_network_info, info_network_info, 0},
{"net-list", cmdNetworkList, opts_network_list, info_network_list, 0},
{"net-name", cmdNetworkName, opts_network_name, info_network_name, 0},
{"net-start", cmdNetworkStart, opts_network_start, info_network_start, 0},
{"net-undefine", cmdNetworkUndefine, opts_network_undefine,
info_network_undefine, 0},
{"net-uuid", cmdNetworkUuid, opts_network_uuid, info_network_uuid, 0},
{NULL, NULL, NULL, NULL, 0}
};

View File

@ -380,3 +380,23 @@ cmdNodeDeviceReset(vshControl *ctl, const vshCmd *cmd)
virNodeDeviceFree(device);
return ret;
}
static const vshCmdDef nodedevCmds[] = {
{"nodedev-create", cmdNodeDeviceCreate, opts_node_device_create,
info_node_device_create, 0},
{"nodedev-destroy", cmdNodeDeviceDestroy, opts_node_device_destroy,
info_node_device_destroy, 0},
{"nodedev-detach", cmdNodeDeviceDetach, opts_node_device_detach,
info_node_device_detach, 0},
{"nodedev-dettach", cmdNodeDeviceDetach, opts_node_device_detach,
info_node_device_detach, VSH_CMD_FLAG_ALIAS},
{"nodedev-dumpxml", cmdNodeDeviceDumpXML, opts_node_device_dumpxml,
info_node_device_dumpxml, 0},
{"nodedev-list", cmdNodeListDevices, opts_node_list_devices,
info_node_list_devices, 0},
{"nodedev-reattach", cmdNodeDeviceReAttach, opts_node_device_reattach,
info_node_device_reattach, 0},
{"nodedev-reset", cmdNodeDeviceReset, opts_node_device_reset,
info_node_device_reset, 0},
{NULL, NULL, NULL, NULL, 0}
};

View File

@ -308,3 +308,17 @@ cleanup:
return ret;
}
static const vshCmdDef nwfilterCmds[] = {
{"nwfilter-define", cmdNWFilterDefine, opts_nwfilter_define,
info_nwfilter_define, 0},
{"nwfilter-dumpxml", cmdNWFilterDumpXML, opts_nwfilter_dumpxml,
info_nwfilter_dumpxml, 0},
{"nwfilter-edit", cmdNWFilterEdit, opts_nwfilter_edit,
info_nwfilter_edit, 0},
{"nwfilter-list", cmdNWFilterList, opts_nwfilter_list,
info_nwfilter_list, 0},
{"nwfilter-undefine", cmdNWFilterUndefine, opts_nwfilter_undefine,
info_nwfilter_undefine, 0},
{NULL, NULL, NULL, NULL, 0}
};

View File

@ -1413,3 +1413,30 @@ cmdPoolEdit(vshControl *ctl, const vshCmd *cmd)
return ret;
}
static const vshCmdDef storagePoolCmds[] = {
{"find-storage-pool-sources-as", cmdPoolDiscoverSourcesAs,
opts_find_storage_pool_sources_as, info_find_storage_pool_sources_as, 0},
{"find-storage-pool-sources", cmdPoolDiscoverSources,
opts_find_storage_pool_sources, info_find_storage_pool_sources, 0},
{"pool-autostart", cmdPoolAutostart, opts_pool_autostart,
info_pool_autostart, 0},
{"pool-build", cmdPoolBuild, opts_pool_build, info_pool_build, 0},
{"pool-create-as", cmdPoolCreateAs, opts_pool_X_as, info_pool_create_as, 0},
{"pool-create", cmdPoolCreate, opts_pool_create, info_pool_create, 0},
{"pool-define-as", cmdPoolDefineAs, opts_pool_X_as, info_pool_define_as, 0},
{"pool-define", cmdPoolDefine, opts_pool_define, info_pool_define, 0},
{"pool-delete", cmdPoolDelete, opts_pool_delete, info_pool_delete, 0},
{"pool-destroy", cmdPoolDestroy, opts_pool_destroy, info_pool_destroy, 0},
{"pool-dumpxml", cmdPoolDumpXML, opts_pool_dumpxml, info_pool_dumpxml, 0},
{"pool-edit", cmdPoolEdit, opts_pool_edit, info_pool_edit, 0},
{"pool-info", cmdPoolInfo, opts_pool_info, info_pool_info, 0},
{"pool-list", cmdPoolList, opts_pool_list, info_pool_list, 0},
{"pool-name", cmdPoolName, opts_pool_name, info_pool_name, 0},
{"pool-refresh", cmdPoolRefresh, opts_pool_refresh, info_pool_refresh, 0},
{"pool-start", cmdPoolStart, opts_pool_start, info_pool_start, 0},
{"pool-undefine", cmdPoolUndefine, opts_pool_undefine,
info_pool_undefine, 0},
{"pool-uuid", cmdPoolUuid, opts_pool_uuid, info_pool_uuid, 0},
{NULL, NULL, NULL, NULL, 0}
};

View File

@ -356,3 +356,18 @@ cmdSecretList(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
VIR_FREE(uuids);
return true;
}
static const vshCmdDef secretCmds[] = {
{"secret-define", cmdSecretDefine, opts_secret_define,
info_secret_define, 0},
{"secret-dumpxml", cmdSecretDumpXML, opts_secret_dumpxml,
info_secret_dumpxml, 0},
{"secret-get-value", cmdSecretGetValue, opts_secret_get_value,
info_secret_get_value, 0},
{"secret-list", cmdSecretList, NULL, info_secret_list, 0},
{"secret-set-value", cmdSecretSetValue, opts_secret_set_value,
info_secret_set_value, 0},
{"secret-undefine", cmdSecretUndefine, opts_secret_undefine,
info_secret_undefine, 0},
{NULL, NULL, NULL, NULL, 0}
};

View File

@ -1602,3 +1602,27 @@ cleanup:
return ret;
}
static const vshCmdDef snapshotCmds[] = {
{"snapshot-create", cmdSnapshotCreate, opts_snapshot_create,
info_snapshot_create, 0},
{"snapshot-create-as", cmdSnapshotCreateAs, opts_snapshot_create_as,
info_snapshot_create_as, 0},
{"snapshot-current", cmdSnapshotCurrent, opts_snapshot_current,
info_snapshot_current, 0},
{"snapshot-delete", cmdSnapshotDelete, opts_snapshot_delete,
info_snapshot_delete, 0},
{"snapshot-dumpxml", cmdSnapshotDumpXML, opts_snapshot_dumpxml,
info_snapshot_dumpxml, 0},
{"snapshot-edit", cmdSnapshotEdit, opts_snapshot_edit,
info_snapshot_edit, 0},
{"snapshot-info", cmdSnapshotInfo, opts_snapshot_info,
info_snapshot_info, 0},
{"snapshot-list", cmdSnapshotList, opts_snapshot_list,
info_snapshot_list, 0},
{"snapshot-parent", cmdSnapshotParent, opts_snapshot_parent,
info_snapshot_parent, 0},
{"snapshot-revert", cmdDomainSnapshotRevert, opts_snapshot_revert,
info_snapshot_revert, 0},
{NULL, NULL, NULL, NULL, 0}
};

View File

@ -1438,3 +1438,25 @@ cmdVolPath(vshControl *ctl, const vshCmd *cmd)
virStorageVolFree(vol);
return true;
}
static const vshCmdDef storageVolCmds[] = {
{"vol-clone", cmdVolClone, opts_vol_clone, info_vol_clone, 0},
{"vol-create-as", cmdVolCreateAs, opts_vol_create_as,
info_vol_create_as, 0},
{"vol-create", cmdVolCreate, opts_vol_create, info_vol_create, 0},
{"vol-create-from", cmdVolCreateFrom, opts_vol_create_from,
info_vol_create_from, 0},
{"vol-delete", cmdVolDelete, opts_vol_delete, info_vol_delete, 0},
{"vol-download", cmdVolDownload, opts_vol_download, info_vol_download, 0},
{"vol-dumpxml", cmdVolDumpXML, opts_vol_dumpxml, info_vol_dumpxml, 0},
{"vol-info", cmdVolInfo, opts_vol_info, info_vol_info, 0},
{"vol-key", cmdVolKey, opts_vol_key, info_vol_key, 0},
{"vol-list", cmdVolList, opts_vol_list, info_vol_list, 0},
{"vol-name", cmdVolName, opts_vol_name, info_vol_name, 0},
{"vol-path", cmdVolPath, opts_vol_path, info_vol_path, 0},
{"vol-pool", cmdVolPool, opts_vol_pool, info_vol_pool, 0},
{"vol-resize", cmdVolResize, opts_vol_resize, info_vol_resize, 0},
{"vol-upload", cmdVolUpload, opts_vol_upload, info_vol_upload, 0},
{"vol-wipe", cmdVolWipe, opts_vol_wipe, info_vol_wipe, 0},
{NULL, NULL, NULL, NULL, 0}
};

View File

@ -3159,285 +3159,16 @@ vshParseArgv(vshControl *ctl, int argc, char **argv)
}
#include "virsh-domain.c"
static const vshCmdDef domManagementCmds[] = {
{"attach-device", cmdAttachDevice, opts_attach_device,
info_attach_device, 0},
{"attach-disk", cmdAttachDisk, opts_attach_disk,
info_attach_disk, 0},
{"attach-interface", cmdAttachInterface, opts_attach_interface,
info_attach_interface, 0},
{"autostart", cmdAutostart, opts_autostart, info_autostart, 0},
{"blkdeviotune", cmdBlkdeviotune, opts_blkdeviotune, info_blkdeviotune, 0},
{"blkiotune", cmdBlkiotune, opts_blkiotune, info_blkiotune, 0},
{"blockcopy", cmdBlockCopy, opts_block_copy, info_block_copy, 0},
{"blockjob", cmdBlockJob, opts_block_job, info_block_job, 0},
{"blockpull", cmdBlockPull, opts_block_pull, info_block_pull, 0},
{"blockresize", cmdBlockResize, opts_block_resize, info_block_resize, 0},
{"change-media", cmdChangeMedia, opts_change_media, info_change_media, 0},
#ifndef WIN32
{"console", cmdConsole, opts_console, info_console, 0},
#endif
{"cpu-baseline", cmdCPUBaseline, opts_cpu_baseline, info_cpu_baseline, 0},
{"cpu-compare", cmdCPUCompare, opts_cpu_compare, info_cpu_compare, 0},
{"cpu-stats", cmdCPUStats, opts_cpu_stats, info_cpu_stats, 0},
{"create", cmdCreate, opts_create, info_create, 0},
{"define", cmdDefine, opts_define, info_define, 0},
{"desc", cmdDesc, opts_desc, info_desc, 0},
{"destroy", cmdDestroy, opts_destroy, info_destroy, 0},
{"detach-device", cmdDetachDevice, opts_detach_device,
info_detach_device, 0},
{"detach-disk", cmdDetachDisk, opts_detach_disk, info_detach_disk, 0},
{"detach-interface", cmdDetachInterface, opts_detach_interface,
info_detach_interface, 0},
{"domdisplay", cmdDomDisplay, opts_domdisplay, info_domdisplay, 0},
{"domhostname", cmdDomHostname, opts_domhostname, info_domhostname, 0},
{"domid", cmdDomid, opts_domid, info_domid, 0},
{"domif-setlink", cmdDomIfSetLink, opts_domif_setlink, info_domif_setlink, 0},
{"domiftune", cmdDomIftune, opts_domiftune, info_domiftune, 0},
{"domjobabort", cmdDomjobabort, opts_domjobabort, info_domjobabort, 0},
{"domjobinfo", cmdDomjobinfo, opts_domjobinfo, info_domjobinfo, 0},
{"domname", cmdDomname, opts_domname, info_domname, 0},
{"dompmsuspend", cmdDomPMSuspend,
opts_dom_pm_suspend, info_dom_pm_suspend, 0},
{"dompmwakeup", cmdDomPMWakeup,
opts_dom_pm_wakeup, info_dom_pm_wakeup, 0},
{"domuuid", cmdDomuuid, opts_domuuid, info_domuuid, 0},
{"domxml-from-native", cmdDomXMLFromNative, opts_domxmlfromnative,
info_domxmlfromnative, 0},
{"domxml-to-native", cmdDomXMLToNative, opts_domxmltonative,
info_domxmltonative, 0},
{"dump", cmdDump, opts_dump, info_dump, 0},
{"dumpxml", cmdDumpXML, opts_dumpxml, info_dumpxml, 0},
{"edit", cmdEdit, opts_edit, info_edit, 0},
{"inject-nmi", cmdInjectNMI, opts_inject_nmi, info_inject_nmi, 0},
{"send-key", cmdSendKey, opts_send_key, info_send_key, 0},
{"managedsave", cmdManagedSave, opts_managedsave, info_managedsave, 0},
{"managedsave-remove", cmdManagedSaveRemove, opts_managedsaveremove,
info_managedsaveremove, 0},
{"maxvcpus", cmdMaxvcpus, opts_maxvcpus, info_maxvcpus, 0},
{"memtune", cmdMemtune, opts_memtune, info_memtune, 0},
{"migrate", cmdMigrate, opts_migrate, info_migrate, 0},
{"migrate-setmaxdowntime", cmdMigrateSetMaxDowntime,
opts_migrate_setmaxdowntime, info_migrate_setmaxdowntime, 0},
{"migrate-setspeed", cmdMigrateSetMaxSpeed,
opts_migrate_setspeed, info_migrate_setspeed, 0},
{"migrate-getspeed", cmdMigrateGetMaxSpeed,
opts_migrate_getspeed, info_migrate_getspeed, 0},
{"numatune", cmdNumatune, opts_numatune, info_numatune, 0},
{"reboot", cmdReboot, opts_reboot, info_reboot, 0},
{"reset", cmdReset, opts_reset, info_reset, 0},
{"restore", cmdRestore, opts_restore, info_restore, 0},
{"resume", cmdResume, opts_resume, info_resume, 0},
{"save", cmdSave, opts_save, info_save, 0},
{"save-image-define", cmdSaveImageDefine, opts_save_image_define,
info_save_image_define, 0},
{"save-image-dumpxml", cmdSaveImageDumpxml, opts_save_image_dumpxml,
info_save_image_dumpxml, 0},
{"save-image-edit", cmdSaveImageEdit, opts_save_image_edit,
info_save_image_edit, 0},
{"schedinfo", cmdSchedinfo, opts_schedinfo, info_schedinfo, 0},
{"screenshot", cmdScreenshot, opts_screenshot, info_screenshot, 0},
{"setmaxmem", cmdSetmaxmem, opts_setmaxmem, info_setmaxmem, 0},
{"setmem", cmdSetmem, opts_setmem, info_setmem, 0},
{"setvcpus", cmdSetvcpus, opts_setvcpus, info_setvcpus, 0},
{"shutdown", cmdShutdown, opts_shutdown, info_shutdown, 0},
{"start", cmdStart, opts_start, info_start, 0},
{"suspend", cmdSuspend, opts_suspend, info_suspend, 0},
{"ttyconsole", cmdTTYConsole, opts_ttyconsole, info_ttyconsole, 0},
{"undefine", cmdUndefine, opts_undefine, info_undefine, 0},
{"update-device", cmdUpdateDevice, opts_update_device,
info_update_device, 0},
{"vcpucount", cmdVcpucount, opts_vcpucount, info_vcpucount, 0},
{"vcpuinfo", cmdVcpuinfo, opts_vcpuinfo, info_vcpuinfo, 0},
{"vcpupin", cmdVcpuPin, opts_vcpupin, info_vcpupin, 0},
{"vncdisplay", cmdVNCDisplay, opts_vncdisplay, info_vncdisplay, 0},
{NULL, NULL, NULL, NULL, 0}
};
#include "virsh-domain-monitor.c"
static const vshCmdDef domMonitoringCmds[] = {
{"domblkerror", cmdDomBlkError, opts_domblkerror, info_domblkerror, 0},
{"domblkinfo", cmdDomblkinfo, opts_domblkinfo, info_domblkinfo, 0},
{"domblklist", cmdDomblklist, opts_domblklist, info_domblklist, 0},
{"domblkstat", cmdDomblkstat, opts_domblkstat, info_domblkstat, 0},
{"domcontrol", cmdDomControl, opts_domcontrol, info_domcontrol, 0},
{"domif-getlink", cmdDomIfGetLink, opts_domif_getlink, info_domif_getlink, 0},
{"domiflist", cmdDomiflist, opts_domiflist, info_domiflist, 0},
{"domifstat", cmdDomIfstat, opts_domifstat, info_domifstat, 0},
{"dominfo", cmdDominfo, opts_dominfo, info_dominfo, 0},
{"dommemstat", cmdDomMemStat, opts_dommemstat, info_dommemstat, 0},
{"domstate", cmdDomstate, opts_domstate, info_domstate, 0},
{"list", cmdList, opts_list, info_list, 0},
{NULL, NULL, NULL, NULL, 0}
};
#include "virsh-pool.c"
static const vshCmdDef storagePoolCmds[] = {
{"find-storage-pool-sources-as", cmdPoolDiscoverSourcesAs,
opts_find_storage_pool_sources_as, info_find_storage_pool_sources_as, 0},
{"find-storage-pool-sources", cmdPoolDiscoverSources,
opts_find_storage_pool_sources, info_find_storage_pool_sources, 0},
{"pool-autostart", cmdPoolAutostart, opts_pool_autostart,
info_pool_autostart, 0},
{"pool-build", cmdPoolBuild, opts_pool_build, info_pool_build, 0},
{"pool-create-as", cmdPoolCreateAs, opts_pool_X_as, info_pool_create_as, 0},
{"pool-create", cmdPoolCreate, opts_pool_create, info_pool_create, 0},
{"pool-define-as", cmdPoolDefineAs, opts_pool_X_as, info_pool_define_as, 0},
{"pool-define", cmdPoolDefine, opts_pool_define, info_pool_define, 0},
{"pool-delete", cmdPoolDelete, opts_pool_delete, info_pool_delete, 0},
{"pool-destroy", cmdPoolDestroy, opts_pool_destroy, info_pool_destroy, 0},
{"pool-dumpxml", cmdPoolDumpXML, opts_pool_dumpxml, info_pool_dumpxml, 0},
{"pool-edit", cmdPoolEdit, opts_pool_edit, info_pool_edit, 0},
{"pool-info", cmdPoolInfo, opts_pool_info, info_pool_info, 0},
{"pool-list", cmdPoolList, opts_pool_list, info_pool_list, 0},
{"pool-name", cmdPoolName, opts_pool_name, info_pool_name, 0},
{"pool-refresh", cmdPoolRefresh, opts_pool_refresh, info_pool_refresh, 0},
{"pool-start", cmdPoolStart, opts_pool_start, info_pool_start, 0},
{"pool-undefine", cmdPoolUndefine, opts_pool_undefine,
info_pool_undefine, 0},
{"pool-uuid", cmdPoolUuid, opts_pool_uuid, info_pool_uuid, 0},
{NULL, NULL, NULL, NULL, 0}
};
#include "virsh-volume.c"
static const vshCmdDef storageVolCmds[] = {
{"vol-clone", cmdVolClone, opts_vol_clone, info_vol_clone, 0},
{"vol-create-as", cmdVolCreateAs, opts_vol_create_as,
info_vol_create_as, 0},
{"vol-create", cmdVolCreate, opts_vol_create, info_vol_create, 0},
{"vol-create-from", cmdVolCreateFrom, opts_vol_create_from,
info_vol_create_from, 0},
{"vol-delete", cmdVolDelete, opts_vol_delete, info_vol_delete, 0},
{"vol-download", cmdVolDownload, opts_vol_download, info_vol_download, 0},
{"vol-dumpxml", cmdVolDumpXML, opts_vol_dumpxml, info_vol_dumpxml, 0},
{"vol-info", cmdVolInfo, opts_vol_info, info_vol_info, 0},
{"vol-key", cmdVolKey, opts_vol_key, info_vol_key, 0},
{"vol-list", cmdVolList, opts_vol_list, info_vol_list, 0},
{"vol-name", cmdVolName, opts_vol_name, info_vol_name, 0},
{"vol-path", cmdVolPath, opts_vol_path, info_vol_path, 0},
{"vol-pool", cmdVolPool, opts_vol_pool, info_vol_pool, 0},
{"vol-resize", cmdVolResize, opts_vol_resize, info_vol_resize, 0},
{"vol-upload", cmdVolUpload, opts_vol_upload, info_vol_upload, 0},
{"vol-wipe", cmdVolWipe, opts_vol_wipe, info_vol_wipe, 0},
{NULL, NULL, NULL, NULL, 0}
};
#include "virsh-network.c"
static const vshCmdDef networkCmds[] = {
{"net-autostart", cmdNetworkAutostart, opts_network_autostart,
info_network_autostart, 0},
{"net-create", cmdNetworkCreate, opts_network_create,
info_network_create, 0},
{"net-define", cmdNetworkDefine, opts_network_define,
info_network_define, 0},
{"net-destroy", cmdNetworkDestroy, opts_network_destroy,
info_network_destroy, 0},
{"net-dumpxml", cmdNetworkDumpXML, opts_network_dumpxml,
info_network_dumpxml, 0},
{"net-edit", cmdNetworkEdit, opts_network_edit, info_network_edit, 0},
{"net-info", cmdNetworkInfo, opts_network_info, info_network_info, 0},
{"net-list", cmdNetworkList, opts_network_list, info_network_list, 0},
{"net-name", cmdNetworkName, opts_network_name, info_network_name, 0},
{"net-start", cmdNetworkStart, opts_network_start, info_network_start, 0},
{"net-undefine", cmdNetworkUndefine, opts_network_undefine,
info_network_undefine, 0},
{"net-uuid", cmdNetworkUuid, opts_network_uuid, info_network_uuid, 0},
{NULL, NULL, NULL, NULL, 0}
};
#include "virsh-nodedev.c"
static const vshCmdDef nodedevCmds[] = {
{"nodedev-create", cmdNodeDeviceCreate, opts_node_device_create,
info_node_device_create, 0},
{"nodedev-destroy", cmdNodeDeviceDestroy, opts_node_device_destroy,
info_node_device_destroy, 0},
{"nodedev-detach", cmdNodeDeviceDetach, opts_node_device_detach,
info_node_device_detach, 0},
{"nodedev-dettach", cmdNodeDeviceDetach, opts_node_device_detach,
info_node_device_detach, VSH_CMD_FLAG_ALIAS},
{"nodedev-dumpxml", cmdNodeDeviceDumpXML, opts_node_device_dumpxml,
info_node_device_dumpxml, 0},
{"nodedev-list", cmdNodeListDevices, opts_node_list_devices,
info_node_list_devices, 0},
{"nodedev-reattach", cmdNodeDeviceReAttach, opts_node_device_reattach,
info_node_device_reattach, 0},
{"nodedev-reset", cmdNodeDeviceReset, opts_node_device_reset,
info_node_device_reset, 0},
{NULL, NULL, NULL, NULL, 0}
};
#include "virsh-interface.c"
static const vshCmdDef ifaceCmds[] = {
{"iface-begin", cmdInterfaceBegin, opts_interface_begin,
info_interface_begin, 0},
{"iface-bridge", cmdInterfaceBridge, opts_interface_bridge,
info_interface_bridge, 0},
{"iface-commit", cmdInterfaceCommit, opts_interface_commit,
info_interface_commit, 0},
{"iface-define", cmdInterfaceDefine, opts_interface_define,
info_interface_define, 0},
{"iface-destroy", cmdInterfaceDestroy, opts_interface_destroy,
info_interface_destroy, 0},
{"iface-dumpxml", cmdInterfaceDumpXML, opts_interface_dumpxml,
info_interface_dumpxml, 0},
{"iface-edit", cmdInterfaceEdit, opts_interface_edit,
info_interface_edit, 0},
{"iface-list", cmdInterfaceList, opts_interface_list,
info_interface_list, 0},
{"iface-mac", cmdInterfaceMAC, opts_interface_mac,
info_interface_mac, 0},
{"iface-name", cmdInterfaceName, opts_interface_name,
info_interface_name, 0},
{"iface-rollback", cmdInterfaceRollback, opts_interface_rollback,
info_interface_rollback, 0},
{"iface-start", cmdInterfaceStart, opts_interface_start,
info_interface_start, 0},
{"iface-unbridge", cmdInterfaceUnbridge, opts_interface_unbridge,
info_interface_unbridge, 0},
{"iface-undefine", cmdInterfaceUndefine, opts_interface_undefine,
info_interface_undefine, 0},
{NULL, NULL, NULL, NULL, 0}
};
#include "virsh-nwfilter.c"
static const vshCmdDef nwfilterCmds[] = {
{"nwfilter-define", cmdNWFilterDefine, opts_nwfilter_define,
info_nwfilter_define, 0},
{"nwfilter-dumpxml", cmdNWFilterDumpXML, opts_nwfilter_dumpxml,
info_nwfilter_dumpxml, 0},
{"nwfilter-edit", cmdNWFilterEdit, opts_nwfilter_edit,
info_nwfilter_edit, 0},
{"nwfilter-list", cmdNWFilterList, opts_nwfilter_list,
info_nwfilter_list, 0},
{"nwfilter-undefine", cmdNWFilterUndefine, opts_nwfilter_undefine,
info_nwfilter_undefine, 0},
{NULL, NULL, NULL, NULL, 0}
};
#include "virsh-secret.c"
static const vshCmdDef secretCmds[] = {
{"secret-define", cmdSecretDefine, opts_secret_define,
info_secret_define, 0},
{"secret-dumpxml", cmdSecretDumpXML, opts_secret_dumpxml,
info_secret_dumpxml, 0},
{"secret-get-value", cmdSecretGetValue, opts_secret_get_value,
info_secret_get_value, 0},
{"secret-list", cmdSecretList, NULL, info_secret_list, 0},
{"secret-set-value", cmdSecretSetValue, opts_secret_set_value,
info_secret_set_value, 0},
{"secret-undefine", cmdSecretUndefine, opts_secret_undefine,
info_secret_undefine, 0},
{NULL, NULL, NULL, NULL, 0}
};
#include "virsh-snapshot.c"
#include "virsh-host.c"
static const vshCmdDef virshCmds[] = {
{"cd", cmdCd, opts_cd, info_cd, VSH_CMD_FLAG_NOCONNECT},
@ -3449,53 +3180,6 @@ static const vshCmdDef virshCmds[] = {
{NULL, NULL, NULL, NULL, 0}
};
#include "virsh-snapshot.c"
static const vshCmdDef snapshotCmds[] = {
{"snapshot-create", cmdSnapshotCreate, opts_snapshot_create,
info_snapshot_create, 0},
{"snapshot-create-as", cmdSnapshotCreateAs, opts_snapshot_create_as,
info_snapshot_create_as, 0},
{"snapshot-current", cmdSnapshotCurrent, opts_snapshot_current,
info_snapshot_current, 0},
{"snapshot-delete", cmdSnapshotDelete, opts_snapshot_delete,
info_snapshot_delete, 0},
{"snapshot-dumpxml", cmdSnapshotDumpXML, opts_snapshot_dumpxml,
info_snapshot_dumpxml, 0},
{"snapshot-edit", cmdSnapshotEdit, opts_snapshot_edit,
info_snapshot_edit, 0},
{"snapshot-info", cmdSnapshotInfo, opts_snapshot_info,
info_snapshot_info, 0},
{"snapshot-list", cmdSnapshotList, opts_snapshot_list,
info_snapshot_list, 0},
{"snapshot-parent", cmdSnapshotParent, opts_snapshot_parent,
info_snapshot_parent, 0},
{"snapshot-revert", cmdDomainSnapshotRevert, opts_snapshot_revert,
info_snapshot_revert, 0},
{NULL, NULL, NULL, NULL, 0}
};
#include "virsh-host.c"
static const vshCmdDef hostAndHypervisorCmds[] = {
{"capabilities", cmdCapabilities, NULL, info_capabilities, 0},
{"connect", cmdConnect, opts_connect, info_connect,
VSH_CMD_FLAG_NOCONNECT},
{"freecell", cmdFreecell, opts_freecell, info_freecell, 0},
{"hostname", cmdHostname, NULL, info_hostname, 0},
{"nodecpustats", cmdNodeCpuStats, opts_node_cpustats, info_nodecpustats, 0},
{"nodeinfo", cmdNodeinfo, NULL, info_nodeinfo, 0},
{"nodememstats", cmdNodeMemStats, opts_node_memstats, info_nodememstats, 0},
{"nodesuspend", cmdNodeSuspend, opts_node_suspend, info_nodesuspend, 0},
{"qemu-attach", cmdQemuAttach, opts_qemu_attach, info_qemu_attach, 0},
{"qemu-monitor-command", cmdQemuMonitorCommand, opts_qemu_monitor_command,
info_qemu_monitor_command, 0},
{"sysinfo", cmdSysinfo, NULL, info_sysinfo, 0},
{"uri", cmdURI, NULL, info_uri, 0},
{"version", cmdVersion, opts_version, info_version, 0},
{NULL, NULL, NULL, NULL, 0}
};
static const vshCmdGrp cmdGroups[] = {
{VSH_CMD_GRP_DOM_MANAGEMENT, "domain", domManagementCmds},
{VSH_CMD_GRP_DOM_MONITORING, "monitor", domMonitoringCmds},