]> xenbits.xensource.com Git - libvirt.git/commit
virsh: Switch from generated cmd*Edit commands to nongenerated
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 17 May 2012 15:08:53 +0000 (17:08 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Sat, 2 Jun 2012 08:40:51 +0000 (10:40 +0200)
commit0766783abbe8bbc9ea686c2c3149f4c0ac139e19
tree4d1968f26669445b7397870c899015740bd88265
parentb92d52d3c0c9b0e5ab55ace800ecb7321045aaeb
virsh: Switch from generated cmd*Edit commands to nongenerated

Currently, we either generate some cmd*Edit commands (cmdPoolEdit
and cmdNetworkEdit) via sed script or copy the body of cmdEdit
(e.g. cmdInterfaceEdit, cmdNWFilterEdit, etc.). This fact makes
it harder to implement any new feature to our editing system.
Therefore switch to new implementation - define macros to:
- dump XML (EDIT_GET_XML)
- take an action if XML wasn't changed,
  usually just vshPrint() (EDIT_NOT_CHANGED)
- define new object (EDIT_DEFINE) - the edited XML is in @doc_edited
- free object defined by EDIT_DEFINE (EDIT_FREE)
and #include "virsh-edit.c"
cfg.mk
po/POTFILES.in
tools/Makefile.am
tools/virsh-edit.c [new file with mode: 0644]
tools/virsh.c