diff options
| author | Édouard Thuleau <edouard1.thuleau@orange.com> | 2011-11-09 17:37:54 +0100 |
|---|---|---|
| committer | Édouard Thuleau <edouard1.thuleau@orange.com> | 2011-11-10 09:52:11 +0100 |
| commit | 1ecd70f23ae211c5c4ea5613adc24c0e1557790d (patch) | |
| tree | 6b9e7110d8603e574a779d5b79be50d38d1a28e8 /nova | |
| parent | 26d2bad187ba8fab4f5e4b2f76b86f3e8762caa8 (diff) | |
Bug #887805 Error during report_driver_status(): 'LibvirtConnection' object has no attribute '_host_state'
Fixes the host status reports from LibvirtConnection driver.
This fix initializes in class 'LibvirtConnection', the local variable
'_host_state' and replaces the variable 'session' by the local
variable 'read_only'.
Change-Id: Ia3ba29dc287c793c79a2bbde0d5ec69eb6ada480
Diffstat (limited to 'nova')
| -rw-r--r-- | nova/virt/libvirt/connection.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nova/virt/libvirt/connection.py b/nova/virt/libvirt/connection.py index a8a5caa01..31a386977 100644 --- a/nova/virt/libvirt/connection.py +++ b/nova/virt/libvirt/connection.py @@ -195,11 +195,12 @@ class LibvirtConnection(driver.ComputeDriver): driver_type, _sep, driver = driver_str.partition('=') driver_class = utils.import_class(driver) self.volume_drivers[driver_type] = driver_class(self) + self._host_state = None @property def host_state(self): if not self._host_state: - self._host_state = HostState(self._session) + self._host_state = HostState(self.read_only) return self._host_state def init_host(self, host): |
