Beispiel #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()
     elif self.name == 'empty_host':
         raise ex.HostDeleteIsCalled()
Beispiel #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()
Beispiel #3
0
 def delete_host_wo_lock(host):
     if host.name == 'empty-host':
         raise ex.HostDeleteIsCalled()