[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] [XEND] Fix outputting device SXPs when domain is halted.
# HG changeset patch # User Alastair Tse <atse@xxxxxxxxxxxxx> # Node ID c4225c95dbcd8956ff88d088d04c30009c887cc8 # Parent 5c82a274733e1cc9effda2fb0154d2bb40501808 [XEND] Fix outputting device SXPs when domain is halted. Signed-off-by: Alastair Tse <atse@xxxxxxxxxxxxx> --- tools/python/xen/xend/XendConfig.py | 2 +- tools/python/xen/xend/XendDomainInfo.py | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff -r 5c82a274733e -r c4225c95dbcd tools/python/xen/xend/XendConfig.py --- a/tools/python/xen/xend/XendConfig.py Fri Dec 01 15:45:59 2006 +0000 +++ b/tools/python/xen/xend/XendConfig.py Fri Dec 01 16:31:36 2006 +0000 @@ -964,7 +964,7 @@ class XendConfig(dict): sxprs = [] pci_devs = [] - if 'devices' in self: + if 'devices' not in self: return sxprs for dev_type, dev_info in self['devices'].values(): diff -r 5c82a274733e -r c4225c95dbcd tools/python/xen/xend/XendDomainInfo.py --- a/tools/python/xen/xend/XendDomainInfo.py Fri Dec 01 15:45:59 2006 +0000 +++ b/tools/python/xen/xend/XendDomainInfo.py Fri Dec 01 16:31:36 2006 +0000 @@ -580,8 +580,18 @@ class XendDomainInfo: return self.getDeviceController(deviceClass).destroyDevice(devid) + def getDeviceSxprs(self, deviceClass): - return self.getDeviceController(deviceClass).sxprs() + if self.state == DOM_STATE_RUNNING: + return self.getDeviceController(deviceClass).sxprs() + else: + sxprs = [] + dev_num = 0 + for dev_type, dev_info in self.info.all_devices_sxpr(): + if dev_type == deviceClass: + sxprs.append([dev_num, dev_info]) + dev_num += 1 + return sxprs def setMemoryTarget(self, target): _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |