'Update the current state of the cluster.'

def update_status(self):

    data = {}
    try:
        (capacity, freespace) = _get_ds_capacity_and_freespace(self._session, self._cluster, self._datastore_regex)
        stats = vm_util.get_stats_from_cluster(self._session, self._cluster)
        about_info = self._session._call_method(vim_util, 'get_about_info')
    except (vexc.VimConnectionException, vexc.VimAttributeException) as ex:
        LOG.warning('Failed    to    connect    with    %(node)s.    Error:    %(error)s', {'node': self._host_name, 'error': ex})
        self._set_host_enabled(False)
        return data
    data['vcpus'] = stats['vcpus']
    data['disk_total'] = (capacity / units.Gi)
    data['disk_available'] = (freespace / units.Gi)
    data['disk_used'] = (data['disk_total'] - data['disk_available'])
    data['host_memory_total'] = stats['mem']['total']
    data['host_memory_free'] = stats['mem']['free']
    data['hypervisor_type'] = about_info.name
    data['hypervisor_version'] = versionutils.convert_version_to_int(str(about_info.version))
    data['hypervisor_hostname'] = self._host_name
    data['supported_instances'] = [(obj_fields.Architecture.I686, obj_fields.HVType.VMWARE, obj_fields.VMMode.HVM), (obj_fields.Architecture.X86_64, obj_fields.HVType.VMWARE, obj_fields.VMMode.HVM)]
    self._stats = data
    if self._auto_service_disabled:
        self._set_host_enabled(True)
    return data
