--- /dev/null
+class Container < ArvadosModel
+
+ api_accessible :user, extend: :common do |t|
+ t.add :command
+ t.add :container_image
+ t.add :cwd
+ t.add :environment
+ t.add :finished_at
+ t.add :log
+ t.add :mounts
+ t.add :output
+ t.add :output_path
+ t.add :priority
+ t.add :progress
+ t.add :runtime_constraints
+ t.add :started_at
+ t.add :state
+ t.add :uuid
+ end
+
+ serialize :properties, Hash
+ serialize :environment, Hash
+ serialize :mounts, Hash
+ serialize :runtime_constraints, Hash
+ serialize :command, Array
+
+ has_many :container_requests, :foreign_key => :container_uuid, :class_name => 'ContainerRequest', :primary_key => :uuid
+end
--- /dev/null
+class ContainerRequest < ArvadosModel
+ api_accessible :user, extend: :common do |t|
+ t.add :command
+ t.add :container_count_max
+ t.add :container_image
+ t.add :container_uuid
+ t.add :cwd
+ t.add :description
+ t.add :environment
+ t.add :expires_at
+ t.add :filters
+ t.add :mounts
+ t.add :name
+ t.add :output_path
+ t.add :priority
+ t.add :properties
+ t.add :requesting_container_uuid
+ t.add :runtime_constraints
+ t.add :state
+ end
+
+ serialize :properties, Hash
+ serialize :environment, Hash
+ serialize :mounts, Hash
+ serialize :runtime_constraints, Hash
+ serialize :command, Array
+
+end
--- /dev/null
+class CreateContainers < ActiveRecord::Migration
+ def change
+ create_table :containers do |t|
+ t.string :uuid
+ t.string :owner_uuid
+ t.datetime :created_at
+ t.datetime :modified_at
+ t.string :modified_by_client_uuid
+ t.string :modified_by_user_uuid
+ t.string :state
+ t.datetime :started_at
+ t.datetime :finished_at
+ t.string :log
+ t.text :environment
+ t.string :cwd
+ t.string :command
+ t.string :output_path
+ t.string :mounts
+ t.string :runtime_constraints
+ t.string :output
+ t.string :container_image
+ t.float :progress
+ t.int :priority
+
+ t.timestamps
+ end
+ end
+end
--- /dev/null
+class CreateContainerRequests < ActiveRecord::Migration
+ def change
+ create_table :container_requests do |t|
+ t.string :uuid
+ t.string :owner_uuid
+ t.datetime :created_at
+ t.datetime :modified_at
+ t.string :modified_by_client_uuid
+ t.string :modified_by_user_uuid
+ t.string :name
+ t.text :description
+ t.string :properties
+ t.string :state
+ t.string :requesting_container_uuid
+ t.string :container_uuid
+ t.int :container_count_max
+ t.string :mounts
+ t.string :runtime_constraints
+ t.string :container_image
+ t.string :environment
+ t.string :cwd
+ t.string :command
+ t.string :output_path
+ t.int :priority
+ t.datetime :expires_at
+ t.string :filters
+
+ t.timestamps
+ end
+ end
+end
--- /dev/null
+# Read about factories at https://github.com/thoughtbot/factory_girl
+
+FactoryGirl.define do
+ factory :container_request do
+ uuid "MyString"
+ owner_uuid "MyString"
+ created_at "2015-12-02 10:17:04"
+ modified_at "2015-12-02 10:17:04"
+ modified_by_client_uuid "MyString"
+ modified_by_user_uuid "MyString"
+ name "MyString"
+ description "MyText"
+ properties "MyString"
+ state "MyString"
+ requesting_container_uuid "MyString"
+ container_uuid "MyString"
+ container_count_max ""
+ mounts "MyString"
+ runtime_constraints "MyString"
+ container_image "MyString"
+ environment "MyString"
+ cwd "MyString"
+ command "MyString"
+ output_path "MyString"
+ priority ""
+ expires_at "2015-12-02 10:17:04"
+ filters "MyString"
+ end
+end
--- /dev/null
+# Read about factories at https://github.com/thoughtbot/factory_girl
+
+FactoryGirl.define do
+ factory :container do
+ uuid "MyString"
+ owner_uuid "MyString"
+ created_at "MyString"
+ modified_at "MyString"
+ modified_by_client_uuid "MyString"
+ modified_by_user_uuid "MyString"
+ state "MyString"
+ started_at "2015-12-02 10:14:26"
+ finished_at "2015-12-02 10:14:26"
+ log "MyString"
+ environment "MyText"
+ cwd "MyString"
+ command "MyString"
+ output_path "MyString"
+ mounts "MyString"
+ runtime_constraints "MyString"
+ output "MyString"
+ container_image "MyString"
+ progress 1.5
+ priority ""
+ end
+end
--- /dev/null
+require 'test_helper'
+
+class ContainerRequestTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
--- /dev/null
+require 'test_helper'
+
+class ContainerTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end