Setting GVirConfigDomain::virt_type is required for a working domain configuration, using it in the test programs will be helpful if people are using this as a base when starting to use libvirt-gconfig --- examples/config-demo.py | 1 + libvirt-gconfig/tests/test-domain-create.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/examples/config-demo.py b/examples/config-demo.py index 508bbc5..268c439 100644 --- a/examples/config-demo.py +++ b/examples/config-demo.py @@ -3,6 +3,7 @@ from gi.repository import LibvirtGConfig; domain = LibvirtGConfig.Domain.new() +domain.set_virt_type(LibvirtGConfig.DomainVirtType.KVM) domain.set_name("foo") domain.set_memory(1024*1024) # 1 GB domain.set_vcpus(2) diff --git a/libvirt-gconfig/tests/test-domain-create.c b/libvirt-gconfig/tests/test-domain-create.c index 20fedc5..e30f643 100644 --- a/libvirt-gconfig/tests/test-domain-create.c +++ b/libvirt-gconfig/tests/test-domain-create.c @@ -111,6 +111,9 @@ int main(int argc, char **argv) domain = gvir_config_domain_new(); g_assert(domain != NULL); + + gvir_config_domain_set_virt_type(domain, GVIR_CONFIG_DOMAIN_VIRT_KVM); + g_assert(gvir_config_domain_get_virt_type(domain) == GVIR_CONFIG_DOMAIN_VIRT_KVM); gvir_config_domain_set_name(domain, "foo"); g_str_const_check(gvir_config_domain_get_name(domain), "foo"); -- 1.8.1.4 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list