コード例 #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
ファイル: tables.py プロジェクト: bswartz/manila-ui
 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