]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Filter hosts with pool in snapshot_get_by_host
authorIvan Kolodyazhny <e0ne@e0ne.info>
Wed, 9 Sep 2015 13:59:55 +0000 (16:59 +0300)
committerIvan Kolodyazhny <e0ne@e0ne.info>
Wed, 9 Sep 2015 14:37:56 +0000 (17:37 +0300)
commitcf3cfb3a66066cfdc1ad15ac35b204d4a7b0301f
tree4fc237bdff569de594a98f87a80a8454850c2c85
parentde64f5ad716676b7180365798efc3ea69a4fef0e
Filter hosts with pool in snapshot_get_by_host

Snapshots use host field from the volume record. We need to ignore pool
if it is not specified in a host param for snapshot_get_by_host method.

Also snapshot_get_by_host will return empty list if host is None or an
empty string like a volume filer does.

Change-Id: I0d9eef8675d8dada3a0b6886dbb3f5807eecee73
Closes-Bug: #1493856
cinder/db/sqlalchemy/api.py
cinder/tests/unit/test_db_api.py