From 43c411ec1441ee1710dc33389d7451f7414a170f Mon Sep 17 00:00:00 2001 From: Tom Clegg Date: Sun, 14 Apr 2013 19:19:25 -0700 Subject: [PATCH] rename projects --- apps/workbench/Rakefile | 2 +- .../app/controllers/application_controller.rb | 18 +++--- .../app/controllers/collections_controller.rb | 12 ++-- .../app/controllers/sessions_controller.rb | 4 +- .../app/helpers/application_helper.rb | 6 +- .../app/helpers/pipeline_instances_helper.rb | 6 +- ...os_api_client.rb => arvados_api_client.rb} | 32 +++++----- .../models/{orvos_base.rb => arvados_base.rb} | 62 +++++++++---------- ...ource_list.rb => arvados_resource_list.rb} | 12 ++-- apps/workbench/app/models/collection.rb | 2 +- apps/workbench/app/models/group.rb | 2 +- apps/workbench/app/models/job.rb | 2 +- apps/workbench/app/models/job_task.rb | 2 +- apps/workbench/app/models/link.rb | 2 +- apps/workbench/app/models/log.rb | 2 +- .../workbench/app/models/pipeline_instance.rb | 2 +- .../workbench/app/models/pipeline_template.rb | 2 +- apps/workbench/app/models/specimen.rb | 2 +- apps/workbench/app/models/user.rb | 6 +- ...ject.html.erb => _arvados_object.html.erb} | 2 +- ...html.erb => _arvados_object_attr.html.erb} | 2 +- .../app/views/collections/index.html.erb | 2 +- .../app/views/collections/show.html.erb | 2 +- .../workbench/app/views/groups/index.html.erb | 2 +- apps/workbench/app/views/groups/show.html.erb | 4 +- apps/workbench/app/views/jobs/index.html.erb | 6 +- apps/workbench/app/views/jobs/show.html.erb | 2 +- apps/workbench/app/views/logs/show.html.erb | 2 +- .../views/pipeline_instances/index.html.erb | 6 +- .../views/pipeline_instances/show.html.erb | 2 +- .../views/pipeline_templates/index.html.erb | 4 +- .../views/pipeline_templates/show.html.erb | 2 +- .../app/views/specimens/show.html.erb | 2 +- apps/workbench/app/views/users/show.html.erb | 2 +- apps/workbench/config.ru | 2 +- apps/workbench/config/application.rb | 2 +- apps/workbench/config/boot.rb | 6 +- apps/workbench/config/environment.rb | 2 +- .../environments/development.rb.example | 12 ++-- .../config/environments/production.rb | 12 ++-- apps/workbench/config/environments/test.rb | 12 ++-- .../config/initializers/arvados_api_client.rb | 1 + .../config/initializers/orvos_api_client.rb | 1 - .../config/initializers/secret_token.rb | 2 +- .../config/initializers/session_store.rb | 4 +- apps/workbench/config/routes.rb | 2 +- doc/api/Jobs.textile | 2 +- sdk/cli/wh | 22 +++---- sdk/cli/wh-run-pipeline-instance | 44 ++++++------- .../app/controllers/application_controller.rb | 2 +- .../v1/collections_controller.rb | 2 +- .../arvados/v1/groups_controller.rb | 2 + .../arvados/v1/job_tasks_controller.rb | 2 + .../{orvos => arvados}/v1/jobs_controller.rb | 2 +- .../{orvos => arvados}/v1/links_controller.rb | 2 +- .../controllers/arvados/v1/logs_controller.rb | 2 + .../{orvos => arvados}/v1/nodes_controller.rb | 4 +- .../v1/pipeline_instances_controller.rb | 2 +- .../v1/pipeline_templates_controller.rb | 3 + .../v1/schema_controller.rb | 54 ++++++++-------- .../arvados/v1/specimens_controller.rb | 2 + .../{orvos => arvados}/v1/users_controller.rb | 2 +- .../controllers/orvos/v1/groups_controller.rb | 2 - .../orvos/v1/job_tasks_controller.rb | 2 - .../controllers/orvos/v1/logs_controller.rb | 2 - .../orvos/v1/pipeline_templates_controller.rb | 3 - .../orvos/v1/specimens_controller.rb | 2 - .../controllers/user_sessions_controller.rb | 2 +- .../{orvos_model.rb => arvados_model.rb} | 4 +- services/api/app/models/collection.rb | 2 +- services/api/app/models/group.rb | 2 +- services/api/app/models/job.rb | 2 +- services/api/app/models/job_task.rb | 2 +- services/api/app/models/link.rb | 2 +- services/api/app/models/log.rb | 2 +- services/api/app/models/node.rb | 6 +- services/api/app/models/pipeline_instance.rb | 2 +- services/api/app/models/pipeline_template.rb | 2 +- services/api/app/models/specimen.rb | 2 +- services/api/app/models/user.rb | 4 +- .../app/views/layouts/application.html.erb | 4 +- services/api/app/views/static/intro.html.erb | 8 +-- services/api/config/database.yml.sample | 12 ++-- .../environments/development.rb.example | 2 +- .../api/config/environments/production.rb | 2 +- services/api/config/environments/test.rb | 2 +- .../config/initializers/omniauth.rb.example | 2 +- services/api/config/routes.rb | 8 +-- .../20130415020241_rename_orvos_to_arvados.rb | 13 ++++ services/api/db/schema.rb | 2 +- services/api/lib/kind_and_etag.rb | 2 +- .../test/integration/collections_api_test.rb | 4 +- 92 files changed, 273 insertions(+), 260 deletions(-) rename apps/workbench/app/models/{orvos_api_client.rb => arvados_api_client.rb} (72%) rename apps/workbench/app/models/{orvos_base.rb => arvados_base.rb} (75%) rename apps/workbench/app/models/{orvos_resource_list.rb => arvados_resource_list.rb} (81%) rename apps/workbench/app/views/application/{_orvos_object.html.erb => _arvados_object.html.erb} (68%) rename apps/workbench/app/views/application/{_orvos_object_attr.html.erb => _arvados_object_attr.html.erb} (85%) create mode 100644 apps/workbench/config/initializers/arvados_api_client.rb delete mode 100644 apps/workbench/config/initializers/orvos_api_client.rb rename services/api/app/controllers/{orvos => arvados}/v1/collections_controller.rb (90%) create mode 100644 services/api/app/controllers/arvados/v1/groups_controller.rb create mode 100644 services/api/app/controllers/arvados/v1/job_tasks_controller.rb rename services/api/app/controllers/{orvos => arvados}/v1/jobs_controller.rb (96%) rename services/api/app/controllers/{orvos => arvados}/v1/links_controller.rb (79%) create mode 100644 services/api/app/controllers/arvados/v1/logs_controller.rb rename services/api/app/controllers/{orvos => arvados}/v1/nodes_controller.rb (73%) rename services/api/app/controllers/{orvos => arvados}/v1/pipeline_instances_controller.rb (56%) create mode 100644 services/api/app/controllers/arvados/v1/pipeline_templates_controller.rb rename services/api/app/controllers/{orvos => arvados}/v1/schema_controller.rb (83%) create mode 100644 services/api/app/controllers/arvados/v1/specimens_controller.rb rename services/api/app/controllers/{orvos => arvados}/v1/users_controller.rb (50%) delete mode 100644 services/api/app/controllers/orvos/v1/groups_controller.rb delete mode 100644 services/api/app/controllers/orvos/v1/job_tasks_controller.rb delete mode 100644 services/api/app/controllers/orvos/v1/logs_controller.rb delete mode 100644 services/api/app/controllers/orvos/v1/pipeline_templates_controller.rb delete mode 100644 services/api/app/controllers/orvos/v1/specimens_controller.rb rename services/api/app/models/{orvos_model.rb => arvados_model.rb} (96%) create mode 100644 services/api/db/migrate/20130415020241_rename_orvos_to_arvados.rb diff --git a/apps/workbench/Rakefile b/apps/workbench/Rakefile index 10fafae5e6..752f3d8788 100644 --- a/apps/workbench/Rakefile +++ b/apps/workbench/Rakefile @@ -4,4 +4,4 @@ require File.expand_path('../config/application', __FILE__) -Vcffarm::Application.load_tasks +ArvadosWorkbench::Application.load_tasks diff --git a/apps/workbench/app/controllers/application_controller.rb b/apps/workbench/app/controllers/application_controller.rb index 6535888996..07b7a2a1df 100644 --- a/apps/workbench/app/controllers/application_controller.rb +++ b/apps/workbench/app/controllers/application_controller.rb @@ -65,7 +65,7 @@ class ApplicationController < ActionController::Base end def current_user - if Thread.current[:orvos_api_token] + if Thread.current[:arvados_api_token] @current_user ||= User.current else logger.error "No API token in Thread" @@ -91,11 +91,11 @@ class ApplicationController < ActionController::Base try_redirect_to_login = true if params[:api_token] try_redirect_to_login = false - Thread.current[:orvos_api_token] = params[:api_token] + Thread.current[:arvados_api_token] = params[:api_token] # Before copying the token into session[], do a simple API # call to verify its authenticity. if verify_api_token - session[:orvos_api_token] = params[:api_token] + session[:arvados_api_token] = params[:api_token] if !request.format.json? and request.method == 'GET' # Repeat this request with api_token in the (new) session # cookie instead of the query string. This prevents API @@ -109,22 +109,22 @@ class ApplicationController < ActionController::Base @errors = ['Invalid API token'] self.render_error status: 401 end - elsif session[:orvos_api_token] + elsif session[:arvados_api_token] # In this case, the token must have already verified at some # point, but it might have been revoked since. We'll try # using it, and catch the exception if it doesn't work. try_redirect_to_login = false - Thread.current[:orvos_api_token] = session[:orvos_api_token] + Thread.current[:arvados_api_token] = session[:arvados_api_token] begin yield - rescue OrvosApiClient::NotLoggedInException + rescue ArvadosApiClient::NotLoggedInException try_redirect_to_login = true end end if try_redirect_to_login respond_to do |f| f.html { - redirect_to $orvos_api_client.orvos_login_url(return_to: request.url) + redirect_to $arvados_api_client.arvados_login_url(return_to: request.url) } f.json { @errors = ['No API token supplied -- can\'t really do anything.'] @@ -134,7 +134,7 @@ class ApplicationController < ActionController::Base end ensure # Remove token in case this Thread is used for anything else. - Thread.current[:orvos_api_token] = nil + Thread.current[:arvados_api_token] = nil end end @@ -142,7 +142,7 @@ class ApplicationController < ActionController::Base begin Link.where(uuid: 'just-verifying-my-api-token') true - rescue OrvosApiClient::NotLoggedInException + rescue ArvadosApiClient::NotLoggedInException false end end diff --git a/apps/workbench/app/controllers/collections_controller.rb b/apps/workbench/app/controllers/collections_controller.rb index 4ca9212959..91c146e840 100644 --- a/apps/workbench/app/controllers/collections_controller.rb +++ b/apps/workbench/app/controllers/collections_controller.rb @@ -7,13 +7,13 @@ class CollectionsController < ApplicationController end def index - @links = Link.eager.limit(100).where(head_kind: 'orvos#collection') | - Link.eager.limit(100).where(tail_kind: 'orvos#collection') + @links = Link.eager.limit(100).where(head_kind: 'arvados#collection') | + Link.eager.limit(100).where(tail_kind: 'arvados#collection') @collections = Collection.limit(100).to_hash @collections.merge!(Collection. limit(100). - where(uuid: @links.select{|x|x.head_kind=='orvos#collection'}.collect(&:head_uuid) | - @links.select{|x|x.tail_kind=='orvos#collection'}.collect(&:tail_uuid)). + where(uuid: @links.select{|x|x.head_kind=='arvados#collection'}.collect(&:head_uuid) | + @links.select{|x|x.tail_kind=='arvados#collection'}.collect(&:tail_uuid)). to_hash) @collection_info = {} @collections.each do |uuid, c| @@ -21,7 +21,7 @@ class CollectionsController < ApplicationController ci[:created_at] = c.created_at end @links.each do |l| - if l.head_kind == 'orvos#collection' + if l.head_kind == 'arvados#collection' c = (@collection_info[l.head_uuid] ||= {uuid: l.head_uuid}) if l.link_class == 'resources' and l.name == 'wants' if l.head.respond_to? :created_at @@ -33,7 +33,7 @@ class CollectionsController < ApplicationController end end end - if l.tail_kind == 'orvos#collection' + if l.tail_kind == 'arvados#collection' c = (@collection_info[l.tail_uuid] ||= {uuid: l.tail_uuid}) if l.link_class == 'group' and l.name == 'member_of' c[:groups] ||= {} diff --git a/apps/workbench/app/controllers/sessions_controller.rb b/apps/workbench/app/controllers/sessions_controller.rb index 0d4e944f05..6531e3d9ed 100644 --- a/apps/workbench/app/controllers/sessions_controller.rb +++ b/apps/workbench/app/controllers/sessions_controller.rb @@ -3,9 +3,9 @@ class SessionsController < ApplicationController skip_before_filter :find_object_by_uuid, :only => [:destroy, :index] def destroy session.clear - redirect_to $orvos_api_client.orvos_logout_url(return_to: logged_out_url) + redirect_to $arvados_api_client.orvos_logout_url(return_to: logged_out_url) end def index - redirect_to root_url if session[:orvos_api_token] + redirect_to root_url if session[:arvados_api_token] end end diff --git a/apps/workbench/app/helpers/application_helper.rb b/apps/workbench/app/helpers/application_helper.rb index 8422ed247a..f29c73ed34 100644 --- a/apps/workbench/app/helpers/application_helper.rb +++ b/apps/workbench/app/helpers/application_helper.rb @@ -13,9 +13,9 @@ module ApplicationHelper cooked = raw + cooked end - def link_to_if_orvos_object(attrvalue, opts={}, style_opts={}) - if (resource_class = OrvosBase::resource_class_for_uuid(attrvalue, opts)) - link_uuid = attrvalue.is_a?(OrvosBase) ? attrvalue.uuid : attrvalue + def link_to_if_arvados_object(attrvalue, opts={}, style_opts={}) + if (resource_class = ArvadosBase::resource_class_for_uuid(attrvalue, opts)) + link_uuid = attrvalue.is_a?(ArvadosBase) ? attrvalue.uuid : attrvalue link_name = opts[:link_text] if !link_name link_name = link_uuid diff --git a/apps/workbench/app/helpers/pipeline_instances_helper.rb b/apps/workbench/app/helpers/pipeline_instances_helper.rb index 42e1ac0d01..c792db8512 100644 --- a/apps/workbench/app/helpers/pipeline_instances_helper.rb +++ b/apps/workbench/app/helpers/pipeline_instances_helper.rb @@ -58,12 +58,12 @@ module PipelineInstancesHelper end end pj[:job_id] = pj[:job][:uuid] - pj[:job_link] = link_to_if_orvos_object pj[:job][:uuid] + pj[:job_link] = link_to_if_arvados_object pj[:job][:uuid] pj[:script_version] = pj[:job][:script_version] pj[:output] = pj[:job][:output] pj[:finished_at] = (Time.parse(pj[:job][:finished_at]) rescue nil) pj[:progress_bar] = raw("
") - pj[:output_link] = link_to_if_orvos_object pj[:output] + pj[:output_link] = link_to_if_arvados_object pj[:output] ret << pj end ret @@ -113,7 +113,7 @@ module PipelineInstancesHelper pj[:output] = step[:output_data_locator] pj[:finished_at] = (Time.parse(step[:warehousejob][:finishtime]) rescue nil) pj[:progress_bar] = raw("
") - pj[:output_link] = link_to_if_orvos_object pj[:output] + pj[:output_link] = link_to_if_arvados_object pj[:output] ret << pj end ret diff --git a/apps/workbench/app/models/orvos_api_client.rb b/apps/workbench/app/models/arvados_api_client.rb similarity index 72% rename from apps/workbench/app/models/orvos_api_client.rb rename to apps/workbench/app/models/arvados_api_client.rb index aa73856aef..c7faeb6f03 100644 --- a/apps/workbench/app/models/orvos_api_client.rb +++ b/apps/workbench/app/models/arvados_api_client.rb @@ -1,11 +1,11 @@ -class OrvosApiClient +class ArvadosApiClient class NotLoggedInException < Exception end def api(resources_kind, action, data=nil) - orvos_api_token = Thread.current[:orvos_api_token] - orvos_api_token = '' if orvos_api_token.nil? + arvados_api_token = Thread.current[:arvados_api_token] + arvados_api_token = '' if arvados_api_token.nil? dataargs = ['--data-urlencode', - "api_token=#{orvos_api_token}", + "api_token=#{arvados_api_token}", '--header', 'Accept:application/json'] if !data.nil? @@ -24,7 +24,7 @@ class OrvosApiClient end json = nil resources_kind = class_kind(resources_kind).pluralize if resources_kind.is_a? Class - url = "#{self.orvos_v1_base}/#{resources_kind}#{action}" + url = "#{self.arvados_v1_base}/#{resources_kind}#{action}" IO.popen([ENV, 'curl', '-s', @@ -67,11 +67,11 @@ class OrvosApiClient end end - def orvos_login_url(params={}) - if Rails.configuration.respond_to? :orvos_login_base - uri = Rails.configuration.orvos_login_base + def arvados_login_url(params={}) + if Rails.configuration.respond_to? :arvados_login_base + uri = Rails.configuration.arvados_login_base else - uri = self.orvos_v1_base.sub(%r{/orvos/v\d+.*}, '/login') + uri = self.arvados_v1_base.sub(%r{/arvados/v\d+.*}, '/login') end if params.size > 0 uri += '?' << params.collect { |k,v| @@ -80,20 +80,20 @@ class OrvosApiClient end end - def orvos_logout_url(params={}) - orvos_login_url(params).sub('/login','/logout') + def arvados_logout_url(params={}) + arvados_login_url(params).sub('/login','/logout') end - def orvos_v1_base - Rails.configuration.orvos_v1_base + def arvados_v1_base + Rails.configuration.arvados_v1_base end - def orvos_schema - @orvos_schema ||= api 'schema', '' + def arvados_schema + @arvados_schema ||= api 'schema', '' end def kind_class(kind) - kind.match(/^orvos\#(.+?)(_list|List)?$/)[1].pluralize.classify.constantize rescue nil + kind.match(/^arvados\#(.+?)(_list|List)?$/)[1].pluralize.classify.constantize rescue nil end def class_kind(resource_class) diff --git a/apps/workbench/app/models/orvos_base.rb b/apps/workbench/app/models/arvados_base.rb similarity index 75% rename from apps/workbench/app/models/orvos_base.rb rename to apps/workbench/app/models/arvados_base.rb index 8e04ea7fe8..e6d10f0eeb 100644 --- a/apps/workbench/app/models/orvos_base.rb +++ b/apps/workbench/app/models/arvados_base.rb @@ -1,22 +1,22 @@ -class OrvosBase < ActiveRecord::Base +class ArvadosBase < ActiveRecord::Base self.abstract_class = true attr_accessor :attribute_sortkey def self.uuid_infix_object_kind @@uuid_infix_object_kind ||= { - '4zz18' => 'orvos#collection', - 'tpzed' => 'orvos#user', - 'ozdt8' => 'orvos#api_client', - '8i9sb' => 'orvos#job', - 'o0j2j' => 'orvos#link', - '57u5n' => 'orvos#log', - 'j58dm' => 'orvos#specimen', - 'p5p6p' => 'orvos#pipeline_template', - 'mxsvm' => 'orvos#pipeline_template', # legacy Pipeline objects - 'd1hrv' => 'orvos#pipeline_instance', - 'uo14g' => 'orvos#pipeline_instance', # legacy PipelineInstance objects - 'j7d0g' => 'orvos#group', - 'ldvyl' => 'orvos#group' # only needed for legacy Project objects + '4zz18' => 'arvados#collection', + 'tpzed' => 'arvados#user', + 'ozdt8' => 'arvados#api_client', + '8i9sb' => 'arvados#job', + 'o0j2j' => 'arvados#link', + '57u5n' => 'arvados#log', + 'j58dm' => 'arvados#specimen', + 'p5p6p' => 'arvados#pipeline_template', + 'mxsvm' => 'arvados#pipeline_template', # legacy Pipeline objects + 'd1hrv' => 'arvados#pipeline_instance', + 'uo14g' => 'arvados#pipeline_instance', # legacy PipelineInstance objects + 'j7d0g' => 'arvados#group', + 'ldvyl' => 'arvados#group' # only needed for legacy Project objects } end @@ -43,8 +43,8 @@ class OrvosBase < ActiveRecord::Base def self.columns return @columns unless @columns.nil? @columns = [] - return @columns if $orvos_api_client.orvos_schema[self.to_s.to_sym].nil? - $orvos_api_client.orvos_schema[self.to_s.to_sym].each do |coldef| + return @columns if $arvados_api_client.arvados_schema[self.to_s.to_sym].nil? + $arvados_api_client.arvados_schema[self.to_s.to_sym].each do |coldef| k = coldef[:name].to_sym if coldef[:type] == coldef[:type].downcase @columns << column(k, coldef[:type].to_sym) @@ -68,16 +68,16 @@ class OrvosBase < ActiveRecord::Base new.private_reload(uuid) end def self.where(*args) - OrvosResourceList.new(self).where(*args) + ArvadosResourceList.new(self).where(*args) end def self.limit(*args) - OrvosResourceList.new(self).limit(*args) + ArvadosResourceList.new(self).limit(*args) end def self.eager(*args) - OrvosResourceList.new(self).eager(*args) + ArvadosResourceList.new(self).eager(*args) end def self.all(*args) - OrvosResourceList.new(self).all(*args) + ArvadosResourceList.new(self).all(*args) end def save obdata = {} @@ -89,9 +89,9 @@ class OrvosBase < ActiveRecord::Base if etag postdata['_method'] = 'PUT' obdata.delete :uuid - resp = $orvos_api_client.api(self.class, '/' + uuid, postdata) + resp = $arvados_api_client.api(self.class, '/' + uuid, postdata) else - resp = $orvos_api_client.api(self.class, '', postdata) + resp = $arvados_api_client.api(self.class, '', postdata) end return false if !resp[:etag] || !resp[:uuid] @@ -133,12 +133,12 @@ class OrvosBase < ActiveRecord::Base ok end end - @links = $orvos_api_client.api Link, '', { _method: 'GET', where: o, eager: true } - @links = $orvos_api_client.unpack_api_response(@links) + @links = $arvados_api_client.api Link, '', { _method: 'GET', where: o, eager: true } + @links = $arvados_api_client.unpack_api_response(@links) end def all_links return @all_links if @all_links - res = $orvos_api_client.api Link, '', { + res = $arvados_api_client.api Link, '', { _method: 'GET', where: { tail_kind: self.kind, @@ -146,7 +146,7 @@ class OrvosBase < ActiveRecord::Base }, eager: true } - @all_links = $orvos_api_client.unpack_api_response(res) + @all_links = $arvados_api_client.unpack_api_response(res) end def reload private_reload(self.uuid) @@ -156,13 +156,13 @@ class OrvosBase < ActiveRecord::Base if uuid_or_hash.is_a? Hash hash = uuid_or_hash else - hash = $orvos_api_client.api(self.class, '/' + uuid_or_hash) + hash = $arvados_api_client.api(self.class, '/' + uuid_or_hash) end hash.each do |k,v| if self.respond_to?(k.to_s + '=') self.send(k.to_s + '=', v) else - # When OrvosApiClient#schema starts telling us what to expect + # When ArvadosApiClient#schema starts telling us what to expect # in API responses (not just the server side database # columns), this sort of awfulness can be avoided: self.instance_variable_set('@' + k.to_s, v) @@ -188,7 +188,7 @@ class OrvosBase < ActiveRecord::Base end def self.resource_class_for_uuid(uuid, opts={}) - if uuid.is_a? OrvosBase + if uuid.is_a? ArvadosBase return uuid.class end unless uuid.is_a? String @@ -202,13 +202,13 @@ class OrvosBase < ActiveRecord::Base end resource_class = nil uuid.match /^[0-9a-z]{5}-([0-9a-z]{5})-[0-9a-z]{15}$/ do |re| - resource_class ||= $orvos_api_client. + resource_class ||= $arvados_api_client. kind_class(self.uuid_infix_object_kind[re[1]]) end if opts[:referring_object] and opts[:referring_attr] and opts[:referring_attr].match /_uuid$/ - resource_class ||= $orvos_api_client. + resource_class ||= $arvados_api_client. kind_class(opts[:referring_object]. attributes[opts[:referring_attr]. sub(/_uuid$/, '_kind')]) diff --git a/apps/workbench/app/models/orvos_resource_list.rb b/apps/workbench/app/models/arvados_resource_list.rb similarity index 81% rename from apps/workbench/app/models/orvos_resource_list.rb rename to apps/workbench/app/models/arvados_resource_list.rb index aa6961e369..a3032a67f2 100644 --- a/apps/workbench/app/models/orvos_resource_list.rb +++ b/apps/workbench/app/models/arvados_resource_list.rb @@ -1,4 +1,4 @@ -class OrvosResourceList +class ArvadosResourceList include Enumerable def initialize(resource_class) @@ -19,7 +19,7 @@ class OrvosResourceList cond = cond.dup cond.keys.each do |uuid_key| if cond[uuid_key] and (cond[uuid_key].is_a? Array or - cond[uuid_key].is_a? OrvosBase) + cond[uuid_key].is_a? ArvadosBase) # Coerce cond[uuid_key] to an array of uuid strings. This # allows caller the convenience of passing an array of real # objects and uuids in cond[uuid_key]. @@ -27,7 +27,7 @@ class OrvosResourceList cond[uuid_key] = [cond[uuid_key]] end cond[uuid_key] = cond[uuid_key].collect do |item| - if item.is_a? OrvosBase + if item.is_a? ArvadosBase item.uuid else item @@ -37,7 +37,7 @@ class OrvosResourceList end cond.keys.select { |x| x.match /_kind$/ }.each do |kind_key| if cond[kind_key].is_a? Class - cond = cond.merge({ kind_key => 'orvos#' + $orvos_api_client.class_kind(cond[kind_key]) }) + cond = cond.merge({ kind_key => 'arvados#' + $arvados_api_client.class_kind(cond[kind_key]) }) end end api_params = { @@ -46,8 +46,8 @@ class OrvosResourceList } api_params[:eager] = '1' if @eager api_params[:limit] = @limit if @limit - res = $orvos_api_client.api @resource_class, '', api_params - @results = $orvos_api_client.unpack_api_response res + res = $arvados_api_client.api @resource_class, '', api_params + @results = $arvados_api_client.unpack_api_response res self end diff --git a/apps/workbench/app/models/collection.rb b/apps/workbench/app/models/collection.rb index ee3a7883e3..d96146143d 100644 --- a/apps/workbench/app/models/collection.rb +++ b/apps/workbench/app/models/collection.rb @@ -1,4 +1,4 @@ -class Collection < OrvosBase +class Collection < ArvadosBase def total_bytes if files tot = 0 diff --git a/apps/workbench/app/models/group.rb b/apps/workbench/app/models/group.rb index 2a500a58e0..dd04c00590 100644 --- a/apps/workbench/app/models/group.rb +++ b/apps/workbench/app/models/group.rb @@ -1,2 +1,2 @@ -class Group < OrvosBase +class Group < ArvadosBase end diff --git a/apps/workbench/app/models/job.rb b/apps/workbench/app/models/job.rb index a779d8d236..e716df75f9 100644 --- a/apps/workbench/app/models/job.rb +++ b/apps/workbench/app/models/job.rb @@ -1,2 +1,2 @@ -class Job < OrvosBase +class Job < ArvadosBase end diff --git a/apps/workbench/app/models/job_task.rb b/apps/workbench/app/models/job_task.rb index 9d147b173a..15fc7fdae3 100644 --- a/apps/workbench/app/models/job_task.rb +++ b/apps/workbench/app/models/job_task.rb @@ -1,2 +1,2 @@ -class JobTask < OrvosBase +class JobTask < ArvadosBase end diff --git a/apps/workbench/app/models/link.rb b/apps/workbench/app/models/link.rb index 9c86e3171f..899a80022c 100644 --- a/apps/workbench/app/models/link.rb +++ b/apps/workbench/app/models/link.rb @@ -1,4 +1,4 @@ -class Link < OrvosBase +class Link < ArvadosBase attr_accessor :head attr_accessor :tail def self.by_tail(t, opts={}) diff --git a/apps/workbench/app/models/log.rb b/apps/workbench/app/models/log.rb index f6280e3016..c804bf7b71 100644 --- a/apps/workbench/app/models/log.rb +++ b/apps/workbench/app/models/log.rb @@ -1,3 +1,3 @@ -class Log < OrvosBase +class Log < ArvadosBase attr_accessor :object end diff --git a/apps/workbench/app/models/pipeline_instance.rb b/apps/workbench/app/models/pipeline_instance.rb index 7fe88c62a8..b8c74dfa57 100644 --- a/apps/workbench/app/models/pipeline_instance.rb +++ b/apps/workbench/app/models/pipeline_instance.rb @@ -1,4 +1,4 @@ -class PipelineInstance < OrvosBase +class PipelineInstance < ArvadosBase attr_accessor :pipeline_template def update_job_parameters(new_params) diff --git a/apps/workbench/app/models/pipeline_template.rb b/apps/workbench/app/models/pipeline_template.rb index b68aa57319..f5dfb6a2f5 100644 --- a/apps/workbench/app/models/pipeline_template.rb +++ b/apps/workbench/app/models/pipeline_template.rb @@ -1,2 +1,2 @@ -class PipelineTemplate < OrvosBase +class PipelineTemplate < ArvadosBase end diff --git a/apps/workbench/app/models/specimen.rb b/apps/workbench/app/models/specimen.rb index e379a0846c..fa7fbbf090 100644 --- a/apps/workbench/app/models/specimen.rb +++ b/apps/workbench/app/models/specimen.rb @@ -1,2 +1,2 @@ -class Specimen < OrvosBase +class Specimen < ArvadosBase end diff --git a/apps/workbench/app/models/user.rb b/apps/workbench/app/models/user.rb index 3c85c2d952..65d201a64d 100644 --- a/apps/workbench/app/models/user.rb +++ b/apps/workbench/app/models/user.rb @@ -1,6 +1,6 @@ -class User < OrvosBase +class User < ArvadosBase def self.current - res = $orvos_api_client.api self, '/current' - $orvos_api_client.unpack_api_response(res) + res = $arvados_api_client.api self, '/current' + $arvados_api_client.unpack_api_response(res) end end diff --git a/apps/workbench/app/views/application/_orvos_object.html.erb b/apps/workbench/app/views/application/_arvados_object.html.erb similarity index 68% rename from apps/workbench/app/views/application/_orvos_object.html.erb rename to apps/workbench/app/views/application/_arvados_object.html.erb index 5702d30cb8..77d236efb9 100644 --- a/apps/workbench/app/views/application/_orvos_object.html.erb +++ b/apps/workbench/app/views/application/_arvados_object.html.erb @@ -3,7 +3,7 @@ <% @object.attributes_for_display.each do |attr, attrvalue| %> - <%= render partial: 'application/orvos_object_attr', locals: { attr: attr, attrvalue: attrvalue } %> + <%= render partial: 'application/arvados_object_attr', locals: { attr: attr, attrvalue: attrvalue } %> <% end %> diff --git a/apps/workbench/app/views/application/_orvos_object_attr.html.erb b/apps/workbench/app/views/application/_arvados_object_attr.html.erb similarity index 85% rename from apps/workbench/app/views/application/_orvos_object_attr.html.erb rename to apps/workbench/app/views/application/_arvados_object_attr.html.erb index e8d2a999f0..cb296c58de 100644 --- a/apps/workbench/app/views/application/_orvos_object_attr.html.erb +++ b/apps/workbench/app/views/application/_arvados_object_attr.html.erb @@ -20,7 +20,7 @@ <% if attr == 'uuid' and (uuid = attrvalue.split('-')).size == 3 %> <%= uuid[0..-2].join('-') %>-<%= uuid[-1] %> <% else %> - <%= link_to_if_orvos_object attrvalue, {referring_attr: attr, referring_object: @object, with_prefixes: true, with_class_name: true} %> + <%= link_to_if_arvados_object attrvalue, {referring_attr: attr, referring_object: @object, with_prefixes: true, with_class_name: true} %> <% end %> <% end %> diff --git a/apps/workbench/app/views/collections/index.html.erb b/apps/workbench/app/views/collections/index.html.erb index 1bd6430936..76b6c245ea 100644 --- a/apps/workbench/app/views/collections/index.html.erb +++ b/apps/workbench/app/views/collections/index.html.erb @@ -23,7 +23,7 @@ <% if @collections.has_key? uuid %> - <%= link_to_if_orvos_object uuid %> + <%= link_to_if_arvados_object uuid %> <% else %> <%= uuid %> <% end %> diff --git a/apps/workbench/app/views/collections/show.html.erb b/apps/workbench/app/views/collections/show.html.erb index d9d06b3172..e7c0990fd9 100644 --- a/apps/workbench/app/views/collections/show.html.erb +++ b/apps/workbench/app/views/collections/show.html.erb @@ -231,6 +231,6 @@
- <%= render :partial => 'application/orvos_object' %> + <%= render :partial => 'application/arvados_object' %>
diff --git a/apps/workbench/app/views/groups/index.html.erb b/apps/workbench/app/views/groups/index.html.erb index 51e66d87a4..bd8a33bf99 100644 --- a/apps/workbench/app/views/groups/index.html.erb +++ b/apps/workbench/app/views/groups/index.html.erb @@ -22,7 +22,7 @@ - <%= link_to_if_orvos_object g %> + <%= link_to_if_arvados_object g %> <%= g.name %> diff --git a/apps/workbench/app/views/groups/show.html.erb b/apps/workbench/app/views/groups/show.html.erb index 9a3b85f00c..3b3a9dff3b 100644 --- a/apps/workbench/app/views/groups/show.html.erb +++ b/apps/workbench/app/views/groups/show.html.erb @@ -5,7 +5,7 @@
- <%= render partial: 'application/orvos_object' %> + <%= render partial: 'application/arvados_object' %>
@@ -29,7 +29,7 @@ <%= name %>
<% end %> <% j.script_parameters.sort.each do |k,v| %> - + <% end %> - +
- <%= link_to_if_orvos_object collection %> + <%= link_to_if_arvados_object collection %> <% if @keep_flag[collection.uuid] %> diff --git a/apps/workbench/app/views/jobs/index.html.erb b/apps/workbench/app/views/jobs/index.html.erb index 0de45abc60..efbd146773 100644 --- a/apps/workbench/app/views/jobs/index.html.erb +++ b/apps/workbench/app/views/jobs/index.html.erb @@ -39,7 +39,7 @@ <% else %> <% end %> - <%= link_to_if_orvos_object j.uuid %> + <%= link_to_if_arvados_object j.uuid %> <% if j.started_at and not j.finished_at %> @@ -92,11 +92,11 @@
<%= k %><%= link_to_if_orvos_object v %><%= k %><%= link_to_if_arvados_object v %>
output<%= link_to_if_orvos_object j.output %>output<%= link_to_if_arvados_object j.output %>
diff --git a/apps/workbench/app/views/jobs/show.html.erb b/apps/workbench/app/views/jobs/show.html.erb index 68f5fa9a54..90790856ae 100644 --- a/apps/workbench/app/views/jobs/show.html.erb +++ b/apps/workbench/app/views/jobs/show.html.erb @@ -1 +1 @@ -<%= render :partial => 'application/orvos_object' %> +<%= render :partial => 'application/arvados_object' %> diff --git a/apps/workbench/app/views/logs/show.html.erb b/apps/workbench/app/views/logs/show.html.erb index 68f5fa9a54..90790856ae 100644 --- a/apps/workbench/app/views/logs/show.html.erb +++ b/apps/workbench/app/views/logs/show.html.erb @@ -1 +1 @@ -<%= render :partial => 'application/orvos_object' %> +<%= render :partial => 'application/arvados_object' %> diff --git a/apps/workbench/app/views/pipeline_instances/index.html.erb b/apps/workbench/app/views/pipeline_instances/index.html.erb index 8d6073cc3d..3b73fb198e 100644 --- a/apps/workbench/app/views/pipeline_instances/index.html.erb +++ b/apps/workbench/app/views/pipeline_instances/index.html.erb @@ -32,13 +32,13 @@ active <% end %> - <%= link_to_if_orvos_object ob %> + <%= link_to_if_arvados_object ob %> <%= ob.name %> - <%= link_to_if_orvos_object ob.pipeline_template_uuid %> + <%= link_to_if_arvados_object ob.pipeline_template_uuid %> - <%= link_to_if_orvos_object ob.owner %> + <%= link_to_if_arvados_object ob.owner %> <% ob.components.each do |cname, c| %> <% status = if !c[:job] then nil elsif c[:job][:success] then 'success' elsif c[:job][:running] then 'info' else 'warning' end %> diff --git a/apps/workbench/app/views/pipeline_instances/show.html.erb b/apps/workbench/app/views/pipeline_instances/show.html.erb index d278c808aa..74c090de02 100644 --- a/apps/workbench/app/views/pipeline_instances/show.html.erb +++ b/apps/workbench/app/views/pipeline_instances/show.html.erb @@ -23,7 +23,7 @@ <% else %> - <%= render partial: 'application/orvos_object_attr', locals: { attr: attr, attrvalue: attrvalue } %> + <%= render partial: 'application/arvados_object_attr', locals: { attr: attr, attrvalue: attrvalue } %> <% end %> <% end %> diff --git a/apps/workbench/app/views/pipeline_templates/index.html.erb b/apps/workbench/app/views/pipeline_templates/index.html.erb index 4879a0b1dc..15caf7a3f5 100644 --- a/apps/workbench/app/views/pipeline_templates/index.html.erb +++ b/apps/workbench/app/views/pipeline_templates/index.html.erb @@ -18,11 +18,11 @@ - <%= link_to_if_orvos_object ob %> + <%= link_to_if_arvados_object ob %> <%= ob.name %> - <%= link_to_if_orvos_object ob.owner %> + <%= link_to_if_arvados_object ob.owner %> <%= ob.components.collect { |k,v| k.to_s }.join(", ") %> diff --git a/apps/workbench/app/views/pipeline_templates/show.html.erb b/apps/workbench/app/views/pipeline_templates/show.html.erb index 6af7f4eb62..097347bd73 100644 --- a/apps/workbench/app/views/pipeline_templates/show.html.erb +++ b/apps/workbench/app/views/pipeline_templates/show.html.erb @@ -32,7 +32,7 @@ <% else %> - <%= render partial: 'application/orvos_object_attr', locals: { attr: attr, attrvalue: attrvalue } %> + <%= render partial: 'application/arvados_object_attr', locals: { attr: attr, attrvalue: attrvalue } %> <% end %> <% end %> diff --git a/apps/workbench/app/views/specimens/show.html.erb b/apps/workbench/app/views/specimens/show.html.erb index 68f5fa9a54..90790856ae 100644 --- a/apps/workbench/app/views/specimens/show.html.erb +++ b/apps/workbench/app/views/specimens/show.html.erb @@ -1 +1 @@ -<%= render :partial => 'application/orvos_object' %> +<%= render :partial => 'application/arvados_object' %> diff --git a/apps/workbench/app/views/users/show.html.erb b/apps/workbench/app/views/users/show.html.erb index 68f5fa9a54..90790856ae 100644 --- a/apps/workbench/app/views/users/show.html.erb +++ b/apps/workbench/app/views/users/show.html.erb @@ -1 +1 @@ -<%= render :partial => 'application/orvos_object' %> +<%= render :partial => 'application/arvados_object' %> diff --git a/apps/workbench/config.ru b/apps/workbench/config.ru index 0ba0161dc1..c0b36964ec 100644 --- a/apps/workbench/config.ru +++ b/apps/workbench/config.ru @@ -1,4 +1,4 @@ # This file is used by Rack-based servers to start the application. require ::File.expand_path('../config/environment', __FILE__) -run Vcffarm::Application +run ArvadosWorkbench::Application diff --git a/apps/workbench/config/application.rb b/apps/workbench/config/application.rb index 107c0cd9e0..0e1ec9604c 100644 --- a/apps/workbench/config/application.rb +++ b/apps/workbench/config/application.rb @@ -9,7 +9,7 @@ if defined?(Bundler) # Bundler.require(:default, :assets, Rails.env) end -module Vcffarm +module ArvadosWorkbench class Application < Rails::Application # Settings in config/environments/* take precedence over those specified here. # Application configuration should go into files in config/initializers diff --git a/apps/workbench/config/boot.rb b/apps/workbench/config/boot.rb index f6d584d561..13513bd5e4 100644 --- a/apps/workbench/config/boot.rb +++ b/apps/workbench/config/boot.rb @@ -5,12 +5,12 @@ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE']) -# Use ORVOS_API_TOKEN environment variable (if set) in console +# Use ARVADOS_API_TOKEN environment variable (if set) in console require 'rails' -module OrvosApiClientConsoleMode +module ArvadosApiClientConsoleMode class Railtie < Rails::Railtie console do - Thread.current[:orvos_api_token] ||= ENV['ORVOS_API_TOKEN'] + Thread.current[:arvados_api_token] ||= ENV['ARVADOS_API_TOKEN'] end end end diff --git a/apps/workbench/config/environment.rb b/apps/workbench/config/environment.rb index 8f73935cf8..c6d8386787 100644 --- a/apps/workbench/config/environment.rb +++ b/apps/workbench/config/environment.rb @@ -2,4 +2,4 @@ require File.expand_path('../application', __FILE__) # Initialize the rails application -Vcffarm::Application.initialize! +ArvadosWorkbench::Application.initialize! diff --git a/apps/workbench/config/environments/development.rb.example b/apps/workbench/config/environments/development.rb.example index cbbe35e14f..4ef934aa72 100644 --- a/apps/workbench/config/environments/development.rb.example +++ b/apps/workbench/config/environments/development.rb.example @@ -1,4 +1,4 @@ -Vcffarm::Application.configure do +ArvadosWorkbench::Application.configure do # Settings specified here will take precedence over those in config/application.rb # In the development environment your application's code is reloaded on @@ -35,13 +35,13 @@ Vcffarm::Application.configure do # Expands the lines which load the assets config.assets.debug = true - config.orvos_login_base = 'http://orvos.local/login' - config.orvos_v1_base = 'http://orvos.local/orvos/v1' + config.arvados_login_base = 'http://arvados.local/login' + config.arvados_v1_base = 'http://arvados.local/arvados/v1' - config.data_import_dir = '/tmp/vcffarm-upload' - config.data_export_dir = '/tmp/vcffarm-download' + config.data_import_dir = '/tmp/arvados-workbench-upload' + config.data_export_dir = '/tmp/arvados-workbench-download' config.secret_token = File.read('config/.secret_token') if File.exist? 'config/.secret_token' - config.site_name = 'vcffarm.example.com' + config.site_name = 'arvados-workbench.example.com' end diff --git a/apps/workbench/config/environments/production.rb b/apps/workbench/config/environments/production.rb index c7d6aa78c4..85f3e88628 100644 --- a/apps/workbench/config/environments/production.rb +++ b/apps/workbench/config/environments/production.rb @@ -1,4 +1,4 @@ -Vcffarm::Application.configure do +ArvadosWorkbench::Application.configure do # Settings specified here will take precedence over those in config/application.rb # Code is not reloaded between requests @@ -65,11 +65,11 @@ Vcffarm::Application.configure do # with SQLite, MySQL, and PostgreSQL) # config.active_record.auto_explain_threshold_in_seconds = 0.5 - config.orvos_login_base = 'https://9ujm1.orvosapi.com/login' - config.orvos_v1_base = 'https://9ujm1.orvosapi.com/orvos/v1' + config.arvados_login_base = 'https://arvados.local/login' + config.arvados_v1_base = 'https://arvados.local/arvados/v1' - config.data_import_dir = '/data/vcffarm-upload/data' - config.data_export_dir = '/data/vcffarm-download/data' + config.data_import_dir = '/data/arvados-workbench-upload/data' + config.data_export_dir = '/data/arvados-workbench-download/data' # Authentication stub: hard code pre-approved API tokens. # config.accept_api_token = { rand(2**256).to_s(36) => true } @@ -77,5 +77,5 @@ Vcffarm::Application.configure do config.vcf_pipeline_uuid = '9ujm1-mxsvm-o62u4mdoxvs0ckp' - config.site_name = 'vcffarm.example.com' + config.site_name = 'arvados-workbench.example.com' end diff --git a/apps/workbench/config/environments/test.rb b/apps/workbench/config/environments/test.rb index 93ee59c374..5fbcba3738 100644 --- a/apps/workbench/config/environments/test.rb +++ b/apps/workbench/config/environments/test.rb @@ -1,4 +1,4 @@ -Vcffarm::Application.configure do +ArvadosWorkbench::Application.configure do # Settings specified here will take precedence over those in config/application.rb # The test environment is used exclusively to run your application's @@ -35,11 +35,11 @@ Vcffarm::Application.configure do # Print deprecation notices to the stderr config.active_support.deprecation = :stderr - config.orvos_login_base = 'http://orvos/login' - config.orvos_v1_base = 'https://orvos/orvos/v1' + config.arvados_login_base = 'http://arvados.local/login' + config.arvados_v1_base = 'https://arvados.local/arvados/v1' - config.data_import_dir = '/data/vcffarm-upload' - config.data_export_dir = '/data/vcffarm-download' + config.data_import_dir = '/data/arvados-workbench-upload' + config.data_export_dir = '/data/arvados-workbench-download' # Authentication stub: hard code pre-approved API tokens. # config.accept_api_token = { rand(2**256).to_s(36) => true } @@ -47,5 +47,5 @@ Vcffarm::Application.configure do config.vcf_pipeline_uuid = '9ujm1-mxsvm-o62u4mdoxvs0ckp' - config.site_name = 'vcffarm.example.com' + config.site_name = 'arvados-workbench.example.com' end diff --git a/apps/workbench/config/initializers/arvados_api_client.rb b/apps/workbench/config/initializers/arvados_api_client.rb new file mode 100644 index 0000000000..6222ab51f8 --- /dev/null +++ b/apps/workbench/config/initializers/arvados_api_client.rb @@ -0,0 +1 @@ +$arvados_api_client = ArvadosApiClient.new diff --git a/apps/workbench/config/initializers/orvos_api_client.rb b/apps/workbench/config/initializers/orvos_api_client.rb deleted file mode 100644 index 0da9d21fbd..0000000000 --- a/apps/workbench/config/initializers/orvos_api_client.rb +++ /dev/null @@ -1 +0,0 @@ -$orvos_api_client = OrvosApiClient.new diff --git a/apps/workbench/config/initializers/secret_token.rb b/apps/workbench/config/initializers/secret_token.rb index b72b50db29..fb1c1c1645 100644 --- a/apps/workbench/config/initializers/secret_token.rb +++ b/apps/workbench/config/initializers/secret_token.rb @@ -4,4 +4,4 @@ # If you change this key, all old signed cookies will become invalid! # Make sure the secret is at least 30 characters and all random, # no regular words or you'll be exposed to dictionary attacks. -Vcffarm::Application.config.secret_token ||= rand(2**256).to_s(36) +ArvadosWorkbench::Application.config.secret_token ||= rand(2**256).to_s(36) diff --git a/apps/workbench/config/initializers/session_store.rb b/apps/workbench/config/initializers/session_store.rb index 32d8443a5e..2d49dca0ed 100644 --- a/apps/workbench/config/initializers/session_store.rb +++ b/apps/workbench/config/initializers/session_store.rb @@ -1,8 +1,8 @@ # Be sure to restart your server when you modify this file. -Vcffarm::Application.config.session_store :cookie_store, key: '_vcffarm_session' +ArvadosWorkbench::Application.config.session_store :cookie_store, key: '_arvados_workbench_session' # Use the database for sessions instead of the cookie-based default, # which shouldn't be used to store highly confidential information # (create the session table with "rails generate session_migration") -# Vcffarm::Application.config.session_store :active_record_store +# ArvadosWorkbench::Application.config.session_store :active_record_store diff --git a/apps/workbench/config/routes.rb b/apps/workbench/config/routes.rb index b927bd88d7..dec161d6c5 100644 --- a/apps/workbench/config/routes.rb +++ b/apps/workbench/config/routes.rb @@ -1,4 +1,4 @@ -Vcffarm::Application.routes.draw do +ArvadosWorkbench::Application.routes.draw do resources :job_tasks diff --git a/doc/api/Jobs.textile b/doc/api/Jobs.textile index 08ac010f55..8de25030c9 100644 --- a/doc/api/Jobs.textile +++ b/doc/api/Jobs.textile @@ -14,7 +14,7 @@ Applications submit compute jobs when: h2. Methods -See "REST methods for working with Orvos resources":methods.html +See "REST methods for working with Arvados resources":methods.html API endpoint base: @https://xyzzy.arvados.org/arvados/v1/jobs@ diff --git a/sdk/cli/wh b/sdk/cli/wh index 55131b78b5..e22c9ab3a3 100755 --- a/sdk/cli/wh +++ b/sdk/cli/wh @@ -1,6 +1,6 @@ #!/usr/bin/env ruby -# Orvos cli client +# Arvados cli client # # Ward Vandewege @@ -10,11 +10,11 @@ if RUBY_VERSION < '1.9.3' then EOS end -ENV['ORVOS_API_VERSION'] ||= 'v1' +ENV['ARVADOS_API_VERSION'] ||= 'v1' -if not ENV.include?('ORVOS_API_HOST') or not ENV.include?('ORVOS_API_TOKEN') then +if not ENV.include?('ARVADOS_API_HOST') or not ENV.include?('ARVADOS_API_TOKEN') then abort <<-EOS -ORVOS_API_HOST and ORVOS_API_TOKEN need to be defined as environment variables. +ARVADOS_API_HOST and ARVADOS_API_TOKEN need to be defined as environment variables. EOS end @@ -63,8 +63,8 @@ class Google::APIClient end end -client = Google::APIClient.new(:host => ENV['ORVOS_API_HOST'], :application_name => 'wh-cli', :application_version => '1.0') -orvos = client.discovered_api('orvos', ENV['ORVOS_API_VERSION']) +client = Google::APIClient.new(:host => ENV['ARVADOS_API_HOST'], :application_name => 'wh-cli', :application_version => '1.0') +arvados = client.discovered_api('arvados', ENV['ARVADOS_API_VERSION']) def to_boolean(s) !!(s =~ /^(true|t|yes|y|1)$/i) @@ -78,7 +78,7 @@ def parse_arguments(discovery_document) end global_opts = Trollop::options do - banner "orvos cli client" + banner "arvados cli client" opt :dry_run, "Don't actually do anything", :short => "-n" stop_on sub_commands end @@ -136,7 +136,7 @@ def parse_arguments(discovery_document) end else - banner = "\nThis Orvos cluster supports the following api commands:\n\n" + banner = "\nThis Arvados cluster supports the following api commands:\n\n" discovery_document["resources"].each do |k,v| description = '' if discovery_document["schemas"].include?(k.singularize.capitalize) and @@ -159,13 +159,13 @@ def parse_arguments(discovery_document) return cmd, method, method_opts, ARGV end -cmd, method, method_opts, remaining_opts = parse_arguments(orvos.discovery_document) +cmd, method, method_opts, remaining_opts = parse_arguments(arvados.discovery_document) -api_method = 'orvos.' + cmd + '.' + method +api_method = 'arvados.' + cmd + '.' + method m_o = method_opts.reject {|key,value| key =~ /_given$|^json$|^jsonhuman$|^help$/ or value == nil } -result = client.execute :api_method => eval(api_method), :parameters => { :api_token => ENV['ORVOS_API_TOKEN'] }.merge(m_o), :authenticated => false +result = client.execute :api_method => eval(api_method), :parameters => { :api_token => ENV['ARVADOS_API_TOKEN'] }.merge(m_o), :authenticated => false results = JSON.parse result.body if results["errors"] then diff --git a/sdk/cli/wh-run-pipeline-instance b/sdk/cli/wh-run-pipeline-instance index fd7e6a2243..a3e2c4b820 100755 --- a/sdk/cli/wh-run-pipeline-instance +++ b/sdk/cli/wh-run-pipeline-instance @@ -60,11 +60,11 @@ if RUBY_VERSION < '1.9.3' then EOS end -$orvos_api_version = ENV['ORVOS_API_VERSION'] || 'v1' -$orvos_api_host = ENV['ORVOS_API_HOST'] or - abort "#{$0}: fatal: ORVOS_API_HOST environment variable not set." -$orvos_api_token = ENV['ORVOS_API_TOKEN'] or - abort "#{$0}: fatal: ORVOS_API_TOKEN environment variable not set." +$arvados_api_version = ENV['ARVADOS_API_VERSION'] || 'v1' +$arvados_api_host = ENV['ARVADOS_API_HOST'] or + abort "#{$0}: fatal: ARVADOS_API_HOST environment variable not set." +$arvados_api_token = ENV['ARVADOS_API_TOKEN'] or + abort "#{$0}: fatal: ARVADOS_API_TOKEN environment variable not set." begin require 'rubygems' @@ -93,7 +93,7 @@ module Kernel end end -if $orvos_api_host.match /local/ +if $arvados_api_host.match /local/ # You probably don't care about SSL certificate checks if you're # testing with a dev server. suppress_warnings { OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE } @@ -174,17 +174,17 @@ end # Set up the API client. $client ||= Google::APIClient. - new(:host => $orvos_api_host, + new(:host => $arvados_api_host, :application_name => File.split($0).last, :application_version => $application_version.to_s) -$orvos = $client.discovered_api('orvos', $orvos_api_version) +$arvados = $client.discovered_api('arvados', $arvados_api_version) class PipelineInstance def self.find(uuid) - result = $client.execute(:api_method => $orvos.pipeline_instances.get, + result = $client.execute(:api_method => $arvados.pipeline_instances.get, :parameters => { - :api_token => ENV['ORVOS_API_TOKEN'], + :api_token => ENV['ARVADOS_API_TOKEN'], :uuid => uuid }, :authenticated => false) @@ -198,9 +198,9 @@ class PipelineInstance end end def self.create(attributes) - result = $client.execute(:api_method => $orvos.pipeline_instances.create, + result = $client.execute(:api_method => $arvados.pipeline_instances.create, :parameters => { - :api_token => ENV['ORVOS_API_TOKEN'], + :api_token => ENV['ARVADOS_API_TOKEN'], :pipeline_instance => attributes.to_json }, :authenticated => false) @@ -212,9 +212,9 @@ class PipelineInstance self.new(j) end def save - result = $client.execute(:api_method => $orvos.pipeline_instances.update, + result = $client.execute(:api_method => $arvados.pipeline_instances.update, :parameters => { - :api_token => ENV['ORVOS_API_TOKEN'], + :api_token => ENV['ARVADOS_API_TOKEN'], :uuid => @pi[:uuid], :pipeline_instance => @attributes_to_update.to_json }, @@ -245,18 +245,18 @@ end class JobCache def self.get(uuid) @cache ||= {} - result = $client.execute(:api_method => $orvos.jobs.get, + result = $client.execute(:api_method => $arvados.jobs.get, :parameters => { - :api_token => ENV['ORVOS_API_TOKEN'], + :api_token => ENV['ARVADOS_API_TOKEN'], :uuid => uuid }, :authenticated => false) @cache[uuid] = JSON.parse result.body, :symbolize_names => true end def self.where(conditions) - result = $client.execute(:api_method => $orvos.jobs.list, + result = $client.execute(:api_method => $arvados.jobs.list, :parameters => { - :api_token => ENV['ORVOS_API_TOKEN'], + :api_token => ENV['ARVADOS_API_TOKEN'], :limit => 10000, :where => conditions.to_json }, @@ -270,9 +270,9 @@ class JobCache end def self.create(attributes) @cache ||= {} - result = $client.execute(:api_method => $orvos.jobs.create, + result = $client.execute(:api_method => $arvados.jobs.create, :parameters => { - :api_token => ENV['ORVOS_API_TOKEN'], + :api_token => ENV['ARVADOS_API_TOKEN'], :job => attributes.to_json }, :authenticated => false) @@ -294,9 +294,9 @@ class WhRunPipelineInstance end def fetch_template(template_uuid) - result = $client.execute(:api_method => $orvos.pipeline_templates.get, + result = $client.execute(:api_method => $arvados.pipeline_templates.get, :parameters => { - :api_token => ENV['ORVOS_API_TOKEN'], + :api_token => ENV['ARVADOS_API_TOKEN'], :uuid => template_uuid }, :authenticated => false) diff --git a/services/api/app/controllers/application_controller.rb b/services/api/app/controllers/application_controller.rb index a80d93e42f..fb4c7adfbd 100644 --- a/services/api/app/controllers/application_controller.rb +++ b/services/api/app/controllers/application_controller.rb @@ -275,7 +275,7 @@ class ApplicationController < ActionController::Base def render_list @object_list = { - :kind => "orvos##{resource_name}List", + :kind => "arvados##{resource_name}List", :etag => "", :self_link => "", :next_page_token => "", diff --git a/services/api/app/controllers/orvos/v1/collections_controller.rb b/services/api/app/controllers/arvados/v1/collections_controller.rb similarity index 90% rename from services/api/app/controllers/orvos/v1/collections_controller.rb rename to services/api/app/controllers/arvados/v1/collections_controller.rb index a1afd1e715..a719de9283 100644 --- a/services/api/app/controllers/orvos/v1/collections_controller.rb +++ b/services/api/app/controllers/arvados/v1/collections_controller.rb @@ -1,4 +1,4 @@ -class Orvos::V1::CollectionsController < ApplicationController +class Arvados::V1::CollectionsController < ApplicationController def create # It's not an error for a client to re-register a manifest that we # already know about. diff --git a/services/api/app/controllers/arvados/v1/groups_controller.rb b/services/api/app/controllers/arvados/v1/groups_controller.rb new file mode 100644 index 0000000000..f742fa9d71 --- /dev/null +++ b/services/api/app/controllers/arvados/v1/groups_controller.rb @@ -0,0 +1,2 @@ +class Arvados::V1::GroupsController < ApplicationController +end diff --git a/services/api/app/controllers/arvados/v1/job_tasks_controller.rb b/services/api/app/controllers/arvados/v1/job_tasks_controller.rb new file mode 100644 index 0000000000..d2916242ef --- /dev/null +++ b/services/api/app/controllers/arvados/v1/job_tasks_controller.rb @@ -0,0 +1,2 @@ +class Arvados::V1::JobTasksController < ApplicationController +end diff --git a/services/api/app/controllers/orvos/v1/jobs_controller.rb b/services/api/app/controllers/arvados/v1/jobs_controller.rb similarity index 96% rename from services/api/app/controllers/orvos/v1/jobs_controller.rb rename to services/api/app/controllers/arvados/v1/jobs_controller.rb index 6b14db9ecb..6fbf0fb1bb 100644 --- a/services/api/app/controllers/orvos/v1/jobs_controller.rb +++ b/services/api/app/controllers/arvados/v1/jobs_controller.rb @@ -1,4 +1,4 @@ -class Orvos::V1::JobsController < ApplicationController +class Arvados::V1::JobsController < ApplicationController accept_attribute_as_json :script_parameters, Hash accept_attribute_as_json :resource_limits, Hash accept_attribute_as_json :tasks_summary, Hash diff --git a/services/api/app/controllers/orvos/v1/links_controller.rb b/services/api/app/controllers/arvados/v1/links_controller.rb similarity index 79% rename from services/api/app/controllers/orvos/v1/links_controller.rb rename to services/api/app/controllers/arvados/v1/links_controller.rb index 046f6838f2..deeda2869b 100644 --- a/services/api/app/controllers/orvos/v1/links_controller.rb +++ b/services/api/app/controllers/arvados/v1/links_controller.rb @@ -1,4 +1,4 @@ -class Orvos::V1::LinksController < ApplicationController +class Arvados::V1::LinksController < ApplicationController def index if params[:tail_uuid] params[:where] = Oj.load(params[:where]) if params[:where].is_a?(String) diff --git a/services/api/app/controllers/arvados/v1/logs_controller.rb b/services/api/app/controllers/arvados/v1/logs_controller.rb new file mode 100644 index 0000000000..dffe662e7f --- /dev/null +++ b/services/api/app/controllers/arvados/v1/logs_controller.rb @@ -0,0 +1,2 @@ +class Arvados::V1::LogsController < ApplicationController +end diff --git a/services/api/app/controllers/orvos/v1/nodes_controller.rb b/services/api/app/controllers/arvados/v1/nodes_controller.rb similarity index 73% rename from services/api/app/controllers/orvos/v1/nodes_controller.rb rename to services/api/app/controllers/arvados/v1/nodes_controller.rb index 105fe95a47..67a5fab6ad 100644 --- a/services/api/app/controllers/orvos/v1/nodes_controller.rb +++ b/services/api/app/controllers/arvados/v1/nodes_controller.rb @@ -1,10 +1,10 @@ -class Orvos::V1::NodesController < ApplicationController +class Arvados::V1::NodesController < ApplicationController skip_before_filter :login_required, :only => :ping def create @object = Node.new @object.save! - @object.start!(lambda { |h| orvos_v1_ping_node_url(h) }) + @object.start!(lambda { |h| arvados_v1_ping_node_url(h) }) show end diff --git a/services/api/app/controllers/orvos/v1/pipeline_instances_controller.rb b/services/api/app/controllers/arvados/v1/pipeline_instances_controller.rb similarity index 56% rename from services/api/app/controllers/orvos/v1/pipeline_instances_controller.rb rename to services/api/app/controllers/arvados/v1/pipeline_instances_controller.rb index af68503ee1..8f0b93f432 100644 --- a/services/api/app/controllers/orvos/v1/pipeline_instances_controller.rb +++ b/services/api/app/controllers/arvados/v1/pipeline_instances_controller.rb @@ -1,4 +1,4 @@ -class Orvos::V1::PipelineInstancesController < ApplicationController +class Arvados::V1::PipelineInstancesController < ApplicationController accept_attribute_as_json :components, Hash accept_attribute_as_json :properties, Hash end diff --git a/services/api/app/controllers/arvados/v1/pipeline_templates_controller.rb b/services/api/app/controllers/arvados/v1/pipeline_templates_controller.rb new file mode 100644 index 0000000000..a2c6d0b97d --- /dev/null +++ b/services/api/app/controllers/arvados/v1/pipeline_templates_controller.rb @@ -0,0 +1,3 @@ +class Arvados::V1::PipelineTemplatesController < ApplicationController + accept_attribute_as_json :components, Hash +end diff --git a/services/api/app/controllers/orvos/v1/schema_controller.rb b/services/api/app/controllers/arvados/v1/schema_controller.rb similarity index 83% rename from services/api/app/controllers/orvos/v1/schema_controller.rb rename to services/api/app/controllers/arvados/v1/schema_controller.rb index 166ab5fad0..6721b44432 100644 --- a/services/api/app/controllers/orvos/v1/schema_controller.rb +++ b/services/api/app/controllers/arvados/v1/schema_controller.rb @@ -1,9 +1,9 @@ -class Orvos::V1::SchemaController < ApplicationController +class Arvados::V1::SchemaController < ApplicationController skip_before_filter :find_object_by_uuid skip_before_filter :login_required def show - classes = Rails.cache.fetch 'orvos_v1_schema' do + classes = Rails.cache.fetch 'arvados_v1_schema' do Rails.application.eager_load! classes = {} ActiveRecord::Base.descendants.reject(&:abstract_class?).each do |k| @@ -23,23 +23,23 @@ class Orvos::V1::SchemaController < ApplicationController end def discovery_rest_description - discovery = Rails.cache.fetch 'orvos_v1_rest_discovery' do + discovery = Rails.cache.fetch 'arvados_v1_rest_discovery' do Rails.application.eager_load! discovery = { kind: "discovery#restDescription", discoveryVersion: "v1", - id: "orvos:v1", - name: "orvos", + id: "arvados:v1", + name: "arvados", version: "v1", revision: "20130226", - title: "Orvos API", - description: "The API to interact with Orvos.", - documentationLink: "https://redmine.clinicalfuture.com/projects/orvos/", + title: "Arvados API", + description: "The API to interact with Arvados.", + documentationLink: "https://redmine.clinicalfuture.com/projects/arvados/", protocol: "rest", - baseUrl: root_url + "/orvos/v1/", - basePath: "/orvos/v1/", + baseUrl: root_url + "/arvados/v1/", + basePath: "/arvados/v1/", rootUrl: root_url, - servicePath: "orvos/v1/", + servicePath: "arvados/v1/", batchPath: "batch", parameters: { alt: { @@ -73,10 +73,10 @@ class Orvos::V1::SchemaController < ApplicationController auth: { oauth2: { scopes: { - "https://api.clinicalfuture.com/auth/orvos" => { + "https://api.clinicalfuture.com/auth/arvados" => { description: "View and manage objects" }, - "https://api.clinicalfuture.com/auth/orvos.readonly" => { + "https://api.clinicalfuture.com/auth/arvados.readonly" => { description: "View objects" } } @@ -110,8 +110,8 @@ class Orvos::V1::SchemaController < ApplicationController properties: { kind: { type: "string", - description: "Object type. Always orvos##{k.to_s.camelcase(:lower)}List.", - default: "orvos##{k.to_s.camelcase(:lower)}List" + description: "Object type. Always arvados##{k.to_s.camelcase(:lower)}List.", + default: "arvados##{k.to_s.camelcase(:lower)}List" }, etag: { type: "string", @@ -156,7 +156,7 @@ class Orvos::V1::SchemaController < ApplicationController discovery[:resources][k.to_s.underscore.pluralize] = { methods: { get: { - id: "orvos.#{k.to_s.underscore.pluralize}.get", + id: "arvados.#{k.to_s.underscore.pluralize}.get", path: "#{k.to_s.underscore.pluralize}/{uuid}", httpMethod: "GET", description: "Gets a #{k.to_s}'s metadata by UUID.", @@ -175,12 +175,12 @@ class Orvos::V1::SchemaController < ApplicationController "$ref" => k.to_s }, scopes: [ - "https://api.clinicalfuture.com/auth/orvos", - "https://api.clinicalfuture.com/auth/orvos.readonly" + "https://api.clinicalfuture.com/auth/arvados", + "https://api.clinicalfuture.com/auth/arvados.readonly" ] }, list: { - id: "orvos.#{k.to_s.underscore.pluralize}.list", + id: "arvados.#{k.to_s.underscore.pluralize}.list", path: k.to_s.underscore.pluralize, httpMethod: "GET", description: "List #{k.to_s.underscore.pluralize}.", @@ -208,12 +208,12 @@ class Orvos::V1::SchemaController < ApplicationController "$ref" => "#{k.to_s}List" }, scopes: [ - "https://api.clinicalfuture.com/auth/orvos", - "https://api.clinicalfuture.com/auth/orvos.readonly" + "https://api.clinicalfuture.com/auth/arvados", + "https://api.clinicalfuture.com/auth/arvados.readonly" ] }, create: { - id: "orvos.#{k.to_s.underscore.pluralize}.create", + id: "arvados.#{k.to_s.underscore.pluralize}.create", path: "#{k.to_s.underscore.pluralize}", httpMethod: "POST", description: "Create a new #{k.to_s}.", @@ -232,11 +232,11 @@ class Orvos::V1::SchemaController < ApplicationController "$ref" => k.to_s }, scopes: [ - "https://api.clinicalfuture.com/auth/orvos" + "https://api.clinicalfuture.com/auth/arvados" ] }, update: { - id: "orvos.#{k.to_s.underscore.pluralize}.update", + id: "arvados.#{k.to_s.underscore.pluralize}.update", path: "#{k.to_s.underscore.pluralize}/{uuid}", httpMethod: "PUT", description: "Update attributes of an existing #{k.to_s}.", @@ -261,11 +261,11 @@ class Orvos::V1::SchemaController < ApplicationController "$ref" => k.to_s }, scopes: [ - "https://api.clinicalfuture.com/auth/orvos" + "https://api.clinicalfuture.com/auth/arvados" ] }, delete: { - id: "orvos.#{k.to_s.underscore.pluralize}.delete", + id: "arvados.#{k.to_s.underscore.pluralize}.delete", path: "#{k.to_s.underscore.pluralize}/{uuid}", httpMethod: "DELETE", description: "Delete an existing #{k.to_s}.", @@ -281,7 +281,7 @@ class Orvos::V1::SchemaController < ApplicationController "$ref" => k.to_s }, scopes: [ - "https://api.clinicalfuture.com/auth/orvos" + "https://api.clinicalfuture.com/auth/arvados" ] } } diff --git a/services/api/app/controllers/arvados/v1/specimens_controller.rb b/services/api/app/controllers/arvados/v1/specimens_controller.rb new file mode 100644 index 0000000000..24d3830624 --- /dev/null +++ b/services/api/app/controllers/arvados/v1/specimens_controller.rb @@ -0,0 +1,2 @@ +class Arvados::V1::SpecimensController < ApplicationController +end diff --git a/services/api/app/controllers/orvos/v1/users_controller.rb b/services/api/app/controllers/arvados/v1/users_controller.rb similarity index 50% rename from services/api/app/controllers/orvos/v1/users_controller.rb rename to services/api/app/controllers/arvados/v1/users_controller.rb index 7fc0f47d49..b6266f7047 100644 --- a/services/api/app/controllers/orvos/v1/users_controller.rb +++ b/services/api/app/controllers/arvados/v1/users_controller.rb @@ -1,4 +1,4 @@ -class Orvos::V1::UsersController < ApplicationController +class Arvados::V1::UsersController < ApplicationController def current @object = current_user show diff --git a/services/api/app/controllers/orvos/v1/groups_controller.rb b/services/api/app/controllers/orvos/v1/groups_controller.rb deleted file mode 100644 index 019318af65..0000000000 --- a/services/api/app/controllers/orvos/v1/groups_controller.rb +++ /dev/null @@ -1,2 +0,0 @@ -class Orvos::V1::GroupsController < ApplicationController -end diff --git a/services/api/app/controllers/orvos/v1/job_tasks_controller.rb b/services/api/app/controllers/orvos/v1/job_tasks_controller.rb deleted file mode 100644 index 1ba0f6c6a8..0000000000 --- a/services/api/app/controllers/orvos/v1/job_tasks_controller.rb +++ /dev/null @@ -1,2 +0,0 @@ -class Orvos::V1::JobTasksController < ApplicationController -end diff --git a/services/api/app/controllers/orvos/v1/logs_controller.rb b/services/api/app/controllers/orvos/v1/logs_controller.rb deleted file mode 100644 index 1860e5de36..0000000000 --- a/services/api/app/controllers/orvos/v1/logs_controller.rb +++ /dev/null @@ -1,2 +0,0 @@ -class Orvos::V1::LogsController < ApplicationController -end diff --git a/services/api/app/controllers/orvos/v1/pipeline_templates_controller.rb b/services/api/app/controllers/orvos/v1/pipeline_templates_controller.rb deleted file mode 100644 index 626c44b9c3..0000000000 --- a/services/api/app/controllers/orvos/v1/pipeline_templates_controller.rb +++ /dev/null @@ -1,3 +0,0 @@ -class Orvos::V1::PipelineTemplatesController < ApplicationController - accept_attribute_as_json :components, Hash -end diff --git a/services/api/app/controllers/orvos/v1/specimens_controller.rb b/services/api/app/controllers/orvos/v1/specimens_controller.rb deleted file mode 100644 index 22620df5e9..0000000000 --- a/services/api/app/controllers/orvos/v1/specimens_controller.rb +++ /dev/null @@ -1,2 +0,0 @@ -class Orvos::V1::SpecimensController < ApplicationController -end diff --git a/services/api/app/controllers/user_sessions_controller.rb b/services/api/app/controllers/user_sessions_controller.rb index 28e7e795cd..537c1aa411 100644 --- a/services/api/app/controllers/user_sessions_controller.rb +++ b/services/api/app/controllers/user_sessions_controller.rb @@ -35,7 +35,7 @@ class UserSessionsController < ApplicationController user.last_name = omniauth['info']['last_name'] end - # prevent OrvosModel#before_create and _update from throwing + # prevent ArvadosModel#before_create and _update from throwing # "unauthorized": Thread.current[:user] = user diff --git a/services/api/app/models/orvos_model.rb b/services/api/app/models/arvados_model.rb similarity index 96% rename from services/api/app/models/orvos_model.rb rename to services/api/app/models/arvados_model.rb index 271b8fd2ba..a4a0148d84 100644 --- a/services/api/app/models/orvos_model.rb +++ b/services/api/app/models/arvados_model.rb @@ -1,4 +1,4 @@ -class OrvosModel < ActiveRecord::Base +class ArvadosModel < ActiveRecord::Base self.abstract_class = true include CurrentApiClient # current_user, current_api_client, etc. @@ -14,7 +14,7 @@ class OrvosModel < ActiveRecord::Base validate :ensure_serialized_attribute_type def self.kind_class(kind) - kind.match(/^orvos\#(.+?)(_list|List)?$/)[1].pluralize.classify.constantize rescue nil + kind.match(/^arvados\#(.+?)(_list|List)?$/)[1].pluralize.classify.constantize rescue nil end def eager_load_associations diff --git a/services/api/app/models/collection.rb b/services/api/app/models/collection.rb index 76dd60fb0a..7403b9a15a 100644 --- a/services/api/app/models/collection.rb +++ b/services/api/app/models/collection.rb @@ -1,4 +1,4 @@ -class Collection < OrvosModel +class Collection < ArvadosModel include AssignUuid include KindAndEtag include CommonApiTemplate diff --git a/services/api/app/models/group.rb b/services/api/app/models/group.rb index f57cf0d58d..94a392d5eb 100644 --- a/services/api/app/models/group.rb +++ b/services/api/app/models/group.rb @@ -1,4 +1,4 @@ -class Group < OrvosModel +class Group < ArvadosModel include AssignUuid include KindAndEtag include CommonApiTemplate diff --git a/services/api/app/models/job.rb b/services/api/app/models/job.rb index e13446b4ae..a50c43c3e0 100644 --- a/services/api/app/models/job.rb +++ b/services/api/app/models/job.rb @@ -1,4 +1,4 @@ -class Job < OrvosModel +class Job < ArvadosModel include AssignUuid include KindAndEtag include CommonApiTemplate diff --git a/services/api/app/models/job_task.rb b/services/api/app/models/job_task.rb index dde1b2f9f9..86f649531d 100644 --- a/services/api/app/models/job_task.rb +++ b/services/api/app/models/job_task.rb @@ -1,4 +1,4 @@ -class JobTask < OrvosModel +class JobTask < ArvadosModel include AssignUuid include KindAndEtag include CommonApiTemplate diff --git a/services/api/app/models/link.rb b/services/api/app/models/link.rb index 5ca5f36004..b685bb6d75 100644 --- a/services/api/app/models/link.rb +++ b/services/api/app/models/link.rb @@ -1,4 +1,4 @@ -class Link < OrvosModel +class Link < ArvadosModel include AssignUuid include KindAndEtag include CommonApiTemplate diff --git a/services/api/app/models/log.rb b/services/api/app/models/log.rb index 58a8734e5b..d856455f4d 100644 --- a/services/api/app/models/log.rb +++ b/services/api/app/models/log.rb @@ -1,4 +1,4 @@ -class Log < OrvosModel +class Log < ArvadosModel include AssignUuid include KindAndEtag include CommonApiTemplate diff --git a/services/api/app/models/node.rb b/services/api/app/models/node.rb index 725344d826..e79f976260 100644 --- a/services/api/app/models/node.rb +++ b/services/api/app/models/node.rb @@ -1,4 +1,4 @@ -class Node < OrvosModel +class Node < ArvadosModel include AssignUuid include KindAndEtag include CommonApiTemplate @@ -61,7 +61,7 @@ class Node < OrvosModel end self.last_ping_at = Time.now - @bypass_orvos_authorization = true + @bypass_arvados_authorization = true # Record IP address if self.ip_address.nil? @@ -184,7 +184,7 @@ class Node < OrvosModel end def permission_to_update - @bypass_orvos_authorization or super + @bypass_arvados_authorization or super end def permission_to_create diff --git a/services/api/app/models/pipeline_instance.rb b/services/api/app/models/pipeline_instance.rb index 6de861d005..0502793971 100644 --- a/services/api/app/models/pipeline_instance.rb +++ b/services/api/app/models/pipeline_instance.rb @@ -1,4 +1,4 @@ -class PipelineInstance < OrvosModel +class PipelineInstance < ArvadosModel include AssignUuid include KindAndEtag include CommonApiTemplate diff --git a/services/api/app/models/pipeline_template.rb b/services/api/app/models/pipeline_template.rb index 97e1426f02..205ce696fa 100644 --- a/services/api/app/models/pipeline_template.rb +++ b/services/api/app/models/pipeline_template.rb @@ -1,4 +1,4 @@ -class PipelineTemplate < OrvosModel +class PipelineTemplate < ArvadosModel include AssignUuid include KindAndEtag include CommonApiTemplate diff --git a/services/api/app/models/specimen.rb b/services/api/app/models/specimen.rb index 15a0c3bf41..ea97fa012a 100644 --- a/services/api/app/models/specimen.rb +++ b/services/api/app/models/specimen.rb @@ -1,4 +1,4 @@ -class Specimen < OrvosModel +class Specimen < ArvadosModel include AssignUuid include KindAndEtag include CommonApiTemplate diff --git a/services/api/app/models/user.rb b/services/api/app/models/user.rb index 0c3eaf1a83..08a19cb8d0 100644 --- a/services/api/app/models/user.rb +++ b/services/api/app/models/user.rb @@ -1,4 +1,4 @@ -class User < OrvosModel +class User < ArvadosModel include AssignUuid include KindAndEtag include CommonApiTemplate @@ -80,7 +80,7 @@ class User < OrvosModel Link.where('tail_uuid in (?) and link_class = ? and head_kind = ?', lookup_uuids, 'permission', - 'orvos#group').each do |link| + 'arvados#group').each do |link| unless done.has_key? link.head_uuid todo[link.head_uuid] = true end diff --git a/services/api/app/views/layouts/application.html.erb b/services/api/app/views/layouts/application.html.erb index 63bc7dc842..5e64cda420 100644 --- a/services/api/app/views/layouts/application.html.erb +++ b/services/api/app/views/layouts/application.html.erb @@ -8,7 +8,7 @@