Dan Smith wrote:
# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1200504975 28800
# Node ID 81149ab841550817357e38e7d6c88c3049a0fd32
# Parent c505a88eb5e25f5e3b2418312dc48b6602857946
Fix KVM network xml to use virtual network type
...and default the network name for now.
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
+
+static bool net_to_xml(char **xml, struct virt_device *dev)
+{
+ if (STREQ(dev->dev.net.type, "network"))
+ return kvm_net_to_xml(xml, dev);
+ else if (STREQ(dev->dev.net.type, "bridge"))
+ return xen_net_to_xml(xml, dev);
+ else
+ return false;
}
static bool vcpu_to_xml(char **xml, struct virt_device *dev)
Is making the Xen/KVM distinction on network type safe? (That's not a
rhetorical way of saying I don't think it is, this is just something I
have basically no info on.)
--
-Jay