def find_sr_from_vbd(session, vbd_ref):
 try:
  vdi_ref = session.call_xenapi('VBD.get_VDI', vbd_ref)
  sr_ref = session.call_xenapi('VDI.get_SR', vdi_ref)
 except session.XenAPI.Failure as exc:
  LOG.exception(exc)
  raise StorageError((_('Unable to find SR from VBD %s') % vbd_ref))
 return sr_ref

def find_sr_from_vbd ( session , vbd_ref ) : try : vdi_ref = session . call_xenapi ( 'VBD.get_VDI' , vbd_ref ) sr_ref = session . call_xenapi ( 'VDI.get_SR' , vdi_ref ) except session . XenAPI . Failure as exc : LOG . exception ( exc ) raise StorageError ( ( _ ( 'Unable to find SR from VBD %s' ) % vbd_ref ) ) return sr_ref
find the sr reference from the vbd reference .