'Create a volume object.'

def _create_volume(self, ctxt=None, display_name=None, project_id=None):

    ctxt = (ctxt or self.ctxt)
    volume = objects.Volume(ctxt)
    volume.display_name = display_name
    volume.project_id = project_id
    volume.status = 'available'
    volume.attach_status = 'attached'
    volume.create()
    return volume
