Merge "Fixes inconsistency in flavors list with marker"

This commit is contained in:
Jenkins 2013-10-14 08:23:13 +00:00 committed by Gerrit Code Review
commit 5ccf8c4e5f
3 changed files with 3 additions and 3 deletions

View File

@ -4249,7 +4249,7 @@ def flavor_get_all(context, inactive=False, filters=None,
if marker is not None:
marker = _instance_type_get_query(context,
read_deleted=read_deleted).\
filter_by(id=marker).\
filter_by(flavorid=marker).\
first()
if not marker:
raise exception.MarkerNotFound(marker)

View File

@ -2615,7 +2615,7 @@ class InstanceTypeTestCase(BaseInstanceTypeTestCase):
all_flavors = db.flavor_get_all(self.ctxt)
# Set the 3rd result as the marker
marker_flavorid = all_flavors[2]['id']
marker_flavorid = all_flavors[2]['flavorid']
marked_flavors = db.flavor_get_all(self.ctxt, marker=marker_flavorid)
# We expect everything /after/ the 3rd result
expected_results = all_flavors[3:]

View File

@ -248,7 +248,7 @@ class InstanceTypeTestCase(test.TestCase):
all_flavors = flavors.get_all_flavors_sorted_list()
# Set the 3rd result as the marker
marker_flavorid = all_flavors[2]['id']
marker_flavorid = all_flavors[2]['flavorid']
marked_flavors = flavors.get_all_flavors_sorted_list(
marker=marker_flavorid)
# We expect everything /after/ the 3rd result