'Attach volumes to an instance.'

def _attach_volume(self):

    volume_id_list = []
    for index in range(3):
        vol = {}
        vol['size'] = 0
        vol_ref = db.volume_create(self.context, vol)
        self.volume.create_volume(self.context, vol_ref)
        vol_ref = db.volume_get(self.context, vol_ref['id'])
        mountpoint = ('/dev/sd' + chr((ord('b') + index)))
        instance_uuid = '12345678-1234-5678-1234-567812345678'
        db.volume_attached(self.context, vol_ref['id'], instance_uuid, mountpoint)
        volume_id_list.append(vol_ref['id'])
    return volume_id_list
