Skip to content

Commit 63cee2b

Browse files
jaywcarmankbrock
andcommitted
Add API to get list of COS objects
Add a new API to get a list of cloud object store (COS) objects. Co-authored-by: Keenan Brock <keenan@thebrocks.net>
1 parent 5409e74 commit 63cee2b

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module Api
2+
class CloudObjectStoreObjectsController < BaseProviderController
3+
def create_resource(type, _ems_id = nil, data = {})
4+
create_ems_resource(type, data, :supports => true) do |ems, klass|
5+
resource_search(data["cloud_tenant_id"], :cloud_tenants) if data["cloud_tenant_id"]
6+
{:task_id => klass.cloud_object_store_objects_create_queue(User.current_userid, ems, data.symbolize_keys)}
7+
end
8+
end
9+
end
10+
end

config/api.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -608,6 +608,24 @@
608608
:get:
609609
- :name: read
610610
:identifier: cloud_object_store_container_show
611+
:cloud_object_store_objects:
612+
:description: Cloud Object Store Objects
613+
:identifier: cloud_object_store_objects
614+
:options:
615+
- :collection
616+
:verbs: *gp
617+
:klass: CloudObjectStoreObject
618+
:collection_actions:
619+
:get:
620+
- :name: read
621+
:identifier: cloud_object_store_object_show_list
622+
:post:
623+
- :name: query
624+
:identifier: cloud_object_store_object_show_list
625+
:resource_actions:
626+
:get:
627+
- :name: read
628+
:identifier: cloud_object_store_object_show
611629
:cloud_subnets:
612630
:description: Cloud Subnets
613631
:identifier: cloud_subnet

0 commit comments

Comments
 (0)