Browse Source

Merge "Autogenerate container name correctly for vol backup" into stable/newton

Jenkins 2 years ago
parent
commit
7248773029
1 changed files with 4 additions and 1 deletions
  1. 4
    1
      openstack_dashboard/api/cinder.py

+ 4
- 1
openstack_dashboard/api/cinder.py View File

@@ -616,9 +616,12 @@ def volume_backup_create(request,
616 616
                          container_name,
617 617
                          name,
618 618
                          description):
619
+    # need to ensure the container name is not an empty
620
+    # string, but pass None to get the container name
621
+    # generated correctly
619 622
     backup = cinderclient(request).backups.create(
620 623
         volume_id,
621
-        container=container_name,
624
+        container=container_name if container_name else None,
622 625
         name=name,
623 626
         description=description)
624 627
     return VolumeBackup(backup)

Loading…
Cancel
Save