'Initializer.'

def __init__(self, session, virtapi, volumeops, cluster=None, datastore_regex=None):

    self.compute_api = compute.API()
    self._session = session
    self._virtapi = virtapi
    self._volumeops = volumeops
    self._cluster = cluster
    self._root_resource_pool = vm_util.get_res_pool_ref(self._session, self._cluster)
    self._datastore_regex = datastore_regex
    self._base_folder = self._get_base_folder()
    self._tmp_folder = 'vmware_temp'
    self._datastore_browser_mapping = {}
    self._imagecache = imagecache.ImageCacheManager(self._session, self._base_folder)
    self._network_api = network.API()
