Fix profile list tricky errors

Passing keyword arguments is different from passing positional
arguments. This patch fixes the behavior of profile listing so that the
default 'marker' argument from python-openstacksdk is always respected.
This commit is contained in:
tengqm
2015-01-26 20:37:25 +08:00
parent 8aa7e32667
commit c6b1b4b1b8
4 changed files with 16 additions and 13 deletions

View File

@@ -205,8 +205,9 @@ def profile_get(context, profile_id):
def profile_get_all(context, limit=None, marker=None, sort_keys=None,
sort_dir=None, filters=None, show_deleted=False):
return IMPL.profile_get_all(context, limit, marker, sort_keys,
sort_dir, filters, show_deleted)
return IMPL.profile_get_all(context, limit=limit, marker=marker,
sort_keys=sort_keys, sort_dir=sort_dir,
filters=filters, show_deleted=show_deleted)
def profile_update(context, profile_id, values):

View File

@@ -544,15 +544,11 @@ def profile_get(context, profile_id):
return profile
def _query_profile_get_all(context, show_deleted=False):
query = soft_delete_aware_query(context, models.Profile,
show_deleted=show_deleted)
return query
def profile_get_all(context, limit=None, marker=None, sort_keys=None,
sort_dir=None, filters=None, show_deleted=False):
query = _query_profile_get_all(context, show_deleted=show_deleted)
query = soft_delete_aware_query(context, models.Profile,
show_deleted=show_deleted)
if filters is None:
filters = {}