Cleanup references to Cinder API v1
Cinder API v1 was removed from Horizon in Rocky release. Change-Id: I6b64dcf797695d9a3eea892e6a5a4970f14cdd05
This commit is contained in:
parent
b3832334af
commit
51468ae21a
@ -338,7 +338,7 @@ def volume_list_paged(request, search_opts=None, marker=None, paginate=False,
|
|||||||
transfers = {t.volume_id: t
|
transfers = {t.volume_id: t
|
||||||
for t in transfer_list(request, search_opts=search_opts)}
|
for t in transfer_list(request, search_opts=search_opts)}
|
||||||
|
|
||||||
if VERSIONS.active > 1 and paginate:
|
if paginate:
|
||||||
page_size = utils.get_page_size(request)
|
page_size = utils.get_page_size(request)
|
||||||
# sort_key and sort_dir deprecated in kilo, use sort
|
# sort_key and sort_dir deprecated in kilo, use sort
|
||||||
# if pagination is true, we use a single sort parameter
|
# if pagination is true, we use a single sort parameter
|
||||||
@ -500,7 +500,7 @@ def volume_snapshot_list_paged(request, search_opts=None, marker=None,
|
|||||||
if c_client is None:
|
if c_client is None:
|
||||||
return snapshots, has_more_data, has_more_data
|
return snapshots, has_more_data, has_more_data
|
||||||
|
|
||||||
if VERSIONS.active > 1 and paginate:
|
if paginate:
|
||||||
page_size = utils.get_page_size(request)
|
page_size = utils.get_page_size(request)
|
||||||
# sort_key and sort_dir deprecated in kilo, use sort
|
# sort_key and sort_dir deprecated in kilo, use sort
|
||||||
# if pagination is true, we use a single sort parameter
|
# if pagination is true, we use a single sort parameter
|
||||||
@ -596,7 +596,6 @@ def volume_backup_list_paged_with_page_menu(request, page_number=1,
|
|||||||
if c_client is None:
|
if c_client is None:
|
||||||
return backups, 0, count, pages_count
|
return backups, 0, count, pages_count
|
||||||
|
|
||||||
if VERSIONS.active > 1:
|
|
||||||
offset = (page_number - 1) * page_size
|
offset = (page_number - 1) * page_size
|
||||||
sort = 'created_at:' + sort_dir
|
sort = 'created_at:' + sort_dir
|
||||||
bkps, count = c_client.backups.list(limit=page_size,
|
bkps, count = c_client.backups.list(limit=page_size,
|
||||||
@ -613,11 +612,6 @@ def volume_backup_list_paged_with_page_menu(request, page_number=1,
|
|||||||
backups.append(VolumeBackup(b))
|
backups.append(VolumeBackup(b))
|
||||||
|
|
||||||
return backups, page_size, count, pages_count
|
return backups, page_size, count, pages_count
|
||||||
else:
|
|
||||||
for b in c_client.backups.list():
|
|
||||||
backups.append(VolumeBackup(b))
|
|
||||||
|
|
||||||
return backups, 0, count, pages_count
|
|
||||||
|
|
||||||
|
|
||||||
@profiler.trace
|
@profiler.trace
|
||||||
@ -631,7 +625,7 @@ def volume_backup_list_paged(request, marker=None, paginate=False,
|
|||||||
if c_client is None:
|
if c_client is None:
|
||||||
return backups, has_more_data, has_prev_data
|
return backups, has_more_data, has_prev_data
|
||||||
|
|
||||||
if VERSIONS.active > 1 and paginate:
|
if paginate:
|
||||||
page_size = utils.get_page_size(request)
|
page_size = utils.get_page_size(request)
|
||||||
# sort_key and sort_dir deprecated in kilo, use sort
|
# sort_key and sort_dir deprecated in kilo, use sort
|
||||||
# if pagination is true, we use a single sort parameter
|
# if pagination is true, we use a single sort parameter
|
||||||
|
Loading…
Reference in New Issue
Block a user