|
|
|
|
|
|
|
|
|
|
xen-cim
Re: [Xen-cim] Feedback needed for libvirt new APIs
On Thu, Apr 20, 2006 at 02:07:43PM -0600, Jim Fehlig wrote:
> Daniel Veillard wrote:
>
> > Hi,
> >
> >could you check that the suggested APIs there are enough to implement that
> >notion of defined but not running domains needed for CIM ?
> > https://www.redhat.com/archives/libvir-list/2006-April/msg00043.html
> >
> >
>
> Looks good. I do have a question about the following point:
okidoc :-)
> - new state for defined non-running domains showing in virNodeGetInfo
>
> virDomainState enumeration contains VIR_DOMAIN_SHUTOFF. Looking at the
> code I see that this value gets assigned to state field in virDomainInfo
> structure when xend claims the vm is dying. Should there be a more
> explicit state for dying? It seems like VIR_DOMAIN_SHUTOFF would be
> more appropriate for the "defined but not running" vm state, although I
> have no problem with VIR_DOMAIN_[POWERED_OFF | NOT_RUNNING | INACTIVE |
> DISABLED].
Hum, right, VIR_DOMAIN_NOTRUNNING or VIR_DOMAIN_INACTIVE would be fine
VIR_DOMAIN_SHUTOFF is a bit confusing now, I will have to make this clearer,
and add a state diagram to the docs (and specific regression tests)
> The XML will have to expand (as discussed previously) to accommodate
> other guest types, e.g. hvm guests. Also, I like the virDomainCreate()
> API. Not sure how you want to handle creating hvm guests without first
> defining. Currently the API is virDomainCreateLinux(), which is only
> restrictive in its name assuming the implementation could parse xmlDesc
> parameter containing hvm config.
Well virDomainCreate() should also be used when we get able to bypass the
XML layer at some point in the future, since it operate with an internal
struct argument it will be a matter of designing new APIs returning those.
virDomainCreateLinux() obviously is a kind of shortcut and less generic,
I may rename it (but keep compatibility as virDomainCreateFromXML() or something
or just keep the name and document the legacy naming :-)
Daniel
--
Daniel Veillard | Red Hat http://redhat.com/
veillard@xxxxxxxxxx | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
_______________________________________________
Xen-cim mailing list
Xen-cim@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-cim
|
|
|
|
|