'Update the per-service capabilities based on this notification.'

def update_service_capabilities(self, service_name, host, capabilities, cluster_name, timestamp):

    if (service_name != 'volume'):
        LOG.debug('Ignoring    %(service_name)s    service    update    from    %(host)s', {'service_name': service_name, 'host': host})
        return
    timestamp = (timestamp or timeutils.utcnow())
    capab_copy = dict(capabilities)
    capab_copy['timestamp'] = timestamp
    backend = (cluster_name or host)
    capab_old = self.service_states.get(backend, {'timestamp': 0})
    capab_last_update = self.service_states_last_update.get(backend, {'timestamp': 0})
    if (capab_old['timestamp'] and (timestamp < capab_old['timestamp'])):
        LOG.info('Ignoring    old    capability    report    from    %s.', backend)
        return
    if ((not self._get_updated_pools(capab_old, capab_copy)) and ((not capab_old.get('timestamp')) or (not capab_last_update.get('timestamp')) or (capab_last_update['timestamp'] < capab_old['timestamp']))):
        self.service_states_last_update[backend] = capab_old
    self.service_states[backend] = capab_copy
    cluster_msg = (('Cluster:    %s    -    Host:    ' % cluster_name) if cluster_name else '')
    LOG.debug('Received    %(service_name)s    service    update    from    %(cluster)s%(host)s:    %(cap)s%(cluster)s', {'service_name': service_name, 'host': host, 'cap': capabilities, 'cluster': cluster_msg})
    self._no_capabilities_backends.discard(backend)
