mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
tools: Introduce new client generic module vsh
In order to share as much virsh' logic as possible with upcomming virt-admin client we need to split virsh logic into virsh specific and client generic features. Since majority of virsh methods should be generic enough to be used by other clients, it's much easier to rename virsh specific data to virshX than doing this vice versa. It moved generic virsh commands (including info and opts structures) to generic module vsh.c. Besides renaming methods and structures, this patch also involves introduction of a client specific control structure being referenced as private data in the original control structure, introduction of a new global vsh Initializer, which currently doesn't do much, but there is a potential for added functionality in the future. Lastly it introduced client hooks which are especially necessary during client connecting phase.
This commit is contained in:
@@ -29,13 +29,13 @@
|
||||
# include "virsh.h"
|
||||
|
||||
virNetworkPtr
|
||||
vshCommandOptNetworkBy(vshControl *ctl, const vshCmd *cmd,
|
||||
const char **name, unsigned int flags);
|
||||
virshCommandOptNetworkBy(vshControl *ctl, const vshCmd *cmd,
|
||||
const char **name, unsigned int flags);
|
||||
|
||||
/* default is lookup by Name and UUID */
|
||||
# define vshCommandOptNetwork(_ctl, _cmd, _name) \
|
||||
vshCommandOptNetworkBy(_ctl, _cmd, _name, \
|
||||
VSH_BYUUID|VSH_BYNAME)
|
||||
# define virshCommandOptNetwork(_ctl, _cmd, _name) \
|
||||
virshCommandOptNetworkBy(_ctl, _cmd, _name, \
|
||||
VIRSH_BYUUID | VIRSH_BYNAME)
|
||||
|
||||
extern const vshCmdDef networkCmds[];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user