'Wrapper utility that returns a test backup.'

def create_backup(self, volume_id, backup_client=None, **kwargs):

    if (backup_client is None):
        backup_client = self.backups_client
    if ('name' not in kwargs):
        name = data_utils.rand_name((self.__class__.__name__ + '-Backup'))
        kwargs['name'] = name
    backup = backup_client.create_backup(volume_id=volume_id, **kwargs)['backup']
    self.addCleanup(backup_client.delete_backup, backup['id'])
    waiters.wait_for_volume_resource_status(backup_client, backup['id'], 'available')
    return backup
