VMware: fix crash when VC driver boots

Commit 1deb31f85a caused the driver to break.
This adds the missing method.

Change-Id: Iaf7e33a868724efdcb13fdd9ba1c74b92d2e6210
Closes-bug: #1355875
This commit is contained in:
Gary Kotton 2014-08-12 07:58:54 -07:00 committed by Davanum Srinivas
parent cf02ce309b
commit d8a18d72e0
1 changed files with 5 additions and 0 deletions

View File

@ -164,6 +164,11 @@ class VMwareVCDriver(driver.ComputeDriver):
self._volumeops = self._resources.get(first_cluster).get('volumeops')
self._vc_state = self._resources.get(first_cluster).get('vcstate')
def init_host(self, host):
vim = self._session.vim
if vim is None:
self._session._create_session()
def cleanup(self, context, instance, network_info, block_device_info=None,
destroy_disks=True, migrate_data=None, destroy_vifs=True):
"""Cleanup after instance being destroyed by Hypervisor."""