1 class Arvados::V1::KeepDisksController < ApplicationController
2 skip_before_filter :require_auth_scope_all, :only => :ping
4 def self._ping_requires_parameters
9 filesystem_uuid: false,
12 service_ssl_flag: true
17 if current_user.andand.is_admin
18 @object = KeepDisk.new(filesystem_uuid: params[:filesystem_uuid])
21 # In the first ping from this new filesystem_uuid, we can't
22 # expect the keep node to know the ping_secret so we made sure
23 # we got an admin token. Here we add ping_secret to params so
24 # KeepNode.ping() understands this update is properly
26 params[:ping_secret] = @object.ping_secret
28 return render_not_found "object not found"
32 params[:service_host] ||= request.env['REMOTE_ADDR']
33 if not @object.ping params
34 return render_not_found "object not found"
36 render json: @object.as_api_response(:superuser)
39 def find_objects_for_index
40 # all users can list all keep disks
41 @objects = model_class.where('1=1')