Пример #1
0
    def test_snapshot_delete(self):
        snapshot_id = 'fake_snapshot_id'

        api.share_snapshot_delete(self.request, snapshot_id)

        self.manilaclient.share_snapshots.delete.assert_called_once_with(
            snapshot_id)
Пример #2
0
 def delete(self, request, obj_id):
     obj = self.table.get_object_by_id(obj_id)
     name = self.table.get_object_display(obj)
     try:
         manila.share_snapshot_delete(request, obj_id)
     except Exception:
         msg = _('Unable to delete snapshot "%s". One or more shares '
                 'depend on it.')
         exceptions.check_message(["snapshots", "dependent"], msg % name)
         raise
Пример #3
0
 def delete(self, request, obj_id):
     obj = self.table.get_object_by_id(obj_id)
     name = self.table.get_object_display(obj)
     try:
         manila.share_snapshot_delete(request, obj_id)
     except Exception:
         msg = _('Unable to delete snapshot "%s". One or more shares '
                 'depend on it.')
         exceptions.check_message(["snapshots", "dependent"], msg % name)
         raise