'Ensure the \'Snapshot\' deletion policy works.
This requires a more complex test, but it tests several aspects
of the heat cinder resources:
1. Create a volume, attach it to an instance, write some data to it
2. Delete the stack, with \'Snapshot\' specified, creates a backup
3. Check the snapshot has created a volume backup
4. Create a new stack, where the volume is created from the backup
5. Verify the test data written in (1) is present in the new volume'

def test_cinder_volume_create_backup_restore(self):

    parameters = {'key_name': self.keypair_name, 'instance_type': self.conf.minimal_instance_type, 'image_id': self.conf.minimal_image_ref, 'volume_description': self.volume_description, 'timeout': self.conf.build_timeout, 'network': self.net['id']}
    stack_id = self.launch_stack(template_name='test_volumes_delete_snapshot.yaml', parameters=parameters, add_parameters={'volume_size': self.volume_size})
    self.check_stack(stack_id, parameters)
