@require_context
def volume_attachment_get_all_by_instance_uuid(context, instance_uuid):
 session = get_session()
 with session.begin():
  result = model_query(context, models.VolumeAttachment, session=session).filter_by(instance_uuid=instance_uuid).filter((models.VolumeAttachment.attach_status != fields.VolumeAttachStatus.DETACHED)).options(joinedload('volume')).all()
  return result

@ require_context def volume_attachment_get_all_by_instance_uuid ( context , instance_uuid ) : session = get_session ( ) with session . begin ( ) : result = model_query ( context , models . VolumeAttachment , session = session ) . filter_by ( instance_uuid = instance_uuid ) . filter ( ( models . VolumeAttachment . attach_status != fields . VolumeAttachStatus . DETACHED ) ) . options ( joinedload ( 'volume' ) ) . all ( ) return result
fetch all attachment records associated with the specified instance .