'Attach a volume to a server'

def attach_volume(self, server_id, volume_id):

    self.servers_client.attach_volume(server_id, volumeId=volume_id, device=('/dev/%s' % CONF.compute.volume_device_name))
    waiters.wait_for_volume_resource_status(self.volumes_client, volume_id, 'in-use')
    self.addCleanup(waiters.wait_for_volume_resource_status, self.volumes_client, volume_id, 'available')
    self.addCleanup(self.servers_client.detach_volume, server_id, volume_id)
