Re: [PATCH 09/27] conf: introduce virNetworkPortDefPtr struct and XML support

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

 



On 12/24/18 3:58 PM, Daniel P. Berrangé wrote:
> Introduce a virNetworkPortDefPtr struct to represent the data associated
> with a virtual network port. Add APIs for parsing/formatting XML docs
> with the data.
> 
> Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
> ---
>  src/conf/Makefile.inc.am                      |   2 +
>  src/conf/virnetworkportdef.c                  | 497 ++++++++++++++++++
>  src/conf/virnetworkportdef.h                  | 112 ++++
>  src/libvirt_private.syms                      |  10 +
>  tests/Makefile.am                             |   7 +
>  .../plug-bridge-mactbl.xml                    |   9 +
>  .../virnetworkportxml2xmldata/plug-bridge.xml |   9 +
>  .../virnetworkportxml2xmldata/plug-direct.xml |  12 +
>  .../plug-hostdev-pci.xml                      |  12 +
>  tests/virnetworkportxml2xmldata/plug-none.xml |   8 +
>  tests/virnetworkportxml2xmltest.c             | 104 ++++
>  11 files changed, 782 insertions(+)
>  create mode 100644 src/conf/virnetworkportdef.c
>  create mode 100644 src/conf/virnetworkportdef.h
>  create mode 100644 tests/virnetworkportxml2xmldata/plug-bridge-mactbl.xml
>  create mode 100644 tests/virnetworkportxml2xmldata/plug-bridge.xml
>  create mode 100644 tests/virnetworkportxml2xmldata/plug-direct.xml
>  create mode 100644 tests/virnetworkportxml2xmldata/plug-hostdev-pci.xml
>  create mode 100644 tests/virnetworkportxml2xmldata/plug-none.xml
>  create mode 100644 tests/virnetworkportxml2xmltest.c

This breaks syntax-check. Squash this in to fix it:

diff --git i/src/conf/virnetworkportdef.c w/src/conf/virnetworkportdef.c
index 12b5f086ab..067f9afaaa 100644
--- i/src/conf/virnetworkportdef.c
+++ w/src/conf/virnetworkportdef.c
@@ -232,7 +232,7 @@ virNetworkPortDefParseXML(xmlXPathContextPtr ctxt)
                            _("Missing network port PCI address"));
             goto error;
         }
-        
+
         if (virPCIDeviceAddressParseXML(addressNode, &def->plug.hostdevpci.addr) < 0)
             goto error;
         break;
@@ -243,7 +243,7 @@ virNetworkPortDefParseXML(xmlXPathContextPtr ctxt)
         goto error;
     }
 
-cleanup:
+ cleanup:
     VIR_FREE(uuid);
     VIR_FREE(plugtype);
     VIR_FREE(mac);
diff --git i/tests/virnetworkportxml2xmltest.c w/tests/virnetworkportxml2xmltest.c
index b737973c5e..bb0ae8a8d5 100644
--- i/tests/virnetworkportxml2xmltest.c
+++ w/tests/virnetworkportxml2xmltest.c
@@ -1,5 +1,5 @@
 /*
- * virnetworkportdeftest.c: network port XML processing test suite
+ * virnetworkportxml2xmltest.c: network port XML processing test suite
  *
  * Copyright (C) 2018 Red Hat, Inc.
  *


Michal

--
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]

  Powered by Linux