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

This commit is contained in:
Jenkins 2017-01-26 20:45:01 +00:00 committed by Gerrit Code Review
commit 7248773029
1 changed files with 4 additions and 1 deletions

View File

@ -616,9 +616,12 @@ def volume_backup_create(request,
container_name, container_name,
name, name,
description): 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( backup = cinderclient(request).backups.create(
volume_id, volume_id,
container=container_name, container=container_name if container_name else None,
name=name, name=name,
description=description) description=description)
return VolumeBackup(backup) return VolumeBackup(backup)