Re: [PATCH RFC v2 3/5] conf: add caps to virDomainDefFormat*

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 03, 2016 at 09:40:35PM +0000, Joao Martins wrote:
> And use the newly added caps->host.netprefix (if it exists) for
> interface names that match the autogenerated target names.
> 
> Signed-off-by: Joao Martins <joao.m.martins@xxxxxxxxxx>
> ---
>  src/bhyve/bhyve_driver.c    |  9 ++++++++-
>  src/conf/domain_conf.c      | 28 ++++++++++++++++++----------
>  src/conf/domain_conf.h      |  3 +++
>  src/conf/snapshot_conf.c    |  2 +-
>  src/esx/esx_driver.c        |  5 +++--
>  src/libxl/libxl_domain.c    |  2 +-
>  src/libxl/libxl_driver.c    |  9 ++++++---
>  src/libxl/libxl_migration.c |  2 +-
>  src/lxc/lxc_driver.c        |  4 +++-
>  src/lxc/lxc_process.c       | 12 ++++++------
>  src/network/bridge_driver.c |  4 ++--
>  src/openvz/openvz_driver.c  |  5 +++--
>  src/phyp/phyp_driver.c      |  2 +-
>  src/qemu/qemu_domain.c      |  2 +-
>  src/test/test_driver.c      |  6 ++++--
>  src/uml/uml_driver.c        |  2 +-
>  src/vbox/vbox_common.c      |  3 ++-
>  src/vmware/vmware_driver.c  |  5 +++--
>  src/vz/vz_driver.c          |  3 ++-
>  src/xen/xen_driver.c        |  4 ++--
>  src/xenapi/xenapi_driver.c  |  5 +++--
>  tests/lxcconf2xmltest.c     |  2 +-
>  tests/openvzutilstest.c     |  2 +-
>  tests/qemuargv2xmltest.c    |  2 +-
>  tests/qemuhotplugtest.c     |  3 ++-
>  tests/sexpr2xmltest.c       |  2 +-
>  tests/testutils.c           |  2 +-
>  tests/vmx2xmltest.c         |  3 ++-
>  tests/xlconfigtest.c        |  2 +-
>  tests/xmconfigtest.c        |  2 +-
>  30 files changed, 85 insertions(+), 52 deletions(-)

ACK


> diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
> index 0141009..6ae2e1b 100644
> --- a/src/conf/domain_conf.h
> +++ b/src/conf/domain_conf.h
> @@ -2733,11 +2733,13 @@ void virDomainIOThreadSchedDelId(virDomainDefPtr def, unsigned int iothread_id);
>  unsigned int virDomainDefFormatConvertXMLFlags(unsigned int flags);
>  
>  char *virDomainDefFormat(virDomainDefPtr def,
> +                         virCapsPtr caps,
>                           unsigned int flags);
>  char *virDomainObjFormat(virDomainXMLOptionPtr xmlopt,
>                           virDomainObjPtr obj,
>                           unsigned int flags);

Surprised we don't have caps added to this one too, since it
will call virDomainDefFormat.

>  int virDomainDefFormatInternal(virDomainDefPtr def,
> +                               virCapsPtr caps,
>                                 unsigned int flags,
>                                 virBufferPtr buf);
>  
> @@ -2748,6 +2750,7 @@ int virDomainDiskSourceFormat(virBufferPtr buf,
>  
>  int virDomainNetDefFormat(virBufferPtr buf,
>                            virDomainNetDefPtr def,
> +                          char *prefix,
>                            unsigned int flags);
>  
>  typedef enum {
> diff --git a/src/conf/snapshot_conf.c b/src/conf/snapshot_conf.c
> index ea511ec..ffa1bf2 100644
> --- a/src/conf/snapshot_conf.c
> +++ b/src/conf/snapshot_conf.c
> @@ -702,7 +702,7 @@ char *virDomainSnapshotDefFormat(const char *domain_uuid,
>          virBufferAddLit(&buf, "</disks>\n");
>      }
>      if (def->dom) {
> -        if (virDomainDefFormatInternal(def->dom, flags, &buf) < 0) {
> +        if (virDomainDefFormatInternal(def->dom, NULL, flags, &buf) < 0) {
>              virBufferFreeAndReset(&buf);
>              return NULL;
>          }

Yeah, we'll need to pass caps in here too eventually.

ACK regardless

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]