mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 18:21:39 +01:00
domain. This allows us to refer to them using an import statement, rather than a from .. import. This is a step towards getting rid of the xroot hack. All other references to XendDomainInfo methods need to be doubly qualified (once for the module, once for the class). Remove XendDomainDict, replacing it with a simple dictionary, folding the get_by_name method into XendDomain. Replace XendDomain.refresh_lock with a domains_lock which goes around any reference to XendDomain.domains or anything that will create or destroy a domain. This serialises most accesses through XendDomain, ensuring that we will not return stale state when racing against the watches fired in separate threads. This should have fixed bugs #270 and #234. Added a number of domain_get_xyz methods. Those named xyz_nr are to allow components internal to XendDomain (XendDomainInfo, XendCheckpoint) to call back into XendDomain without triggering further calls to XendDomain.refresh. The other methods simply make it clear which fallback behaviour is expected. Replace XendDomainInfo.domain_exists with XendDomainInfo.domain_by_name; the internals of this method needed to change to match those changes above, and it has been a misnomer for some time. Signed-off-by: Ewan Mellor <ewan@xensource.com>