Autogenerate container name correctly for vol backup
The volume backup code is passing '' as a default container name,
which will cause cinder/swift to fail.   If no container name is provided,
the default value of None will enable the auto creation of a container correctly.
Closes-Bug:
@@ -669,9 +669,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)
