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

[libvirt] [libvirt-glib 27/37] Add <network> to creation test



---
 libvirt-gconfig/tests/test-domain-create.c |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/libvirt-gconfig/tests/test-domain-create.c b/libvirt-gconfig/tests/test-domain-create.c
index db22eb5..3f3f973 100644
--- a/libvirt-gconfig/tests/test-domain-create.c
+++ b/libvirt-gconfig/tests/test-domain-create.c
@@ -83,7 +83,7 @@ int main(void)
     devices = NULL;
     gvir_config_domain_set_os(domain, os);
 
-    /* device node */
+    /* disk node */
     GVirConfigDeviceDisk *disk;
 
     disk = gvir_config_device_disk_new();
@@ -96,6 +96,17 @@ int main(void)
     gvir_config_device_disk_set_target_dev(disk, "hda");
 
     devices = g_list_append(devices, disk);
+
+    /* network interface node */
+    GVirConfigInterface *interface;
+
+
+    interface = gvir_config_interface_new();
+    gvir_config_interface_set_network_type(interface,
+                                           GVIR_CONFIG_INTERFACE_TYPE_NETWORK);
+    gvir_config_interface_set_source(interface, "default");
+    devices = g_list_append(devices, interface);
+
     gvir_config_domain_set_devices(domain, devices);
     g_list_free(devices);
     devices = NULL;
-- 
1.7.7


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