1 class Arvados::V1::KeepDisksController < ApplicationController
2 skip_before_filter :require_auth_scope_all, :only => :ping
4 def self._ping_requires_parameters
8 ec2_instance_id: false,
10 filesystem_uuid: false,
12 service_ssl_flag: true
16 if !@object and params[:filesystem_uuid] and current_user and current_user.is_admin
17 if KeepDisk.where('filesystem_uuid=?', params[:filesystem_uuid]).empty?
18 @object = KeepDisk.new filesystem_uuid: params[:filesystem_uuid]
20 params[:ping_secret] = @object.ping_secret
22 raise "ping from keep_disk with existing filesystem_uuid #{params[:filesystem_uuid]} but wrong uuid #{params[:uuid]}"
27 return render_not_found "object not found"
30 params.merge!(service_host:
31 params[:local_ipv4] || request.env['REMOTE_ADDR'])