[libvirt] [RFC] API vs XML

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

 



Hi,


In my previous email Daniel made clear that for many functions it is
preferable to have access to the XML output. I would like to know what the
general opinion is about defining a domain.

I can understand that people don't mind to define a domain manually or
with tools and pump it inside libvirt with the virDomainDefineXML call.


But why are the XML tree manipulating features not incorporated into the
API? Slightly more 'semantics based' than Attach/Detach Device. Allowing
to specify the information that is going into the XML.

So for example:
domainptr = virDomainDefine(name)
virDomainSetName(domainptr, name)
virDomainSetBootloader(domainptr, path)
virDomainSetOS(domainptr, type)
virDomainSetMemory(domainptr, amount, live)
virDomainSetVCPU(domainptr, amount, live)
virDomainAttachDisk(domainptr, type, sourceptr, targetptr, live)
virDomainDetachDevice(domainptr, deviceptr, live)

I know there are people that love XML here, but can someone give a
reasonable statement why not to support the above? (More clean, less
parsing)


Stefan

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