diff --git a/app/controllers/api/containers_controller.rb b/app/controllers/api/containers_controller.rb new file mode 100644 index 0000000000..2df0ebae5f --- /dev/null +++ b/app/controllers/api/containers_controller.rb @@ -0,0 +1,4 @@ +module Api + class ContainersController < BaseController + end +end diff --git a/config/api.yml b/config/api.yml index 873a739a9f..8c779527ff 100644 --- a/config/api.yml +++ b/config/api.yml @@ -835,6 +835,24 @@ :get: - :name: read :identifier: persistent_volume_show + :containers: + :description: Containers + :identifier: container + :options: + - :collection + :verbs: *gp + :klass: Container + :collection_actions: + :get: + - :name: read + :identifier: container_show_list + :post: + - :name: query + :identifier: container_show_list + :resource_actions: + :get: + - :name: read + :identifier: container_show_list :currencies: :description: Currencies :identifier: currency diff --git a/spec/requests/collections_spec.rb b/spec/requests/collections_spec.rb index 10f8d60206..aeb094434c 100644 --- a/spec/requests/collections_spec.rb +++ b/spec/requests/collections_spec.rb @@ -82,6 +82,11 @@ def test_collection_bulk_query(collection, collection_url, klass, id = nil) test_collection_query(:chargebacks, api_chargebacks_url, ChargebackRate) end + it "query Containers" do + FactoryGirl.create(:container) + test_collection_query(:containers, api_containers_url, Container) + end + it "query ContainerGroups" do FactoryGirl.create(:container_group) test_collection_query(:container_groups, api_container_groups_url, ContainerGroup) @@ -663,6 +668,11 @@ def test_collection_bulk_query(collection, collection_url, klass, id = nil) test_collection_bulk_query(:cloud_volumes, api_cloud_volumes_url, CloudVolume) end + it 'bulk query Container' do + FactoryGirl.create(:container) + test_collection_bulk_query(:containers, api_containers_url, Container) + end + it 'bulk query Firmwares' do FactoryGirl.create(:firmware) test_collection_bulk_query(:firmwares, api_firmwares_url, Firmware)