def _update_replication_relationship_status(self, ctxt):
    filters = {'replication_status': ['active', 'copying', 'error', 'active-stopped', 'inactive']}
    volumes = self.db.volume_get_all_by_host(ctxt, self.host, filters=filters)
    for vol in volumes:
        model_update = None
        try:
            model_update = self.driver.get_replication_status(ctxt, vol)
            if model_update:
                self.db.volume_update(ctxt, vol['id'], model_update)
        except Exception:
            LOG.exception(_LE('Get replication status for volume failed.'), resource=vol)
def _update_replication_relationship_status(self, ctxt):
    filters = {'replication_status': ['active', 'copying', 'error', 'active-stopped', 'inactive']}
    volumes = self.db.volume_get_all_by_host(ctxt, self.host, filters=filters)
    for vol in volumes:
        model_update = None
        try:
            model_update = self.driver.get_replication_status(ctxt, vol)
            if model_update:
                self.db.volume_update(ctxt, vol['id'], model_update)
        except Exception:
            LOG.exception(_LE('Get replication status for volume failed.'), resource=vol)