[Libvirt-cim] [PATCH 1 of 2] Add function to poll for a guest
Dan Smith
danms at us.ibm.com
Fri Aug 1 15:03:31 UTC 2008
KR> +def check_virsh_poll(ip, virt, dom_name):
KR> + cs = None
KR> +
KR> + dom_list = domain_list(ip, virt)
KR> + if dom_name in dom_list:
KR> + timeout = 10
KR> +
KR> + for i in range(0, timeout):
KR> + rc, cs = get_cs_instance(dom_name, ip, virt)
KR> + if rc == 0:
KR> + return cs
KR> +
KR> + sleep(1)
KR> +
KR> + return cs
How many iterations does this normally have to go through to get fresh
data?
I suppose it's a reasonable band-aid for now.
--
Dan Smith
IBM Linux Technology Center
Open Hypervisor Team
email: danms at us.ibm.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvirt-cim/attachments/20080801/41ce001b/attachment.sig>
More information about the Libvirt-cim
mailing list