'This test case attempts to reproduce the following steps:
* Create in Cinder some bootable volume importing a Glance image
* Boot an instance from the bootable volume
* Write content to the volume
* Delete an instance and Boot a new instance from the volume
* Check written content in the instance
* Create a volume snapshot while the instance is running
* Boot an additional instance from the new snapshot based volume
* Check written content in the instance booted from snapshot'

@decorators.idempotent_id('557cd2c2-4eb8-4dce-98be-f86765ff311b')
@testtools.skipUnless(CONF.network.public_network_id, 'The    public_network_id    option    must    be    specified.')
@test.services('compute', 'volume', 'image')
def test_volume_boot_pattern(self):

    LOG.info('Creating    keypair    and    security    group')
    keypair = self.create_keypair()
    security_group = self._create_security_group()
    LOG.info('Booting    instance    1    from    volume')
    volume_origin = self._create_volume_from_image()
    instance_1st = self._boot_instance_from_resource(source_id=volume_origin['id'], source_type='volume', keypair=keypair, security_group=security_group)
    LOG.info('Booted    first    instance:    %s', instance_1st)
    LOG.info('Setting    timestamp    in    instance    %s', instance_1st)
    ip_instance_1st = self.get_server_ip(instance_1st)
    timestamp = self.create_timestamp(ip_instance_1st, private_key=keypair['private_key'])
    LOG.info('Deleting    first    instance:    %s', instance_1st)
    self._delete_server(instance_1st)
    instance_2nd = self._boot_instance_from_resource(source_id=volume_origin['id'], source_type='volume', keypair=keypair, security_group=security_group)
    LOG.info('Booted    second    instance    %s', instance_2nd)
    LOG.info('Getting    timestamp    in    instance    %s', instance_2nd)
    ip_instance_2nd = self.get_server_ip(instance_2nd)
    timestamp2 = self.get_timestamp(ip_instance_2nd, private_key=keypair['private_key'])
    self.assertEqual(timestamp, timestamp2)
    LOG.info('Creating    snapshot    from    volume:    %s', volume_origin['id'])
    snapshot = self.create_volume_snapshot(volume_origin['id'], force=True)
    LOG.info('Creating    third    instance    from    snapshot:    %s', snapshot['id'])
    volume = self.create_volume(snapshot_id=snapshot['id'], size=snapshot['size'])
    LOG.info('Booting    third    instance    from    snapshot')
    server_from_snapshot = self._boot_instance_from_resource(source_id=volume['id'], source_type='volume', keypair=keypair, security_group=security_group)
    LOG.info('Booted    third    instance    %s', server_from_snapshot)
    LOG.info('Logging    into    third    instance    to    get    timestamp:    %s', server_from_snapshot)
    server_from_snapshot_ip = self.get_server_ip(server_from_snapshot)
    timestamp3 = self.get_timestamp(server_from_snapshot_ip, private_key=keypair['private_key'])
    self.assertEqual(timestamp, timestamp3)
