Beispiel #1
0
 /// <summary>
 /// Try to forget an SR that has previously failed to completely plug.  Nothrow guarantee.
 /// </summary>
 private void ForgetFailedSR(XenRef <SR> sr)
 {
     try
     {
         foreach (XenRef <PBD> pbd in XenAPI.SR.get_PBDs(Session, sr.opaque_ref))
         {
             if (PBD.get_currently_attached(Session, pbd))
             {
                 PBD.unplug(Session, pbd);
             }
         }
         XenAPI.SR.forget(Session, sr.opaque_ref);
     }
     catch
     {
         log.Debug("SR.forget() failed! Continuing anyway");
     }
 }