Skip to content

Commit

Permalink
Implement cloud snapshot collector, list page, dashboard counter, cre…
Browse files Browse the repository at this point in the history
…ate & delete methods
  • Loading branch information
TonySchneider committed Feb 22, 2023
1 parent 194ae2d commit 0d88fbf
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
9 changes: 9 additions & 0 deletions app/controllers/api/cloud_volume_snapshots_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module Api
class CloudVolumeSnapshotsController < BaseController
def delete_resource_action(type, id = nil, _data = nil)
api_resource(type, id, "Deleting", :supports => :delete) do |snapshot|
{:task_id => snapshot.delete_snapshot_queue(User.current_userid)}
end
end
end
end
20 changes: 18 additions & 2 deletions config/api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -758,10 +758,26 @@
:identifier: cloud_tenant_tag
:cloud_volume_snapshots:
:description: Cloud Volume Snapshots
:identifier: cloud_volume_snapshots
:options:
- :subcollection
:verbs: *gpppd
- :collection
:verbs: *gpd
:klass: CloudVolumeSnapshot
:subcollections:
:collection_actions:
:get:
- :name: read
:identifier: cloud_volume_snapshot_view
:post:
- :name: delete
:identifier: cloud_volume_snapshot_delete
:resource_actions:
:get:
- :name: read
:identifier: cloud_volume_snapshot_view
:post:
- :name: delete
:identifier: cloud_volume_snapshot_delete
:cloud_volume_types:
:description: Cloud Volume Types
:identifier: cloud_volume_type
Expand Down

0 comments on commit 0d88fbf

Please sign in to comment.