'Basic cache include test filtering by host and with full rename.'

@ddt.data('host1@backend1#pool1', 'host1@backend1')
def test_cache_entry_include_in_cluster_by_host(self, host):

    image_updated_at = datetime.datetime.utcnow()
    image_cache = (db.image_volume_cache_create(self.ctxt, 'host1@backend1#pool1', 'cluster1@backend1#pool1', 'image-1', image_updated_at, 'vol-1', 6), db.image_volume_cache_create(self.ctxt, 'host1@backend2#pool2', 'cluster1@backend2#pool2', 'image-2', image_updated_at, 'vol-2', 6), db.image_volume_cache_create(self.ctxt, 'host2@backend#pool', 'cluster2@backend#pool', 'image-3', image_updated_at, 'vol-3', 6))
    cluster_name = 'my_cluster'
    result = db.image_volume_cache_include_in_cluster(self.ctxt, cluster_name, partial_rename=False, host=host)
    self.assertEqual(1, result)
    db_image_cache = db.image_volume_cache_get_by_volume_id(self.ctxt, image_cache[0].volume_id)
    self.assertEqual(cluster_name, db_image_cache.cluster_name)
