[Libvirt-cim] [PATCH] [TEST] Add the emulator to the guest created by LXC cimtest
Kaitlin Rupert
kaitlin at linux.vnet.ibm.com
Thu Nov 19 01:10:33 UTC 2009
> diff -r f834593694d2 -r 815eeee7df1d suites/libvirt-cim/lib/XenKvmLib/vxml.py
> --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Wed Nov 18 17:24:36 2009 -0200
> +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Wed Nov 18 17:42:15 2009 -0200
> @@ -987,7 +987,7 @@
> mem, const.default_mallocunits, None, grstype,
> address, port_num, keymap, irstype, btype, vnc_passwd)
> self._os(const.LXC_init_path)
> - self._devices(mac, ntype, net_name, const.LXC_default_tty)
> + self._devices(const.LXC_default_emulator, mac, ntype, net_name, const.LXC_default_tty)
I would modify the __init__ function of LXCXML to accept an emulator
param. We do something similar with KVM. This provides the option for
specifying other emulators (which might be useful in the future, or
useful for testing negative test cases).
> self.create_lxc_file(CIM_IP, const.LXC_init_path)
>
> def _os(self, os_init):
> @@ -995,9 +995,11 @@
> self.add_sub_node(os, 'init', os_init)
> self.add_sub_node(os, 'type', 'exe')
>
> - def _devices(self, net_mac, net_type, net_name, tty_set):
> + def _devices(self, emu, net_mac, net_type, net_name, tty_set):
> devices = self.get_node('/domain/devices')
> -
> +
> + self.add_sub_node(devices, 'emulator', emu) #'/usr/libexec/libvirt_lxc')
Can you remove the comment here? If we change the value of the emulator
in const.py, it's likely the comment won't get updated.
> +
> if const.LXC_netns_support is True:
> self.set_interface_details(devices, net_mac, net_type,
> net_name, 'LXC')
>
--
Kaitlin Rupert
IBM Linux Technology Center
kaitlin at linux.vnet.ibm.com
More information about the Libvirt-cim
mailing list