Ejemplo n.º 1
0
 def delete(self):
     if self.get_id() in ['snap_2']:
         raise ex.SnapDeleteIsCalled()
     elif self.get_id() == 'not_found':
         raise ex.UnityResourceNotFoundError()
     elif self.get_id() == 'snap_in_use':
         raise ex.UnityDeleteAttachedSnapError()
Ejemplo n.º 2
0
 def delete(self, force_snap_delete=None):
     if self.get_id() in ['snap_2']:
         raise ex.SnapDeleteIsCalled()
     elif self.get_id() == 'not_found':
         raise ex.UnityResourceNotFoundError()
     elif self.get_id() == 'snap_in_use':
         raise ex.UnityDeleteAttachedSnapError()
     elif self.name == 'empty-host':
         raise ex.HostDeleteIsCalled()
     elif self.get_id() == 'lun_in_replication':
         if not force_snap_delete:
             raise ex.UnityDeleteLunInReplicationError()
     elif self.get_id() == 'lun_rep_session_1':
         raise ex.UnityResourceNotFoundError()