On Wed, May 20, 2009 at 01:10:36PM +0200, Chris Lalancette wrote:
Daniel P. Berrange wrote:
> I think there is an argument for adding an explicit API
>
> virDomainIsPersistent(virDomainPtr)
>
> to allow an app to determine whether it has a config or not. Even if
> the mgmt tool did not set the 'VIR_MIGRATE_PERSISTENT' flag, they
> may still need to find out whether it is persistent or not.
Yeah, true, although maybe we want a call that is a bit more general. Something
like "virDomainProperties()", one of which is whether it is persistent or not.
Yeah, I though about this after my own reply. For example a domain
may have been created outside of libvirt, that's yet another case,
it may be persistant but in another framework.
The problen is that such an API start to step onto virDomainDumpXML
which exposes an awful lot of existing domain properties...
Maybe virDomainIsPersistent with return values yes/no/unknown ...
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit
http://xmlsoft.org/
daniel(a)veillard.com | Rpmfind RPM search engine
http://rpmfind.net/
http://veillard.com/ | virtualization library
http://libvirt.org/