def find_sr_from_vdi(session, vdi_ref):
 try:
  sr_ref = session.call_xenapi('VDI.get_SR', vdi_ref)
 except session.XenAPI.Failure:
  LOG.exception(_LE('Unable to find SR from VDI'))
  raise exception.StorageError(reason=(_('Unable to find SR from VDI %s') % vdi_ref))
 return sr_ref

def find_sr_from_vdi ( session , vdi_ref ) : try : sr_ref = session . call_xenapi ( 'VDI.get_SR' , vdi_ref ) except session . XenAPI . Failure : LOG . exception ( _LE ( 'Unable to find SR from VDI' ) ) raise exception . StorageError ( reason = ( _ ( 'Unable to find SR from VDI %s' ) % vdi_ref ) ) return sr_ref
find the sr reference from the vdi reference .