
I'm sorry Daisy - I'm not sure I understand what you mean here. Are you saying that run_remote_guest() needs to stay in
libvirt-cim-bounces@redhat.com wrote on 2008-11-05 00:11:49: lib/VirtLib/utils.py?
Yeah, I want to say that run_remote_guest() needs to stay in lib/VirtLib/utils.py. It because that lib/VirtLib/live.py have to call run_remote_guest(), such as below function in live.py:
def processors_count(ip, vs_name): """Returns the number of processors of the specified VS """
guest_cmd = "grep '^$' /proc/cpuinfo | wc -l"
rc, out = utils.run_remote_guest(ip, vs_name, guest_cmd) if rc != 0: return -1
try: cpus = int(out) return cpus except ValueError: return -1
If we move it to /libvirt-cim/lib/XenKvmLib/xm_virt_util.py, how does live.py work?
Oh, I see. I had missed this before when we discussed what functions should be moved. Any function that is run within the guest should also be moved.
So the following should be moved to libvirt-cim/lib/XenKvmLib/xm_virt_util.p:
processors_count() memory_count() network_macs()
I had originally thought these were running on the host, not within the guest. Sorry for the confusion!
I have moved below functions to xm_virt_util.py: processors_count() memory_count() network_macs() run_remote_guest() So far, this work item is done. I'm going to fix the test failure. Thoughts? Thanks!
-- Kaitlin Rupert IBM Linux Technology Center kaitlin@linux.vnet.ibm.com
_______________________________________________ Libvirt-cim mailing list Libvirt-cim@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-cim