Required arguments are displayed in %{background:#ccffcc}green%.
+h2. accessable
+
+Get a list of keep services that are accessable to the requesting client. This
+is context-sensitive, for example providing the list of actual Keep servers
+when inside the cluster, but providing a proxy service if client contacts
+Arvados from outside the cluster.
+
+Takes no arguments.
+
h2. create
Create a new KeepService.
class Arvados::V1::KeepServicesController < ApplicationController
def find_objects_for_index
- # all users can list all keep disks
+ # all users can list all keep services
@objects = model_class.where('1=1')
super
end
+ def accessable
+ if request.headers['X-Keep-Proxy-Required']
+ @objects = model_class.where('service_type=?', 'proxy')
+ else
+ @objects = model_class.where('service_type=?', 'disk')
+ end
+
+ render_list
+ end
+
end
resources :keep_disks do
post 'ping', on: :collection
end
- resources :keep_services
+ resources :keep_services do
+ get 'accessable', on: :collection
+ end
resources :links
resources :logs
resources :nodes do