From a2a4e1cebeb4ba9d7fae107484b1c28e1ff06da1 Mon Sep 17 00:00:00 2001 From: lpichler Date: Thu, 25 Jan 2018 17:46:52 +0100 Subject: [PATCH 1/2] Allow also storage manager features for /api/providers --- config/api.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/config/api.yml b/config/api.yml index 06b3b0086f..c0238c881b 100644 --- a/config/api.yml +++ b/config/api.yml @@ -1795,10 +1795,14 @@ :collection_actions: :get: - :name: read - :identifier: ems_infra_show_list + :identifier: + - ems_infra_show_list + - ems_block_storage_show_list :post: - :name: query - :identifier: ems_infra_show_list + :identifier: + - ems_infra_show_list + - ems_block_storage_show_list - :name: create :identifier: ems_infra_new - :name: edit @@ -1810,7 +1814,9 @@ :resource_actions: :get: - :name: read - :identifier: ems_infra_show + :identifier: + - ems_infra_show + - ems_block_storage_show :post: - :name: edit :identifier: ems_infra_edit From 42029308487029189a67ec6b900896d3154972a1 Mon Sep 17 00:00:00 2001 From: lpichler Date: Thu, 25 Jan 2018 17:56:37 +0100 Subject: [PATCH 2/2] Fix specs, as we can have array in :identifier to put each identifier from the array to the result(returned in api_feature_identifiers) --- spec/lib/api/api_config_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/lib/api/api_config_spec.rb b/spec/lib/api/api_config_spec.rb index 629952ad4e..218dfd0621 100644 --- a/spec/lib/api/api_config_spec.rb +++ b/spec/lib/api/api_config_spec.rb @@ -19,7 +19,7 @@ let(:api_feature_identifiers) do collection_settings.each_with_object(Set.new) do |(_, cfg), set| - set.add(cfg[:identifier]) if cfg[:identifier] + Array(cfg[:identifier]).each { |id| set.add(id) } keys = [:collection_actions, :resource_actions, :subcollection_actions, :subresource_actions] Array(cfg[:subcollections]).each do |s| keys << "#{s}_subcollection_actions" << "#{s}_subresource_actions"