[libvirt] [PATCH 1/3] network: fix typos and docs

Guannan Ren gren at redhat.com
Thu Jan 3 07:13:04 UTC 2013


---
 docs/formatdomain.html.in | 9 ++++++---
 src/conf/domain_conf.c    | 4 ++--
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 94df6f8..45d7593 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -2546,12 +2546,15 @@
       virtualport types (and also to leave out certain attributes); at
       domain startup time, a complete <code><virtualport></code>
       element will be constructed by merging together the type and
-      attributes found in the which will be filled in from the network
-      or portgroup <code><virtualport></code>)
+      attributes defined in the network and the portgroup referenced
+      by the interface. The newly-constructed virtualport is a combination
+      of them. The attributes from lower virtualport can't make change
+      to the ones defined in higher virtualport.
+      Interface takes the highest priority, portgroup is lowest priority.
       (<span class="since">Since 0.10.0</span>). For example, in order
       to work properly with both an 802.1Qbh switch and an Open vSwitch
       switch, you may choose to specify no type, but both
-      an <code>instanceid</code> (in case the switch is 802.1Qbh) and
+      an <code>profileid</code> (in case the switch is 802.1Qbh) and
       an <code>interfaceid</code> (in case the switch is Open vSwitch)
       (you may also omit the other attributes, such as managerid,
       typeid, or profileid, to be filled in from the
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 79af087..70c1ee7 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -4994,7 +4994,7 @@ virDomainNetDefParseXML(virCapsPtr caps,
                        def->type == VIR_DOMAIN_NET_TYPE_INTERNAL &&
                        xmlStrEqual(cur->name, BAD_CAST "source")) {
                 internal = virXMLPropString(cur, "name");
-            } else if (!network &&
+            } else if (!bridge &&
                        def->type == VIR_DOMAIN_NET_TYPE_BRIDGE &&
                        xmlStrEqual(cur->name, BAD_CAST "source")) {
                 bridge = virXMLPropString(cur, "bridge");
@@ -5028,7 +5028,7 @@ virDomainNetDefParseXML(virCapsPtr caps,
                                      " <interface type='%s'>"), type);
                     goto error;
                 }
-            } else if (!network &&
+            } else if (!address &&
                        (def->type == VIR_DOMAIN_NET_TYPE_SERVER ||
                         def->type == VIR_DOMAIN_NET_TYPE_CLIENT ||
                         def->type == VIR_DOMAIN_NET_TYPE_MCAST) &&
-- 
1.7.11.4




More information about the libvir-list mailing list