summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-01-26 20:45:01 +0000
committerGerrit Code Review <review@openstack.org>2017-01-26 20:45:01 +0000
commit72487730297c5182bb4478f980f23fdf58994341 (patch)
tree4a79835c9b520a230b41590c815d80d3308c320e
parent8d9665302ae1b2abd772843483ce14ade4659c6d (diff)
parent3238dc0738952b54871d214fbddbe1b33ed9fc84 (diff)
downloadhorizon-10.0.2.tar.gz
Merge "Autogenerate container name correctly for vol backup" into stable/newton10.0.2
-rw-r--r--openstack_dashboard/api/cinder.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/openstack_dashboard/api/cinder.py b/openstack_dashboard/api/cinder.py
index cfd17386d..43864627d 100644
--- a/openstack_dashboard/api/cinder.py
+++ b/openstack_dashboard/api/cinder.py
@@ -616,9 +616,12 @@ def volume_backup_create(request,
container_name,
name,
description):
+ # need to ensure the container name is not an empty
+ # string, but pass None to get the container name
+ # generated correctly
backup = cinderclient(request).backups.create(
volume_id,
- container=container_name,
+ container=container_name if container_name else None,
name=name,
description=description)
return VolumeBackup(backup)