[ARVADOS] updated: 2858d8075d2178fa252af4e585687855e3b30dc2

git at public.curoverse.com git at public.curoverse.com
Thu Dec 3 10:18:49 EST 2015


Summary of changes:
 .../controllers/container_requests_controller.rb   |   2 +
 .../app/controllers/containers_controller.rb       |   2 +
 apps/workbench/app/models/container_requests.rb    |   3 +
 apps/workbench/app/models/containers.rb            |   3 +
 apps/workbench/config/routes.rb                    |   2 +
 .../arvados/v1/container_requests_controller.rb    |   2 +
 .../arvados/v1/containers_controller.rb            |   2 +
 services/api/app/models/container.rb               |   3 +
 services/api/app/models/container_request.rb       |   4 +
 services/api/config/routes.rb                      |   2 +
 .../db/migrate/20151202151426_create_containers.rb |  28 ----
 ...0151202151426_create_containers_and_requests.rb |  59 ++++++++
 .../20151202151703_create_container_requests.rb    |  31 -----
 services/api/db/structure.sql                      | 149 ++++++++++++++++++++-
 14 files changed, 232 insertions(+), 60 deletions(-)
 create mode 100644 apps/workbench/app/controllers/container_requests_controller.rb
 create mode 100644 apps/workbench/app/controllers/containers_controller.rb
 create mode 100644 apps/workbench/app/models/container_requests.rb
 create mode 100644 apps/workbench/app/models/containers.rb
 create mode 100644 services/api/app/controllers/arvados/v1/container_requests_controller.rb
 create mode 100644 services/api/app/controllers/arvados/v1/containers_controller.rb
 delete mode 100644 services/api/db/migrate/20151202151426_create_containers.rb
 create mode 100644 services/api/db/migrate/20151202151426_create_containers_and_requests.rb
 delete mode 100644 services/api/db/migrate/20151202151703_create_container_requests.rb

       via  2858d8075d2178fa252af4e585687855e3b30dc2 (commit)
      from  ec38fcda26fc3a835a56dd9d50aac0650b4dc770 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 2858d8075d2178fa252af4e585687855e3b30dc2
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Thu Dec 3 10:18:39 2015 -0500

    Stub out controllers and routes.  Add basic workbench support.

diff --git a/apps/workbench/app/controllers/container_requests_controller.rb b/apps/workbench/app/controllers/container_requests_controller.rb
new file mode 100644
index 0000000..94cc513
--- /dev/null
+++ b/apps/workbench/app/controllers/container_requests_controller.rb
@@ -0,0 +1,2 @@
+class ContainerRequestsController < ApplicationController
+end
diff --git a/apps/workbench/app/controllers/containers_controller.rb b/apps/workbench/app/controllers/containers_controller.rb
new file mode 100644
index 0000000..57c2700
--- /dev/null
+++ b/apps/workbench/app/controllers/containers_controller.rb
@@ -0,0 +1,2 @@
+class ContainersController < ApplicationController
+end
diff --git a/apps/workbench/app/models/container_requests.rb b/apps/workbench/app/models/container_requests.rb
new file mode 100644
index 0000000..73609c5
--- /dev/null
+++ b/apps/workbench/app/models/container_requests.rb
@@ -0,0 +1,3 @@
+class ContainerRequest < ArvadosBase
+
+end
diff --git a/apps/workbench/app/models/containers.rb b/apps/workbench/app/models/containers.rb
new file mode 100644
index 0000000..bee82ef
--- /dev/null
+++ b/apps/workbench/app/models/containers.rb
@@ -0,0 +1,3 @@
+class Container < ArvadosBase
+
+end
diff --git a/apps/workbench/config/routes.rb b/apps/workbench/config/routes.rb
index 487fb3f..1042609 100644
--- a/apps/workbench/config/routes.rb
+++ b/apps/workbench/config/routes.rb
@@ -17,6 +17,8 @@ ArvadosWorkbench::Application.routes.draw do
   resources :traits
   resources :api_client_authorizations
   resources :virtual_machines
+  resources :containers
+  resources :container_requests
   get '/virtual_machines/:id/webshell/:login' => 'virtual_machines#webshell', :as => :webshell_virtual_machine
   resources :authorized_keys
   resources :job_tasks
diff --git a/services/api/app/controllers/arvados/v1/container_requests_controller.rb b/services/api/app/controllers/arvados/v1/container_requests_controller.rb
new file mode 100644
index 0000000..a92afe4
--- /dev/null
+++ b/services/api/app/controllers/arvados/v1/container_requests_controller.rb
@@ -0,0 +1,2 @@
+class Arvados::V1::ContainerRequestsController < ApplicationController
+end
diff --git a/services/api/app/controllers/arvados/v1/containers_controller.rb b/services/api/app/controllers/arvados/v1/containers_controller.rb
new file mode 100644
index 0000000..67ec5b9
--- /dev/null
+++ b/services/api/app/controllers/arvados/v1/containers_controller.rb
@@ -0,0 +1,2 @@
+class Arvados::V1::ContainersController < ApplicationController
+end
diff --git a/services/api/app/models/container.rb b/services/api/app/models/container.rb
index f4d37de..2e8bfff 100644
--- a/services/api/app/models/container.rb
+++ b/services/api/app/models/container.rb
@@ -1,4 +1,7 @@
 class Container < ArvadosModel
+  include HasUuid
+  include KindAndEtag
+  include CommonApiTemplate
 
   api_accessible :user, extend: :common do |t|
     t.add :command
diff --git a/services/api/app/models/container_request.rb b/services/api/app/models/container_request.rb
index 49a340c..352e414 100644
--- a/services/api/app/models/container_request.rb
+++ b/services/api/app/models/container_request.rb
@@ -1,4 +1,8 @@
 class ContainerRequest < ArvadosModel
+  include HasUuid
+  include KindAndEtag
+  include CommonApiTemplate
+
   api_accessible :user, extend: :common do |t|
     t.add :command
     t.add :container_count_max
diff --git a/services/api/config/routes.rb b/services/api/config/routes.rb
index 27fd67c..c85a3fc 100644
--- a/services/api/config/routes.rb
+++ b/services/api/config/routes.rb
@@ -28,6 +28,8 @@ Server::Application.routes.draw do
       end
       resources :humans
       resources :job_tasks
+      resources :containers
+      resources :container_requests
       resources :jobs do
         get 'queue', on: :collection
         get 'queue_size', on: :collection
diff --git a/services/api/db/migrate/20151202151426_create_containers.rb b/services/api/db/migrate/20151202151426_create_containers.rb
deleted file mode 100644
index c481ada..0000000
--- a/services/api/db/migrate/20151202151426_create_containers.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-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
diff --git a/services/api/db/migrate/20151202151426_create_containers_and_requests.rb b/services/api/db/migrate/20151202151426_create_containers_and_requests.rb
new file mode 100644
index 0000000..99611b4
--- /dev/null
+++ b/services/api/db/migrate/20151202151426_create_containers_and_requests.rb
@@ -0,0 +1,59 @@
+class CreateContainersAndRequests < 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.integer :priority
+
+      t.timestamps
+    end
+
+    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.integer :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.integer :priority
+      t.datetime :expires_at
+      t.string :filters
+
+      t.timestamps
+    end
+
+    add_index :containers, :uuid, :unique => true
+    add_index :container_requests, :uuid, :unique => true
+  end
+end
diff --git a/services/api/db/migrate/20151202151703_create_container_requests.rb b/services/api/db/migrate/20151202151703_create_container_requests.rb
deleted file mode 100644
index 949b744..0000000
--- a/services/api/db/migrate/20151202151703_create_container_requests.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-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
diff --git a/services/api/db/structure.sql b/services/api/db/structure.sql
index 01bb417..7ff4af2 100644
--- a/services/api/db/structure.sql
+++ b/services/api/db/structure.sql
@@ -260,6 +260,107 @@ ALTER SEQUENCE commits_id_seq OWNED BY commits.id;
 
 
 --
+-- Name: container_requests; Type: TABLE; Schema: public; Owner: -; Tablespace: 
+--
+
+CREATE TABLE container_requests (
+    id integer NOT NULL,
+    uuid character varying(255),
+    owner_uuid character varying(255),
+    created_at timestamp without time zone NOT NULL,
+    modified_at timestamp without time zone,
+    modified_by_client_uuid character varying(255),
+    modified_by_user_uuid character varying(255),
+    name character varying(255),
+    description text,
+    properties character varying(255),
+    state character varying(255),
+    requesting_container_uuid character varying(255),
+    container_uuid character varying(255),
+    container_count_max integer,
+    mounts character varying(255),
+    runtime_constraints character varying(255),
+    container_image character varying(255),
+    environment character varying(255),
+    cwd character varying(255),
+    command character varying(255),
+    output_path character varying(255),
+    priority integer,
+    expires_at timestamp without time zone,
+    filters character varying(255),
+    updated_at timestamp without time zone NOT NULL
+);
+
+
+--
+-- Name: container_requests_id_seq; Type: SEQUENCE; Schema: public; Owner: -
+--
+
+CREATE SEQUENCE container_requests_id_seq
+    START WITH 1
+    INCREMENT BY 1
+    NO MINVALUE
+    NO MAXVALUE
+    CACHE 1;
+
+
+--
+-- Name: container_requests_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
+--
+
+ALTER SEQUENCE container_requests_id_seq OWNED BY container_requests.id;
+
+
+--
+-- Name: containers; Type: TABLE; Schema: public; Owner: -; Tablespace: 
+--
+
+CREATE TABLE containers (
+    id integer NOT NULL,
+    uuid character varying(255),
+    owner_uuid character varying(255),
+    created_at timestamp without time zone NOT NULL,
+    modified_at timestamp without time zone,
+    modified_by_client_uuid character varying(255),
+    modified_by_user_uuid character varying(255),
+    state character varying(255),
+    started_at timestamp without time zone,
+    finished_at timestamp without time zone,
+    log character varying(255),
+    environment text,
+    cwd character varying(255),
+    command character varying(255),
+    output_path character varying(255),
+    mounts character varying(255),
+    runtime_constraints character varying(255),
+    output character varying(255),
+    container_image character varying(255),
+    progress double precision,
+    priority integer,
+    updated_at timestamp without time zone NOT NULL
+);
+
+
+--
+-- Name: containers_id_seq; Type: SEQUENCE; Schema: public; Owner: -
+--
+
+CREATE SEQUENCE containers_id_seq
+    START WITH 1
+    INCREMENT BY 1
+    NO MINVALUE
+    NO MAXVALUE
+    CACHE 1;
+
+
+--
+-- Name: containers_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
+--
+
+ALTER SEQUENCE containers_id_seq OWNED BY containers.id;
+
+
+--
 -- Name: groups; Type: TABLE; Schema: public; Owner: -; Tablespace: 
 --
 
@@ -994,6 +1095,20 @@ ALTER TABLE ONLY commits ALTER COLUMN id SET DEFAULT nextval('commits_id_seq'::r
 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
 --
 
+ALTER TABLE ONLY container_requests ALTER COLUMN id SET DEFAULT nextval('container_requests_id_seq'::regclass);
+
+
+--
+-- Name: id; Type: DEFAULT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY containers ALTER COLUMN id SET DEFAULT nextval('containers_id_seq'::regclass);
+
+
+--
+-- Name: id; Type: DEFAULT; Schema: public; Owner: -
+--
+
 ALTER TABLE ONLY groups ALTER COLUMN id SET DEFAULT nextval('groups_id_seq'::regclass);
 
 
@@ -1151,6 +1266,22 @@ ALTER TABLE ONLY commits
 
 
 --
+-- Name: container_requests_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
+--
+
+ALTER TABLE ONLY container_requests
+    ADD CONSTRAINT container_requests_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: containers_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
+--
+
+ALTER TABLE ONLY containers
+    ADD CONSTRAINT containers_pkey PRIMARY KEY (id);
+
+
+--
 -- Name: groups_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
 --
 
@@ -1468,6 +1599,20 @@ CREATE UNIQUE INDEX index_commits_on_repository_name_and_sha1 ON commits USING b
 
 
 --
+-- Name: index_container_requests_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+--
+
+CREATE UNIQUE INDEX index_container_requests_on_uuid ON container_requests USING btree (uuid);
+
+
+--
+-- Name: index_containers_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+--
+
+CREATE UNIQUE INDEX index_containers_on_uuid ON containers USING btree (uuid);
+
+
+--
 -- Name: index_groups_on_created_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
 --
 
@@ -2381,4 +2526,6 @@ INSERT INTO schema_migrations (version) VALUES ('20150423145759');
 
 INSERT INTO schema_migrations (version) VALUES ('20150512193020');
 
-INSERT INTO schema_migrations (version) VALUES ('20150526180251');
\ No newline at end of file
+INSERT INTO schema_migrations (version) VALUES ('20150526180251');
+
+INSERT INTO schema_migrations (version) VALUES ('20151202151426');
\ No newline at end of file

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list