From: Tom Clegg Date: Fri, 10 Sep 2021 14:25:58 +0000 (-0400) Subject: Merge branch '17995-filter-by-comparing-attrs' X-Git-Tag: 2.3.0~75 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/7aaf9f22aa646077b4b7fd961d6b731185b88137?hp=f2ce99ebb4c721de5b22da4bd5bd6565d5f08d2e Merge branch '17995-filter-by-comparing-attrs' closes #17995 Arvados-DCO-1.1-Signed-off-by: Tom Clegg --- diff --git a/apps/workbench/fpm-info.sh b/apps/workbench/fpm-info.sh index a1de4b2a5f..a09638a35e 100644 --- a/apps/workbench/fpm-info.sh +++ b/apps/workbench/fpm-info.sh @@ -6,6 +6,10 @@ case "$TARGET" in centos*) fpm_depends+=(git bison make automake gcc gcc-c++ graphviz shared-mime-info) ;; + ubuntu1804) + fpm_depends+=(git g++ bison zlib1g-dev make graphviz shared-mime-info) + fpm_conflicts+=(ruby-bundler) + ;; debian* | ubuntu*) fpm_depends+=(git g++ bison zlib1g-dev make graphviz shared-mime-info) ;; diff --git a/build/run-library.sh b/build/run-library.sh index 22bb065872..d0ddcd6c67 100755 --- a/build/run-library.sh +++ b/build/run-library.sh @@ -912,6 +912,7 @@ fpm_build () { declare -a fpm_args=() declare -a build_depends=() declare -a fpm_depends=() + declare -a fpm_conflicts=() declare -a fpm_exclude=() if [[ ! -d "$SRC_DIR" ]]; then echo >&2 "BUG: looking in wrong dir for fpm-info.sh: $pkgdir" @@ -947,6 +948,9 @@ fpm_build () { for i in "${fpm_depends[@]}"; do COMMAND_ARR+=('--depends' "$i") done + for i in "${fpm_conflicts[@]}"; do + COMMAND_ARR+=('--conflicts' "$i") + done for i in "${fpm_exclude[@]}"; do COMMAND_ARR+=('--exclude' "$i") done diff --git a/doc/_includes/_install_compute_docker.liquid b/doc/_includes/_install_compute_docker.liquid index e3814b23c5..a6f2515abb 100644 --- a/doc/_includes/_install_compute_docker.liquid +++ b/doc/_includes/_install_compute_docker.liquid @@ -51,3 +51,11 @@ For information about how to set configuration options for the Docker daemon, se h3. Changing ulimits Docker containers inherit ulimits from the Docker daemon. However, the ulimits for a single Unix daemon may not accommodate a long-running Crunch job. You may want to increase default limits for compute containers by passing @--default-ulimit@ options to the Docker daemon. For example, to allow containers to open 10,000 files, set @--default-ulimit nofile=10000:10000@. + +h2. Troubleshooting + +h3. Workflows fail with @ValidationException: Not found: '/var/lib/cwl/workflow.json#main'@ + +A possible configuration error is having Docker installed as a @snap@ package rather than a @deb@ package. This is a problem because @snap@ packages are partially containerized and may have a different view of the filesystem than @crunch-run@. This will produce confusing problems, for example, directory bind mounts sent to Docker that are empty (instead of containing the intended files) and resulting in unexpected "file not found" errors. + +To check for this situation, run @snap list@ and look for @docker@. If found, run @snap remove docker@ and follow the instructions to above to "install Docker Engine":#install_docker . diff --git a/doc/admin/upgrading.html.textile.liquid b/doc/admin/upgrading.html.textile.liquid index 9e7410260f..399ec35d2b 100644 --- a/doc/admin/upgrading.html.textile.liquid +++ b/doc/admin/upgrading.html.textile.liquid @@ -35,10 +35,18 @@ TODO: extract this information based on git commit messages and generate changel
-h2(#main). development main (as of 2021-07-15) +h2(#main). development main (as of 2021-09-07) "Upgrading from 2.2.0":#v2_2_0 +h3. Ubuntu 18.04 packages for arvados-api-server and arvados-workbench now conflict with ruby-bundler + +Ubuntu 18.04 ships with Bundler version 1.16.1, which is no longer compatible with the Gemfiles in the Arvados packages (made with Bundler 2.2.19). The Ubuntu 18.04 packages for arvados-api-server and arvados-workbench now conflict with the ruby-bundler package to work around this issue. The post-install scripts for arvados-api-server and arvados-workbench install the proper version of Bundler as a gem. + +h3. Removed unused @update_uuid@ endpoint for users. + +The @update_uuid@ endpoint was superseded by the "link accounts feature":{{site.baseurl}}/admin/link-accounts.html, so it's no longer available. + h3. Removed deprecated '@@' search operator The '@@' full text search operator, previously deprecated, has been removed. To perform a string search across multiple columns, use the 'ilike' operator on 'any' column as described in the "available list method filter section":{{site.baseurl}}/api/methods.html#substringsearchfilter of the API documentation. diff --git a/doc/api/methods/users.html.textile.liquid b/doc/api/methods/users.html.textile.liquid index a4d4aade9b..5861ddbf76 100644 --- a/doc/api/methods/users.html.textile.liquid +++ b/doc/api/methods/users.html.textile.liquid @@ -112,19 +112,6 @@ table(table table-bordered table-condensed). {background:#ccffcc}.|uuid|string|The UUID of the User in question.|path|| |user|object|The new attributes.|query|| -h3(#update_uuid). update_uuid - -Change the UUID of an existing user, updating all database references accordingly. - -This method can only be used by an admin user. It should only be used when the affected user is idle. New references to the affected user that are established _while the update_uuid operation is in progress_ might not be migrated as expected. - -Arguments: - -table(table table-bordered table-condensed). -|_. Argument |_. Type |_. Description |_. Location |_. Example | -{background:#ccffcc}.|uuid|string|The current UUID of the user in question.|path|@zzzzz-tpzed-12345abcde12345@| -{background:#ccffcc}.|new_uuid|string|The desired new UUID. It is an error to use a UUID belonging to an existing user.|query|@zzzzz-tpzed-abcde12345abcde@| - h3. setup Set up a user. Adds the user to the "All users" group. Enables the user to invoke @activate@. See "user management":{{site.baseurl}}/admin/user-management.html for details. diff --git a/lib/controller/federation/conn.go b/lib/controller/federation/conn.go index 77bc97aed9..586ac23013 100644 --- a/lib/controller/federation/conn.go +++ b/lib/controller/federation/conn.go @@ -593,10 +593,6 @@ func (conn *Conn) UserUpdate(ctx context.Context, options arvados.UpdateOptions) return resp, err } -func (conn *Conn) UserUpdateUUID(ctx context.Context, options arvados.UpdateUUIDOptions) (arvados.User, error) { - return conn.local.UserUpdateUUID(ctx, options) -} - func (conn *Conn) UserMerge(ctx context.Context, options arvados.UserMergeOptions) (arvados.User, error) { return conn.local.UserMerge(ctx, options) } diff --git a/lib/controller/integration_test.go b/lib/controller/integration_test.go index 6851442054..8a23bccfb7 100644 --- a/lib/controller/integration_test.go +++ b/lib/controller/integration_test.go @@ -150,6 +150,16 @@ func (s *IntegrationSuite) TearDownSuite(c *check.C) { } } +func (s *IntegrationSuite) TestDefaultStorageClassesOnCollections(c *check.C) { + conn := s.testClusters["z1111"].Conn() + rootctx, _, _ := s.testClusters["z1111"].RootClients() + userctx, _, kc, _ := s.testClusters["z1111"].UserClients(rootctx, c, conn, s.oidcprovider.AuthEmail, true) + c.Assert(len(kc.DefaultStorageClasses) > 0, check.Equals, true) + coll, err := conn.CollectionCreate(userctx, arvados.CreateOptions{}) + c.Assert(err, check.IsNil) + c.Assert(coll.StorageClassesDesired, check.DeepEquals, kc.DefaultStorageClasses) +} + func (s *IntegrationSuite) TestGetCollectionByPDH(c *check.C) { conn1 := s.testClusters["z1111"].Conn() rootctx1, _, _ := s.testClusters["z1111"].RootClients() @@ -652,6 +662,111 @@ func (s *IntegrationSuite) TestIntermediateCluster(c *check.C) { } } +// Test for bug #18076 +func (s *IntegrationSuite) TestStaleCachedUserRecord(c *check.C) { + rootctx1, _, _ := s.testClusters["z1111"].RootClients() + _, rootclnt3, _ := s.testClusters["z3333"].RootClients() + conn1 := s.testClusters["z1111"].Conn() + conn3 := s.testClusters["z3333"].Conn() + + // Make sure LoginCluster is properly configured + for cls := range s.testClusters { + if cls == "z1111" || cls == "z3333" { + c.Check( + s.testClusters[cls].Config.Clusters[cls].Login.LoginCluster, + check.Equals, "z1111", + check.Commentf("incorrect LoginCluster config on cluster %q", cls)) + } + } + + for testCaseNr, testCase := range []struct { + name string + withRepository bool + }{ + {"User without local repository", false}, + {"User with local repository", true}, + } { + c.Log(c.TestName() + " " + testCase.name) + // Create some users, request them on the federated cluster so they're cached. + var users []arvados.User + for userNr := 0; userNr < 2; userNr++ { + _, _, _, user := s.testClusters["z1111"].UserClients( + rootctx1, + c, + conn1, + fmt.Sprintf("user%d%d@example.com", testCaseNr, userNr), + true) + c.Assert(user.Username, check.Not(check.Equals), "") + users = append(users, user) + + lst, err := conn3.UserList(rootctx1, arvados.ListOptions{Limit: -1}) + c.Assert(err, check.Equals, nil) + userFound := false + for _, fedUser := range lst.Items { + if fedUser.UUID == user.UUID { + c.Assert(fedUser.Username, check.Equals, user.Username) + userFound = true + break + } + } + c.Assert(userFound, check.Equals, true) + + if testCase.withRepository { + var repo interface{} + err = rootclnt3.RequestAndDecode( + &repo, "POST", "arvados/v1/repositories", nil, + map[string]interface{}{ + "repository": map[string]string{ + "name": fmt.Sprintf("%s/test", user.Username), + "owner_uuid": user.UUID, + }, + }, + ) + c.Assert(err, check.IsNil) + } + } + + // Swap the usernames + _, err := conn1.UserUpdate(rootctx1, arvados.UpdateOptions{ + UUID: users[0].UUID, + Attrs: map[string]interface{}{ + "username": "", + }, + }) + c.Assert(err, check.Equals, nil) + _, err = conn1.UserUpdate(rootctx1, arvados.UpdateOptions{ + UUID: users[1].UUID, + Attrs: map[string]interface{}{ + "username": users[0].Username, + }, + }) + c.Assert(err, check.Equals, nil) + _, err = conn1.UserUpdate(rootctx1, arvados.UpdateOptions{ + UUID: users[0].UUID, + Attrs: map[string]interface{}{ + "username": users[1].Username, + }, + }) + c.Assert(err, check.Equals, nil) + + // Re-request the list on the federated cluster & check for updates + lst, err := conn3.UserList(rootctx1, arvados.ListOptions{Limit: -1}) + c.Assert(err, check.Equals, nil) + var user0Found, user1Found bool + for _, user := range lst.Items { + if user.UUID == users[0].UUID { + user0Found = true + c.Assert(user.Username, check.Equals, users[1].Username) + } else if user.UUID == users[1].UUID { + user1Found = true + c.Assert(user.Username, check.Equals, users[0].Username) + } + } + c.Assert(user0Found, check.Equals, true) + c.Assert(user1Found, check.Equals, true) + } +} + // Test for bug #16263 func (s *IntegrationSuite) TestListUsers(c *check.C) { rootctx1, _, _ := s.testClusters["z1111"].RootClients() @@ -676,6 +791,7 @@ func (s *IntegrationSuite) TestListUsers(c *check.C) { for _, user := range lst.Items { if user.Username == "" { nullUsername = true + break } } c.Assert(nullUsername, check.Equals, true) diff --git a/lib/controller/router/router.go b/lib/controller/router/router.go index 5ceabbfb1d..9826c1e744 100644 --- a/lib/controller/router/router.go +++ b/lib/controller/router/router.go @@ -398,13 +398,6 @@ func (rtr *router) addRoutes() { return rtr.backend.UserGet(ctx, *opts.(*arvados.GetOptions)) }, }, - { - arvados.EndpointUserUpdateUUID, - func() interface{} { return &arvados.UpdateUUIDOptions{} }, - func(ctx context.Context, opts interface{}) (interface{}, error) { - return rtr.backend.UserUpdateUUID(ctx, *opts.(*arvados.UpdateUUIDOptions)) - }, - }, { arvados.EndpointUserUpdate, func() interface{} { return &arvados.UpdateOptions{} }, diff --git a/lib/controller/rpc/conn.go b/lib/controller/rpc/conn.go index 940f2184b2..640bbf1c23 100644 --- a/lib/controller/rpc/conn.go +++ b/lib/controller/rpc/conn.go @@ -542,12 +542,6 @@ func (conn *Conn) UserUpdate(ctx context.Context, options arvados.UpdateOptions) err := conn.requestAndDecode(ctx, &resp, ep, nil, options) return resp, err } -func (conn *Conn) UserUpdateUUID(ctx context.Context, options arvados.UpdateUUIDOptions) (arvados.User, error) { - ep := arvados.EndpointUserUpdateUUID - var resp arvados.User - err := conn.requestAndDecode(ctx, &resp, ep, nil, options) - return resp, err -} func (conn *Conn) UserMerge(ctx context.Context, options arvados.UserMergeOptions) (arvados.User, error) { ep := arvados.EndpointUserMerge var resp arvados.User diff --git a/lib/crunchrun/crunchrun.go b/lib/crunchrun/crunchrun.go index e15303a315..01141674a6 100644 --- a/lib/crunchrun/crunchrun.go +++ b/lib/crunchrun/crunchrun.go @@ -1170,6 +1170,7 @@ func (runner *ContainerRunner) CleanupDirs() { if umnterr != nil { runner.CrunchLog.Printf("Error unmounting: %v", umnterr) + runner.ArvMount.Process.Kill() } else { // If arv-mount --unmount gets stuck for any reason, we // don't want to wait for it forever. Do Wait() in a goroutine diff --git a/lib/dispatchcloud/container/queue.go b/lib/dispatchcloud/container/queue.go index 7a2727c1e9..938ef915f2 100644 --- a/lib/dispatchcloud/container/queue.go +++ b/lib/dispatchcloud/container/queue.go @@ -31,6 +31,7 @@ type QueueEnt struct { // populated. Container arvados.Container `json:"container"` InstanceType arvados.InstanceType `json:"instance_type"` + FirstSeenAt time.Time `json:"first_seen_at"` } // String implements fmt.Stringer by returning the queued container's @@ -229,6 +230,7 @@ func (cq *Queue) delEnt(uuid string, state arvados.ContainerState) { delete(cq.current, uuid) } +// Caller must have lock. func (cq *Queue) addEnt(uuid string, ctr arvados.Container) { it, err := cq.chooseType(&ctr) if err != nil && (ctr.State == arvados.ContainerStateQueued || ctr.State == arvados.ContainerStateLocked) { @@ -284,7 +286,7 @@ func (cq *Queue) addEnt(uuid string, ctr arvados.Container) { "Priority": ctr.Priority, "InstanceType": it.Name, }).Info("adding container to queue") - cq.current[uuid] = QueueEnt{Container: ctr, InstanceType: it} + cq.current[uuid] = QueueEnt{Container: ctr, InstanceType: it, FirstSeenAt: time.Now()} } // Lock acquires the dispatch lock for the given container. diff --git a/lib/dispatchcloud/scheduler/run_queue.go b/lib/dispatchcloud/scheduler/run_queue.go index b9d653a821..e9fc5f9021 100644 --- a/lib/dispatchcloud/scheduler/run_queue.go +++ b/lib/dispatchcloud/scheduler/run_queue.go @@ -20,7 +20,16 @@ func (sch *Scheduler) runQueue() { sorted = append(sorted, ent) } sort.Slice(sorted, func(i, j int) bool { - return sorted[i].Container.Priority > sorted[j].Container.Priority + if pi, pj := sorted[i].Container.Priority, sorted[j].Container.Priority; pi != pj { + return pi > pj + } else { + // When containers have identical priority, + // start them in the order we first noticed + // them. This avoids extra lock/unlock cycles + // when we unlock the containers that don't + // fit in the available pool. + return sorted[i].FirstSeenAt.Before(sorted[j].FirstSeenAt) + } }) running := sch.pool.Running() @@ -66,8 +75,7 @@ tryrun: // starve this one by using keeping // idle workers alive on different // instance types. - logger.Debug("unlocking: AtQuota and no unalloc workers") - sch.queue.Unlock(ctr.UUID) + logger.Trace("overquota") overquota = sorted[i:] break tryrun } else if logger.Info("creating new instance"); sch.pool.Create(it) { @@ -80,6 +88,7 @@ tryrun: // avoid getting starved here if // instances of a specific type always // fail. + logger.Trace("pool declined to create new instance") continue } diff --git a/lib/dispatchcloud/scheduler/run_queue_test.go b/lib/dispatchcloud/scheduler/run_queue_test.go index fd1d0a870b..5b5fa960a1 100644 --- a/lib/dispatchcloud/scheduler/run_queue_test.go +++ b/lib/dispatchcloud/scheduler/run_queue_test.go @@ -244,15 +244,81 @@ func (*SchedulerSuite) TestShutdownAtQuota(c *check.C) { starts: []string{}, canCreate: 0, } - New(ctx, &queue, &pool, nil, time.Millisecond, time.Millisecond).runQueue() + sch := New(ctx, &queue, &pool, nil, time.Millisecond, time.Millisecond) + sch.runQueue() + sch.sync() + sch.runQueue() + sch.sync() c.Check(pool.creates, check.DeepEquals, shouldCreate) if len(shouldCreate) == 0 { c.Check(pool.starts, check.DeepEquals, []string{}) - c.Check(pool.shutdowns, check.Not(check.Equals), 0) } else { c.Check(pool.starts, check.DeepEquals, []string{test.ContainerUUID(2)}) - c.Check(pool.shutdowns, check.Equals, 0) } + c.Check(pool.shutdowns, check.Equals, 3-quota) + c.Check(queue.StateChanges(), check.DeepEquals, []test.QueueStateChange{ + {UUID: "zzzzz-dz642-000000000000003", From: "Locked", To: "Queued"}, + {UUID: "zzzzz-dz642-000000000000002", From: "Locked", To: "Queued"}, + }) + } +} + +// Don't flap lock/unlock when equal-priority containers compete for +// limited workers. +// +// (Unless we use FirstSeenAt as a secondary sort key, each runQueue() +// tends to choose a different one of the equal-priority containers as +// the "first" one that should be locked, and unlock the one it chose +// last time. This generates logging noise, and fails containers by +// reaching MaxDispatchAttempts quickly.) +func (*SchedulerSuite) TestEqualPriorityContainers(c *check.C) { + logger := ctxlog.TestLogger(c) + ctx := ctxlog.Context(context.Background(), logger) + queue := test.Queue{ + ChooseType: chooseType, + Logger: logger, + } + for i := 0; i < 8; i++ { + queue.Containers = append(queue.Containers, arvados.Container{ + UUID: test.ContainerUUID(i), + Priority: 333, + State: arvados.ContainerStateQueued, + RuntimeConstraints: arvados.RuntimeConstraints{ + VCPUs: 3, + RAM: 3 << 30, + }, + }) + } + queue.Update() + pool := stubPool{ + quota: 2, + unalloc: map[arvados.InstanceType]int{ + test.InstanceType(3): 1, + }, + idle: map[arvados.InstanceType]int{ + test.InstanceType(3): 1, + }, + running: map[string]time.Time{}, + creates: []arvados.InstanceType{}, + starts: []string{}, + canCreate: 1, + } + sch := New(ctx, &queue, &pool, nil, time.Millisecond, time.Millisecond) + for i := 0; i < 30; i++ { + sch.runQueue() + sch.sync() + time.Sleep(time.Millisecond) + } + c.Check(pool.shutdowns, check.Equals, 0) + c.Check(pool.starts, check.HasLen, 1) + unlocked := map[string]int{} + for _, chg := range queue.StateChanges() { + if chg.To == arvados.ContainerStateQueued { + unlocked[chg.UUID]++ + } + } + for uuid, count := range unlocked { + c.Check(count, check.Equals, 1, check.Commentf("%s", uuid)) } } diff --git a/lib/dispatchcloud/scheduler/sync.go b/lib/dispatchcloud/scheduler/sync.go index fc683505f9..4d601d6ae8 100644 --- a/lib/dispatchcloud/scheduler/sync.go +++ b/lib/dispatchcloud/scheduler/sync.go @@ -13,6 +13,8 @@ import ( "github.com/sirupsen/logrus" ) +var reportedUnexpectedState = false + // sync resolves discrepancies between the queue and the pool: // // Lingering crunch-run processes for finalized and unlocked/requeued @@ -64,7 +66,7 @@ func (sch *Scheduler) sync() { // a network outage and is still // preparing to run a container that // has already been unlocked/requeued. - go sch.kill(uuid, fmt.Sprintf("state=%s", ent.Container.State)) + go sch.kill(uuid, fmt.Sprintf("pool says running, but queue says state=%s", ent.Container.State)) } else if ent.Container.Priority == 0 { sch.logger.WithFields(logrus.Fields{ "ContainerUUID": uuid, @@ -82,10 +84,13 @@ func (sch *Scheduler) sync() { go sch.requeue(ent, "priority=0") } default: - sch.logger.WithFields(logrus.Fields{ - "ContainerUUID": uuid, - "State": ent.Container.State, - }).Error("BUG: unexpected state") + if !reportedUnexpectedState { + sch.logger.WithFields(logrus.Fields{ + "ContainerUUID": uuid, + "State": ent.Container.State, + }).Error("BUG: unexpected state") + reportedUnexpectedState = true + } } } for uuid := range running { @@ -113,6 +118,10 @@ func (sch *Scheduler) kill(uuid string, reason string) { return } defer sch.uuidUnlock(uuid) + sch.logger.WithFields(logrus.Fields{ + "ContainerUUID": uuid, + "reason": reason, + }).Debug("kill") sch.pool.KillContainer(uuid, reason) sch.pool.ForgetContainer(uuid) } diff --git a/lib/dispatchcloud/test/queue.go b/lib/dispatchcloud/test/queue.go index 3598ec6da0..fcb2cfb33b 100644 --- a/lib/dispatchcloud/test/queue.go +++ b/lib/dispatchcloud/test/queue.go @@ -26,13 +26,27 @@ type Queue struct { Logger logrus.FieldLogger - entries map[string]container.QueueEnt - updTime time.Time - subscribers map[<-chan struct{}]chan struct{} + entries map[string]container.QueueEnt + updTime time.Time + subscribers map[<-chan struct{}]chan struct{} + stateChanges []QueueStateChange mtx sync.Mutex } +type QueueStateChange struct { + UUID string + From arvados.ContainerState + To arvados.ContainerState +} + +// All calls to Lock/Unlock/Cancel to date. +func (q *Queue) StateChanges() []QueueStateChange { + q.mtx.Lock() + defer q.mtx.Unlock() + return q.stateChanges +} + // Entries returns the containers that were queued when Update was // last called. func (q *Queue) Entries() (map[string]container.QueueEnt, time.Time) { @@ -111,6 +125,7 @@ func (q *Queue) notify() { // caller must have lock. func (q *Queue) changeState(uuid string, from, to arvados.ContainerState) error { ent := q.entries[uuid] + q.stateChanges = append(q.stateChanges, QueueStateChange{uuid, from, to}) if ent.Container.State != from { return fmt.Errorf("changeState failed: state=%q", ent.Container.State) } @@ -145,6 +160,7 @@ func (q *Queue) Update() error { upd[ctr.UUID] = container.QueueEnt{ Container: ctr, InstanceType: it, + FirstSeenAt: time.Now(), } } } diff --git a/sdk/R/R/Arvados.R b/sdk/R/R/Arvados.R index 528a606650..52d6c95f5e 100644 --- a/sdk/R/R/Arvados.R +++ b/sdk/R/R/Arvados.R @@ -3,9 +3,9 @@ # SPDX-License-Identifier: Apache-2.0 #' api_clients.get -#' +#' #' api_clients.get is a method defined in Arvados class. -#' +#' #' @usage arv$api_clients.get(uuid) #' @param uuid The UUID of the ApiClient in question. #' @return ApiClient object. @@ -13,9 +13,9 @@ NULL #' api_clients.create -#' +#' #' api_clients.create is a method defined in Arvados class. -#' +#' #' @usage arv$api_clients.create(apiclient, #' ensure_unique_name = "false", cluster_id = NULL) #' @param apiClient ApiClient object. @@ -26,9 +26,9 @@ NULL NULL #' api_clients.update -#' +#' #' api_clients.update is a method defined in Arvados class. -#' +#' #' @usage arv$api_clients.update(apiclient, #' uuid) #' @param apiClient ApiClient object. @@ -38,9 +38,9 @@ NULL NULL #' api_clients.delete -#' +#' #' api_clients.delete is a method defined in Arvados class. -#' +#' #' @usage arv$api_clients.delete(uuid) #' @param uuid The UUID of the ApiClient in question. #' @return ApiClient object. @@ -48,21 +48,21 @@ NULL NULL #' api_clients.list -#' +#' #' api_clients.list is a method defined in Arvados class. -#' +#' #' @usage arv$api_clients.list(filters = NULL, #' where = NULL, order = NULL, select = NULL, #' distinct = NULL, limit = "100", offset = "0", #' count = "exact", cluster_id = NULL, bypass_federation = NULL) -#' @param filters -#' @param where -#' @param order -#' @param select -#' @param distinct -#' @param limit -#' @param offset -#' @param count +#' @param filters +#' @param where +#' @param order +#' @param select +#' @param distinct +#' @param limit +#' @param offset +#' @param count #' @param cluster_id List objects on a remote federated cluster instead of the current one. #' @param bypass_federation bypass federation behavior, list items from local instance database only #' @return ApiClientList object. @@ -70,9 +70,9 @@ NULL NULL #' api_client_authorizations.get -#' +#' #' api_client_authorizations.get is a method defined in Arvados class. -#' +#' #' @usage arv$api_client_authorizations.get(uuid) #' @param uuid The UUID of the ApiClientAuthorization in question. #' @return ApiClientAuthorization object. @@ -80,9 +80,9 @@ NULL NULL #' api_client_authorizations.create -#' +#' #' api_client_authorizations.create is a method defined in Arvados class. -#' +#' #' @usage arv$api_client_authorizations.create(apiclientauthorization, #' ensure_unique_name = "false", cluster_id = NULL) #' @param apiClientAuthorization ApiClientAuthorization object. @@ -93,9 +93,9 @@ NULL NULL #' api_client_authorizations.update -#' +#' #' api_client_authorizations.update is a method defined in Arvados class. -#' +#' #' @usage arv$api_client_authorizations.update(apiclientauthorization, #' uuid) #' @param apiClientAuthorization ApiClientAuthorization object. @@ -105,9 +105,9 @@ NULL NULL #' api_client_authorizations.delete -#' +#' #' api_client_authorizations.delete is a method defined in Arvados class. -#' +#' #' @usage arv$api_client_authorizations.delete(uuid) #' @param uuid The UUID of the ApiClientAuthorization in question. #' @return ApiClientAuthorization object. @@ -115,42 +115,42 @@ NULL NULL #' api_client_authorizations.create_system_auth -#' +#' #' api_client_authorizations.create_system_auth is a method defined in Arvados class. -#' +#' #' @usage arv$api_client_authorizations.create_system_auth(api_client_id = NULL, #' scopes = NULL) -#' @param api_client_id -#' @param scopes +#' @param api_client_id +#' @param scopes #' @return ApiClientAuthorization object. #' @name api_client_authorizations.create_system_auth NULL #' api_client_authorizations.current -#' +#' #' api_client_authorizations.current is a method defined in Arvados class. -#' +#' #' @usage arv$api_client_authorizations.current(NULL) #' @return ApiClientAuthorization object. #' @name api_client_authorizations.current NULL #' api_client_authorizations.list -#' +#' #' api_client_authorizations.list is a method defined in Arvados class. -#' +#' #' @usage arv$api_client_authorizations.list(filters = NULL, #' where = NULL, order = NULL, select = NULL, #' distinct = NULL, limit = "100", offset = "0", #' count = "exact", cluster_id = NULL, bypass_federation = NULL) -#' @param filters -#' @param where -#' @param order -#' @param select -#' @param distinct -#' @param limit -#' @param offset -#' @param count +#' @param filters +#' @param where +#' @param order +#' @param select +#' @param distinct +#' @param limit +#' @param offset +#' @param count #' @param cluster_id List objects on a remote federated cluster instead of the current one. #' @param bypass_federation bypass federation behavior, list items from local instance database only #' @return ApiClientAuthorizationList object. @@ -158,9 +158,9 @@ NULL NULL #' authorized_keys.get -#' +#' #' authorized_keys.get is a method defined in Arvados class. -#' +#' #' @usage arv$authorized_keys.get(uuid) #' @param uuid The UUID of the AuthorizedKey in question. #' @return AuthorizedKey object. @@ -168,9 +168,9 @@ NULL NULL #' authorized_keys.create -#' +#' #' authorized_keys.create is a method defined in Arvados class. -#' +#' #' @usage arv$authorized_keys.create(authorizedkey, #' ensure_unique_name = "false", cluster_id = NULL) #' @param authorizedKey AuthorizedKey object. @@ -181,9 +181,9 @@ NULL NULL #' authorized_keys.update -#' +#' #' authorized_keys.update is a method defined in Arvados class. -#' +#' #' @usage arv$authorized_keys.update(authorizedkey, #' uuid) #' @param authorizedKey AuthorizedKey object. @@ -193,9 +193,9 @@ NULL NULL #' authorized_keys.delete -#' +#' #' authorized_keys.delete is a method defined in Arvados class. -#' +#' #' @usage arv$authorized_keys.delete(uuid) #' @param uuid The UUID of the AuthorizedKey in question. #' @return AuthorizedKey object. @@ -203,21 +203,21 @@ NULL NULL #' authorized_keys.list -#' +#' #' authorized_keys.list is a method defined in Arvados class. -#' +#' #' @usage arv$authorized_keys.list(filters = NULL, #' where = NULL, order = NULL, select = NULL, #' distinct = NULL, limit = "100", offset = "0", #' count = "exact", cluster_id = NULL, bypass_federation = NULL) -#' @param filters -#' @param where -#' @param order -#' @param select -#' @param distinct -#' @param limit -#' @param offset -#' @param count +#' @param filters +#' @param where +#' @param order +#' @param select +#' @param distinct +#' @param limit +#' @param offset +#' @param count #' @param cluster_id List objects on a remote federated cluster instead of the current one. #' @param bypass_federation bypass federation behavior, list items from local instance database only #' @return AuthorizedKeyList object. @@ -225,9 +225,9 @@ NULL NULL #' collections.get -#' +#' #' collections.get is a method defined in Arvados class. -#' +#' #' @usage arv$collections.get(uuid) #' @param uuid The UUID of the Collection in question. #' @return Collection object. @@ -235,9 +235,9 @@ NULL NULL #' collections.create -#' +#' #' collections.create is a method defined in Arvados class. -#' +#' #' @usage arv$collections.create(collection, #' ensure_unique_name = "false", cluster_id = NULL) #' @param collection Collection object. @@ -248,9 +248,9 @@ NULL NULL #' collections.update -#' +#' #' collections.update is a method defined in Arvados class. -#' +#' #' @usage arv$collections.update(collection, #' uuid) #' @param collection Collection object. @@ -260,9 +260,9 @@ NULL NULL #' collections.delete -#' +#' #' collections.delete is a method defined in Arvados class. -#' +#' #' @usage arv$collections.delete(uuid) #' @param uuid The UUID of the Collection in question. #' @return Collection object. @@ -270,62 +270,62 @@ NULL NULL #' collections.provenance -#' +#' #' collections.provenance is a method defined in Arvados class. -#' +#' #' @usage arv$collections.provenance(uuid) -#' @param uuid +#' @param uuid #' @return Collection object. #' @name collections.provenance NULL #' collections.used_by -#' +#' #' collections.used_by is a method defined in Arvados class. -#' +#' #' @usage arv$collections.used_by(uuid) -#' @param uuid +#' @param uuid #' @return Collection object. #' @name collections.used_by NULL #' collections.trash -#' +#' #' collections.trash is a method defined in Arvados class. -#' +#' #' @usage arv$collections.trash(uuid) -#' @param uuid +#' @param uuid #' @return Collection object. #' @name collections.trash NULL #' collections.untrash -#' +#' #' collections.untrash is a method defined in Arvados class. -#' +#' #' @usage arv$collections.untrash(uuid) -#' @param uuid +#' @param uuid #' @return Collection object. #' @name collections.untrash NULL #' collections.list -#' +#' #' collections.list is a method defined in Arvados class. -#' +#' #' @usage arv$collections.list(filters = NULL, #' where = NULL, order = NULL, select = NULL, #' distinct = NULL, limit = "100", offset = "0", #' count = "exact", cluster_id = NULL, bypass_federation = NULL, #' include_trash = NULL, include_old_versions = NULL) -#' @param filters -#' @param where -#' @param order -#' @param select -#' @param distinct -#' @param limit -#' @param offset -#' @param count +#' @param filters +#' @param where +#' @param order +#' @param select +#' @param distinct +#' @param limit +#' @param offset +#' @param count #' @param cluster_id List objects on a remote federated cluster instead of the current one. #' @param bypass_federation bypass federation behavior, list items from local instance database only #' @param include_trash Include collections whose is_trashed attribute is true. @@ -335,9 +335,9 @@ NULL NULL #' containers.get -#' +#' #' containers.get is a method defined in Arvados class. -#' +#' #' @usage arv$containers.get(uuid) #' @param uuid The UUID of the Container in question. #' @return Container object. @@ -345,9 +345,9 @@ NULL NULL #' containers.create -#' +#' #' containers.create is a method defined in Arvados class. -#' +#' #' @usage arv$containers.create(container, #' ensure_unique_name = "false", cluster_id = NULL) #' @param container Container object. @@ -358,9 +358,9 @@ NULL NULL #' containers.update -#' +#' #' containers.update is a method defined in Arvados class. -#' +#' #' @usage arv$containers.update(container, #' uuid) #' @param container Container object. @@ -370,9 +370,9 @@ NULL NULL #' containers.delete -#' +#' #' containers.delete is a method defined in Arvados class. -#' +#' #' @usage arv$containers.delete(uuid) #' @param uuid The UUID of the Container in question. #' @return Container object. @@ -380,70 +380,70 @@ NULL NULL #' containers.auth -#' +#' #' containers.auth is a method defined in Arvados class. -#' +#' #' @usage arv$containers.auth(uuid) -#' @param uuid +#' @param uuid #' @return Container object. #' @name containers.auth NULL #' containers.lock -#' +#' #' containers.lock is a method defined in Arvados class. -#' +#' #' @usage arv$containers.lock(uuid) -#' @param uuid +#' @param uuid #' @return Container object. #' @name containers.lock NULL #' containers.unlock -#' +#' #' containers.unlock is a method defined in Arvados class. -#' +#' #' @usage arv$containers.unlock(uuid) -#' @param uuid +#' @param uuid #' @return Container object. #' @name containers.unlock NULL #' containers.secret_mounts -#' +#' #' containers.secret_mounts is a method defined in Arvados class. -#' +#' #' @usage arv$containers.secret_mounts(uuid) -#' @param uuid +#' @param uuid #' @return Container object. #' @name containers.secret_mounts NULL #' containers.current -#' +#' #' containers.current is a method defined in Arvados class. -#' +#' #' @usage arv$containers.current(NULL) #' @return Container object. #' @name containers.current NULL #' containers.list -#' +#' #' containers.list is a method defined in Arvados class. -#' +#' #' @usage arv$containers.list(filters = NULL, #' where = NULL, order = NULL, select = NULL, #' distinct = NULL, limit = "100", offset = "0", #' count = "exact", cluster_id = NULL, bypass_federation = NULL) -#' @param filters -#' @param where -#' @param order -#' @param select -#' @param distinct -#' @param limit -#' @param offset -#' @param count +#' @param filters +#' @param where +#' @param order +#' @param select +#' @param distinct +#' @param limit +#' @param offset +#' @param count #' @param cluster_id List objects on a remote federated cluster instead of the current one. #' @param bypass_federation bypass federation behavior, list items from local instance database only #' @return ContainerList object. @@ -451,9 +451,9 @@ NULL NULL #' container_requests.get -#' +#' #' container_requests.get is a method defined in Arvados class. -#' +#' #' @usage arv$container_requests.get(uuid) #' @param uuid The UUID of the ContainerRequest in question. #' @return ContainerRequest object. @@ -461,9 +461,9 @@ NULL NULL #' container_requests.create -#' +#' #' container_requests.create is a method defined in Arvados class. -#' +#' #' @usage arv$container_requests.create(containerrequest, #' ensure_unique_name = "false", cluster_id = NULL) #' @param containerRequest ContainerRequest object. @@ -474,9 +474,9 @@ NULL NULL #' container_requests.update -#' +#' #' container_requests.update is a method defined in Arvados class. -#' +#' #' @usage arv$container_requests.update(containerrequest, #' uuid) #' @param containerRequest ContainerRequest object. @@ -486,9 +486,9 @@ NULL NULL #' container_requests.delete -#' +#' #' container_requests.delete is a method defined in Arvados class. -#' +#' #' @usage arv$container_requests.delete(uuid) #' @param uuid The UUID of the ContainerRequest in question. #' @return ContainerRequest object. @@ -496,22 +496,22 @@ NULL NULL #' container_requests.list -#' +#' #' container_requests.list is a method defined in Arvados class. -#' +#' #' @usage arv$container_requests.list(filters = NULL, #' where = NULL, order = NULL, select = NULL, #' distinct = NULL, limit = "100", offset = "0", #' count = "exact", cluster_id = NULL, bypass_federation = NULL, #' include_trash = NULL) -#' @param filters -#' @param where -#' @param order -#' @param select -#' @param distinct -#' @param limit -#' @param offset -#' @param count +#' @param filters +#' @param where +#' @param order +#' @param select +#' @param distinct +#' @param limit +#' @param offset +#' @param count #' @param cluster_id List objects on a remote federated cluster instead of the current one. #' @param bypass_federation bypass federation behavior, list items from local instance database only #' @param include_trash Include container requests whose owner project is trashed. @@ -520,9 +520,9 @@ NULL NULL #' groups.get -#' +#' #' groups.get is a method defined in Arvados class. -#' +#' #' @usage arv$groups.get(uuid) #' @param uuid The UUID of the Group in question. #' @return Group object. @@ -530,9 +530,9 @@ NULL NULL #' groups.create -#' +#' #' groups.create is a method defined in Arvados class. -#' +#' #' @usage arv$groups.create(group, ensure_unique_name = "false", #' cluster_id = NULL, async = "false") #' @param group Group object. @@ -544,9 +544,9 @@ NULL NULL #' groups.update -#' +#' #' groups.update is a method defined in Arvados class. -#' +#' #' @usage arv$groups.update(group, uuid, #' async = "false") #' @param group Group object. @@ -557,9 +557,9 @@ NULL NULL #' groups.delete -#' +#' #' groups.delete is a method defined in Arvados class. -#' +#' #' @usage arv$groups.delete(uuid) #' @param uuid The UUID of the Group in question. #' @return Group object. @@ -567,26 +567,26 @@ NULL NULL #' groups.contents -#' +#' #' groups.contents is a method defined in Arvados class. -#' +#' #' @usage arv$groups.contents(filters = NULL, #' where = NULL, order = NULL, distinct = NULL, #' limit = "100", offset = "0", count = "exact", #' cluster_id = NULL, bypass_federation = NULL, #' include_trash = NULL, uuid = NULL, recursive = NULL, #' include = NULL) -#' @param filters -#' @param where -#' @param order -#' @param distinct -#' @param limit -#' @param offset -#' @param count +#' @param filters +#' @param where +#' @param order +#' @param distinct +#' @param limit +#' @param offset +#' @param count #' @param cluster_id List objects on a remote federated cluster instead of the current one. #' @param bypass_federation bypass federation behavior, list items from local instance database only #' @param include_trash Include items whose is_trashed attribute is true. -#' @param uuid +#' @param uuid #' @param recursive Include contents from child groups recursively. #' @param include Include objects referred to by listed field in "included" (only owner_uuid) #' @return Group object. @@ -594,67 +594,67 @@ NULL NULL #' groups.shared -#' +#' #' groups.shared is a method defined in Arvados class. -#' +#' #' @usage arv$groups.shared(filters = NULL, #' where = NULL, order = NULL, select = NULL, #' distinct = NULL, limit = "100", offset = "0", #' count = "exact", cluster_id = NULL, bypass_federation = NULL, #' include_trash = NULL, include = NULL) -#' @param filters -#' @param where -#' @param order -#' @param select -#' @param distinct -#' @param limit -#' @param offset -#' @param count +#' @param filters +#' @param where +#' @param order +#' @param select +#' @param distinct +#' @param limit +#' @param offset +#' @param count #' @param cluster_id List objects on a remote federated cluster instead of the current one. #' @param bypass_federation bypass federation behavior, list items from local instance database only #' @param include_trash Include items whose is_trashed attribute is true. -#' @param include +#' @param include #' @return Group object. #' @name groups.shared NULL #' groups.trash -#' +#' #' groups.trash is a method defined in Arvados class. -#' +#' #' @usage arv$groups.trash(uuid) -#' @param uuid +#' @param uuid #' @return Group object. #' @name groups.trash NULL #' groups.untrash -#' +#' #' groups.untrash is a method defined in Arvados class. -#' +#' #' @usage arv$groups.untrash(uuid) -#' @param uuid +#' @param uuid #' @return Group object. #' @name groups.untrash NULL #' groups.list -#' +#' #' groups.list is a method defined in Arvados class. -#' +#' #' @usage arv$groups.list(filters = NULL, #' where = NULL, order = NULL, select = NULL, #' distinct = NULL, limit = "100", offset = "0", #' count = "exact", cluster_id = NULL, bypass_federation = NULL, #' include_trash = NULL) -#' @param filters -#' @param where -#' @param order -#' @param select -#' @param distinct -#' @param limit -#' @param offset -#' @param count +#' @param filters +#' @param where +#' @param order +#' @param select +#' @param distinct +#' @param limit +#' @param offset +#' @param count #' @param cluster_id List objects on a remote federated cluster instead of the current one. #' @param bypass_federation bypass federation behavior, list items from local instance database only #' @param include_trash Include items whose is_trashed attribute is true. @@ -663,9 +663,9 @@ NULL NULL #' keep_services.get -#' +#' #' keep_services.get is a method defined in Arvados class. -#' +#' #' @usage arv$keep_services.get(uuid) #' @param uuid The UUID of the KeepService in question. #' @return KeepService object. @@ -673,9 +673,9 @@ NULL NULL #' keep_services.create -#' +#' #' keep_services.create is a method defined in Arvados class. -#' +#' #' @usage arv$keep_services.create(keepservice, #' ensure_unique_name = "false", cluster_id = NULL) #' @param keepService KeepService object. @@ -686,9 +686,9 @@ NULL NULL #' keep_services.update -#' +#' #' keep_services.update is a method defined in Arvados class. -#' +#' #' @usage arv$keep_services.update(keepservice, #' uuid) #' @param keepService KeepService object. @@ -698,9 +698,9 @@ NULL NULL #' keep_services.delete -#' +#' #' keep_services.delete is a method defined in Arvados class. -#' +#' #' @usage arv$keep_services.delete(uuid) #' @param uuid The UUID of the KeepService in question. #' @return KeepService object. @@ -708,30 +708,30 @@ NULL NULL #' keep_services.accessible -#' +#' #' keep_services.accessible is a method defined in Arvados class. -#' +#' #' @usage arv$keep_services.accessible(NULL) #' @return KeepService object. #' @name keep_services.accessible NULL #' keep_services.list -#' +#' #' keep_services.list is a method defined in Arvados class. -#' +#' #' @usage arv$keep_services.list(filters = NULL, #' where = NULL, order = NULL, select = NULL, #' distinct = NULL, limit = "100", offset = "0", #' count = "exact", cluster_id = NULL, bypass_federation = NULL) -#' @param filters -#' @param where -#' @param order -#' @param select -#' @param distinct -#' @param limit -#' @param offset -#' @param count +#' @param filters +#' @param where +#' @param order +#' @param select +#' @param distinct +#' @param limit +#' @param offset +#' @param count #' @param cluster_id List objects on a remote federated cluster instead of the current one. #' @param bypass_federation bypass federation behavior, list items from local instance database only #' @return KeepServiceList object. @@ -739,9 +739,9 @@ NULL NULL #' links.get -#' +#' #' links.get is a method defined in Arvados class. -#' +#' #' @usage arv$links.get(uuid) #' @param uuid The UUID of the Link in question. #' @return Link object. @@ -749,9 +749,9 @@ NULL NULL #' links.create -#' +#' #' links.create is a method defined in Arvados class. -#' +#' #' @usage arv$links.create(link, ensure_unique_name = "false", #' cluster_id = NULL) #' @param link Link object. @@ -762,9 +762,9 @@ NULL NULL #' links.update -#' +#' #' links.update is a method defined in Arvados class. -#' +#' #' @usage arv$links.update(link, uuid) #' @param link Link object. #' @param uuid The UUID of the Link in question. @@ -773,9 +773,9 @@ NULL NULL #' links.delete -#' +#' #' links.delete is a method defined in Arvados class. -#' +#' #' @usage arv$links.delete(uuid) #' @param uuid The UUID of the Link in question. #' @return Link object. @@ -783,21 +783,21 @@ NULL NULL #' links.list -#' +#' #' links.list is a method defined in Arvados class. -#' +#' #' @usage arv$links.list(filters = NULL, #' where = NULL, order = NULL, select = NULL, #' distinct = NULL, limit = "100", offset = "0", #' count = "exact", cluster_id = NULL, bypass_federation = NULL) -#' @param filters -#' @param where -#' @param order -#' @param select -#' @param distinct -#' @param limit -#' @param offset -#' @param count +#' @param filters +#' @param where +#' @param order +#' @param select +#' @param distinct +#' @param limit +#' @param offset +#' @param count #' @param cluster_id List objects on a remote federated cluster instead of the current one. #' @param bypass_federation bypass federation behavior, list items from local instance database only #' @return LinkList object. @@ -805,19 +805,19 @@ NULL NULL #' links.get_permissions -#' +#' #' links.get_permissions is a method defined in Arvados class. -#' +#' #' @usage arv$links.get_permissions(uuid) -#' @param uuid +#' @param uuid #' @return Link object. #' @name links.get_permissions NULL #' logs.get -#' +#' #' logs.get is a method defined in Arvados class. -#' +#' #' @usage arv$logs.get(uuid) #' @param uuid The UUID of the Log in question. #' @return Log object. @@ -825,9 +825,9 @@ NULL NULL #' logs.create -#' +#' #' logs.create is a method defined in Arvados class. -#' +#' #' @usage arv$logs.create(log, ensure_unique_name = "false", #' cluster_id = NULL) #' @param log Log object. @@ -838,9 +838,9 @@ NULL NULL #' logs.update -#' +#' #' logs.update is a method defined in Arvados class. -#' +#' #' @usage arv$logs.update(log, uuid) #' @param log Log object. #' @param uuid The UUID of the Log in question. @@ -849,9 +849,9 @@ NULL NULL #' logs.delete -#' +#' #' logs.delete is a method defined in Arvados class. -#' +#' #' @usage arv$logs.delete(uuid) #' @param uuid The UUID of the Log in question. #' @return Log object. @@ -859,21 +859,21 @@ NULL NULL #' logs.list -#' +#' #' logs.list is a method defined in Arvados class. -#' +#' #' @usage arv$logs.list(filters = NULL, where = NULL, #' order = NULL, select = NULL, distinct = NULL, #' limit = "100", offset = "0", count = "exact", #' cluster_id = NULL, bypass_federation = NULL) -#' @param filters -#' @param where -#' @param order -#' @param select -#' @param distinct -#' @param limit -#' @param offset -#' @param count +#' @param filters +#' @param where +#' @param order +#' @param select +#' @param distinct +#' @param limit +#' @param offset +#' @param count #' @param cluster_id List objects on a remote federated cluster instead of the current one. #' @param bypass_federation bypass federation behavior, list items from local instance database only #' @return LogList object. @@ -881,9 +881,9 @@ NULL NULL #' users.get -#' +#' #' users.get is a method defined in Arvados class. -#' +#' #' @usage arv$users.get(uuid) #' @param uuid The UUID of the User in question. #' @return User object. @@ -891,9 +891,9 @@ NULL NULL #' users.create -#' +#' #' users.create is a method defined in Arvados class. -#' +#' #' @usage arv$users.create(user, ensure_unique_name = "false", #' cluster_id = NULL) #' @param user User object. @@ -904,21 +904,21 @@ NULL NULL #' users.update -#' +#' #' users.update is a method defined in Arvados class. -#' +#' #' @usage arv$users.update(user, uuid, bypass_federation = NULL) #' @param user User object. #' @param uuid The UUID of the User in question. -#' @param bypass_federation +#' @param bypass_federation #' @return User object. #' @name users.update NULL #' users.delete -#' +#' #' users.delete is a method defined in Arvados class. -#' +#' #' @usage arv$users.delete(uuid) #' @param uuid The UUID of the User in question. #' @return User object. @@ -926,101 +926,90 @@ NULL NULL #' users.current -#' +#' #' users.current is a method defined in Arvados class. -#' +#' #' @usage arv$users.current(NULL) #' @return User object. #' @name users.current NULL #' users.system -#' +#' #' users.system is a method defined in Arvados class. -#' +#' #' @usage arv$users.system(NULL) #' @return User object. #' @name users.system NULL #' users.activate -#' +#' #' users.activate is a method defined in Arvados class. -#' +#' #' @usage arv$users.activate(uuid) -#' @param uuid +#' @param uuid #' @return User object. #' @name users.activate NULL #' users.setup -#' +#' #' users.setup is a method defined in Arvados class. -#' +#' #' @usage arv$users.setup(uuid = NULL, user = NULL, #' repo_name = NULL, vm_uuid = NULL, send_notification_email = "false") -#' @param uuid -#' @param user -#' @param repo_name -#' @param vm_uuid -#' @param send_notification_email +#' @param uuid +#' @param user +#' @param repo_name +#' @param vm_uuid +#' @param send_notification_email #' @return User object. #' @name users.setup NULL #' users.unsetup -#' +#' #' users.unsetup is a method defined in Arvados class. -#' +#' #' @usage arv$users.unsetup(uuid) -#' @param uuid +#' @param uuid #' @return User object. #' @name users.unsetup NULL -#' users.update_uuid -#' -#' users.update_uuid is a method defined in Arvados class. -#' -#' @usage arv$users.update_uuid(uuid, new_uuid) -#' @param uuid -#' @param new_uuid -#' @return User object. -#' @name users.update_uuid -NULL - #' users.merge -#' +#' #' users.merge is a method defined in Arvados class. -#' +#' #' @usage arv$users.merge(new_owner_uuid, #' new_user_token = NULL, redirect_to_new_user = NULL, #' old_user_uuid = NULL, new_user_uuid = NULL) -#' @param new_owner_uuid -#' @param new_user_token -#' @param redirect_to_new_user -#' @param old_user_uuid -#' @param new_user_uuid +#' @param new_owner_uuid +#' @param new_user_token +#' @param redirect_to_new_user +#' @param old_user_uuid +#' @param new_user_uuid #' @return User object. #' @name users.merge NULL #' users.list -#' +#' #' users.list is a method defined in Arvados class. -#' +#' #' @usage arv$users.list(filters = NULL, #' where = NULL, order = NULL, select = NULL, #' distinct = NULL, limit = "100", offset = "0", #' count = "exact", cluster_id = NULL, bypass_federation = NULL) -#' @param filters -#' @param where -#' @param order -#' @param select -#' @param distinct -#' @param limit -#' @param offset -#' @param count +#' @param filters +#' @param where +#' @param order +#' @param select +#' @param distinct +#' @param limit +#' @param offset +#' @param count #' @param cluster_id List objects on a remote federated cluster instead of the current one. #' @param bypass_federation bypass federation behavior, list items from local instance database only #' @return UserList object. @@ -1028,9 +1017,9 @@ NULL NULL #' repositories.get -#' +#' #' repositories.get is a method defined in Arvados class. -#' +#' #' @usage arv$repositories.get(uuid) #' @param uuid The UUID of the Repository in question. #' @return Repository object. @@ -1038,9 +1027,9 @@ NULL NULL #' repositories.create -#' +#' #' repositories.create is a method defined in Arvados class. -#' +#' #' @usage arv$repositories.create(repository, #' ensure_unique_name = "false", cluster_id = NULL) #' @param repository Repository object. @@ -1051,9 +1040,9 @@ NULL NULL #' repositories.update -#' +#' #' repositories.update is a method defined in Arvados class. -#' +#' #' @usage arv$repositories.update(repository, #' uuid) #' @param repository Repository object. @@ -1063,9 +1052,9 @@ NULL NULL #' repositories.delete -#' +#' #' repositories.delete is a method defined in Arvados class. -#' +#' #' @usage arv$repositories.delete(uuid) #' @param uuid The UUID of the Repository in question. #' @return Repository object. @@ -1073,30 +1062,30 @@ NULL NULL #' repositories.get_all_permissions -#' +#' #' repositories.get_all_permissions is a method defined in Arvados class. -#' +#' #' @usage arv$repositories.get_all_permissions(NULL) #' @return Repository object. #' @name repositories.get_all_permissions NULL #' repositories.list -#' +#' #' repositories.list is a method defined in Arvados class. -#' +#' #' @usage arv$repositories.list(filters = NULL, #' where = NULL, order = NULL, select = NULL, #' distinct = NULL, limit = "100", offset = "0", #' count = "exact", cluster_id = NULL, bypass_federation = NULL) -#' @param filters -#' @param where -#' @param order -#' @param select -#' @param distinct -#' @param limit -#' @param offset -#' @param count +#' @param filters +#' @param where +#' @param order +#' @param select +#' @param distinct +#' @param limit +#' @param offset +#' @param count #' @param cluster_id List objects on a remote federated cluster instead of the current one. #' @param bypass_federation bypass federation behavior, list items from local instance database only #' @return RepositoryList object. @@ -1104,9 +1093,9 @@ NULL NULL #' virtual_machines.get -#' +#' #' virtual_machines.get is a method defined in Arvados class. -#' +#' #' @usage arv$virtual_machines.get(uuid) #' @param uuid The UUID of the VirtualMachine in question. #' @return VirtualMachine object. @@ -1114,9 +1103,9 @@ NULL NULL #' virtual_machines.create -#' +#' #' virtual_machines.create is a method defined in Arvados class. -#' +#' #' @usage arv$virtual_machines.create(virtualmachine, #' ensure_unique_name = "false", cluster_id = NULL) #' @param virtualMachine VirtualMachine object. @@ -1127,9 +1116,9 @@ NULL NULL #' virtual_machines.update -#' +#' #' virtual_machines.update is a method defined in Arvados class. -#' +#' #' @usage arv$virtual_machines.update(virtualmachine, #' uuid) #' @param virtualMachine VirtualMachine object. @@ -1139,9 +1128,9 @@ NULL NULL #' virtual_machines.delete -#' +#' #' virtual_machines.delete is a method defined in Arvados class. -#' +#' #' @usage arv$virtual_machines.delete(uuid) #' @param uuid The UUID of the VirtualMachine in question. #' @return VirtualMachine object. @@ -1149,40 +1138,40 @@ NULL NULL #' virtual_machines.logins -#' +#' #' virtual_machines.logins is a method defined in Arvados class. -#' +#' #' @usage arv$virtual_machines.logins(uuid) -#' @param uuid +#' @param uuid #' @return VirtualMachine object. #' @name virtual_machines.logins NULL #' virtual_machines.get_all_logins -#' +#' #' virtual_machines.get_all_logins is a method defined in Arvados class. -#' +#' #' @usage arv$virtual_machines.get_all_logins(NULL) #' @return VirtualMachine object. #' @name virtual_machines.get_all_logins NULL #' virtual_machines.list -#' +#' #' virtual_machines.list is a method defined in Arvados class. -#' +#' #' @usage arv$virtual_machines.list(filters = NULL, #' where = NULL, order = NULL, select = NULL, #' distinct = NULL, limit = "100", offset = "0", #' count = "exact", cluster_id = NULL, bypass_federation = NULL) -#' @param filters -#' @param where -#' @param order -#' @param select -#' @param distinct -#' @param limit -#' @param offset -#' @param count +#' @param filters +#' @param where +#' @param order +#' @param select +#' @param distinct +#' @param limit +#' @param offset +#' @param count #' @param cluster_id List objects on a remote federated cluster instead of the current one. #' @param bypass_federation bypass federation behavior, list items from local instance database only #' @return VirtualMachineList object. @@ -1190,9 +1179,9 @@ NULL NULL #' workflows.get -#' +#' #' workflows.get is a method defined in Arvados class. -#' +#' #' @usage arv$workflows.get(uuid) #' @param uuid The UUID of the Workflow in question. #' @return Workflow object. @@ -1200,9 +1189,9 @@ NULL NULL #' workflows.create -#' +#' #' workflows.create is a method defined in Arvados class. -#' +#' #' @usage arv$workflows.create(workflow, #' ensure_unique_name = "false", cluster_id = NULL) #' @param workflow Workflow object. @@ -1213,9 +1202,9 @@ NULL NULL #' workflows.update -#' +#' #' workflows.update is a method defined in Arvados class. -#' +#' #' @usage arv$workflows.update(workflow, #' uuid) #' @param workflow Workflow object. @@ -1225,9 +1214,9 @@ NULL NULL #' workflows.delete -#' +#' #' workflows.delete is a method defined in Arvados class. -#' +#' #' @usage arv$workflows.delete(uuid) #' @param uuid The UUID of the Workflow in question. #' @return Workflow object. @@ -1235,21 +1224,21 @@ NULL NULL #' workflows.list -#' +#' #' workflows.list is a method defined in Arvados class. -#' +#' #' @usage arv$workflows.list(filters = NULL, #' where = NULL, order = NULL, select = NULL, #' distinct = NULL, limit = "100", offset = "0", #' count = "exact", cluster_id = NULL, bypass_federation = NULL) -#' @param filters -#' @param where -#' @param order -#' @param select -#' @param distinct -#' @param limit -#' @param offset -#' @param count +#' @param filters +#' @param where +#' @param order +#' @param select +#' @param distinct +#' @param limit +#' @param offset +#' @param count #' @param cluster_id List objects on a remote federated cluster instead of the current one. #' @param bypass_federation bypass federation behavior, list items from local instance database only #' @return WorkflowList object. @@ -1257,9 +1246,9 @@ NULL NULL #' user_agreements.get -#' +#' #' user_agreements.get is a method defined in Arvados class. -#' +#' #' @usage arv$user_agreements.get(uuid) #' @param uuid The UUID of the UserAgreement in question. #' @return UserAgreement object. @@ -1267,9 +1256,9 @@ NULL NULL #' user_agreements.create -#' +#' #' user_agreements.create is a method defined in Arvados class. -#' +#' #' @usage arv$user_agreements.create(useragreement, #' ensure_unique_name = "false", cluster_id = NULL) #' @param userAgreement UserAgreement object. @@ -1280,9 +1269,9 @@ NULL NULL #' user_agreements.update -#' +#' #' user_agreements.update is a method defined in Arvados class. -#' +#' #' @usage arv$user_agreements.update(useragreement, #' uuid) #' @param userAgreement UserAgreement object. @@ -1292,9 +1281,9 @@ NULL NULL #' user_agreements.delete -#' +#' #' user_agreements.delete is a method defined in Arvados class. -#' +#' #' @usage arv$user_agreements.delete(uuid) #' @param uuid The UUID of the UserAgreement in question. #' @return UserAgreement object. @@ -1302,39 +1291,39 @@ NULL NULL #' user_agreements.signatures -#' +#' #' user_agreements.signatures is a method defined in Arvados class. -#' +#' #' @usage arv$user_agreements.signatures(NULL) #' @return UserAgreement object. #' @name user_agreements.signatures NULL #' user_agreements.sign -#' +#' #' user_agreements.sign is a method defined in Arvados class. -#' +#' #' @usage arv$user_agreements.sign(NULL) #' @return UserAgreement object. #' @name user_agreements.sign NULL #' user_agreements.list -#' +#' #' user_agreements.list is a method defined in Arvados class. -#' +#' #' @usage arv$user_agreements.list(filters = NULL, #' where = NULL, order = NULL, select = NULL, #' distinct = NULL, limit = "100", offset = "0", #' count = "exact", cluster_id = NULL, bypass_federation = NULL) -#' @param filters -#' @param where -#' @param order -#' @param select -#' @param distinct -#' @param limit -#' @param offset -#' @param count +#' @param filters +#' @param where +#' @param order +#' @param select +#' @param distinct +#' @param limit +#' @param offset +#' @param count #' @param cluster_id List objects on a remote federated cluster instead of the current one. #' @param bypass_federation bypass federation behavior, list items from local instance database only #' @return UserAgreementList object. @@ -1342,27 +1331,27 @@ NULL NULL #' user_agreements.new -#' +#' #' user_agreements.new is a method defined in Arvados class. -#' +#' #' @usage arv$user_agreements.new(NULL) #' @return UserAgreement object. #' @name user_agreements.new NULL #' configs.get -#' +#' #' configs.get is a method defined in Arvados class. -#' +#' #' @usage arv$configs.get(NULL) #' @return object. #' @name configs.get NULL #' project.get -#' +#' #' projects.get is equivalent to groups.get method. -#' +#' #' @usage arv$projects.get(uuid) #' @param uuid The UUID of the Group in question. #' @return Group object. @@ -1370,9 +1359,9 @@ NULL NULL #' project.create -#' +#' #' projects.create wrapps groups.create method by setting group_class attribute to "project". -#' +#' #' @usage arv$projects.create(group, ensure_unique_name = "false") #' @param group Group object. #' @param ensure_unique_name Adjust name to ensure uniqueness instead of returning an error on (owner_uuid, name) collision. @@ -1381,9 +1370,9 @@ NULL NULL #' project.update -#' +#' #' projects.update wrapps groups.update method by setting group_class attribute to "project". -#' +#' #' @usage arv$projects.update(group, uuid) #' @param group Group object. #' @param uuid The UUID of the Group in question. @@ -1392,9 +1381,9 @@ NULL NULL #' project.delete -#' +#' #' projects.delete is equivalent to groups.delete method. -#' +#' #' @usage arv$project.delete(uuid) #' @param uuid The UUID of the Group in question. #' @return Group object. @@ -1402,22 +1391,22 @@ NULL NULL #' project.list -#' +#' #' projects.list wrapps groups.list method by setting group_class attribute to "project". -#' +#' #' @usage arv$projects.list(filters = NULL, #' where = NULL, order = NULL, distinct = NULL, #' limit = "100", offset = "0", count = "exact", #' include_trash = NULL, uuid = NULL, recursive = NULL) -#' @param filters -#' @param where -#' @param order -#' @param distinct -#' @param limit -#' @param offset -#' @param count +#' @param filters +#' @param where +#' @param order +#' @param distinct +#' @param limit +#' @param offset +#' @param count #' @param include_trash Include items whose is_trashed attribute is true. -#' @param uuid +#' @param uuid #' @param recursive Include contents from child groups recursively. #' @return Group object. #' @name projects.list @@ -1537,7 +1526,6 @@ NULL #' \item{}{\code{\link{users.system}}} #' \item{}{\code{\link{users.unsetup}}} #' \item{}{\code{\link{users.update}}} -#' \item{}{\code{\link{users.update_uuid}}} #' \item{}{\code{\link{virtual_machines.create}}} #' \item{}{\code{\link{virtual_machines.delete}}} #' \item{}{\code{\link{virtual_machines.get}}} @@ -1640,19 +1628,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("api_clients/${uuid}") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + body <- NULL - + response <- private$REST$http$exec("GET", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -1661,24 +1649,24 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("api_clients") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- list(ensure_unique_name = ensure_unique_name, cluster_id = cluster_id) - + if(length(apiclient) > 0) - body <- jsonlite::toJSON(list(apiclient = apiclient), + body <- jsonlite::toJSON(list(apiclient = apiclient), auto_unbox = TRUE) else body <- NULL - + response <- private$REST$http$exec("POST", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -1686,23 +1674,23 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("api_clients/${uuid}") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + if(length(apiclient) > 0) - body <- jsonlite::toJSON(list(apiclient = apiclient), + body <- jsonlite::toJSON(list(apiclient = apiclient), auto_unbox = TRUE) else body <- NULL - + response <- private$REST$http$exec("PUT", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -1710,19 +1698,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("api_clients/${uuid}") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + body <- NULL - + response <- private$REST$http$exec("DELETE", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -1733,22 +1721,22 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("api_clients") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- list(filters = filters, where = where, order = order, select = select, distinct = distinct, limit = limit, offset = offset, count = count, cluster_id = cluster_id, bypass_federation = bypass_federation) - + body <- NULL - + response <- private$REST$http$exec("GET", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -1756,19 +1744,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("api_client_authorizations/${uuid}") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + body <- NULL - + response <- private$REST$http$exec("GET", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -1777,24 +1765,24 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("api_client_authorizations") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- list(ensure_unique_name = ensure_unique_name, cluster_id = cluster_id) - + if(length(apiclientauthorization) > 0) - body <- jsonlite::toJSON(list(apiclientauthorization = apiclientauthorization), + body <- jsonlite::toJSON(list(apiclientauthorization = apiclientauthorization), auto_unbox = TRUE) else body <- NULL - + response <- private$REST$http$exec("POST", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -1802,23 +1790,23 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("api_client_authorizations/${uuid}") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + if(length(apiclientauthorization) > 0) - body <- jsonlite::toJSON(list(apiclientauthorization = apiclientauthorization), + body <- jsonlite::toJSON(list(apiclientauthorization = apiclientauthorization), auto_unbox = TRUE) else body <- NULL - + response <- private$REST$http$exec("PUT", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -1826,19 +1814,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("api_client_authorizations/${uuid}") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + body <- NULL - + response <- private$REST$http$exec("DELETE", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -1846,20 +1834,20 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("api_client_authorizations/create_system_auth") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- list(api_client_id = api_client_id, scopes = scopes) - + body <- NULL - + response <- private$REST$http$exec("POST", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -1867,19 +1855,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("api_client_authorizations/current") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + body <- NULL - + response <- private$REST$http$exec("GET", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -1890,22 +1878,22 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("api_client_authorizations") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- list(filters = filters, where = where, order = order, select = select, distinct = distinct, limit = limit, offset = offset, count = count, cluster_id = cluster_id, bypass_federation = bypass_federation) - + body <- NULL - + response <- private$REST$http$exec("GET", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -1913,19 +1901,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("authorized_keys/${uuid}") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + body <- NULL - + response <- private$REST$http$exec("GET", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -1934,24 +1922,24 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("authorized_keys") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- list(ensure_unique_name = ensure_unique_name, cluster_id = cluster_id) - + if(length(authorizedkey) > 0) - body <- jsonlite::toJSON(list(authorizedkey = authorizedkey), + body <- jsonlite::toJSON(list(authorizedkey = authorizedkey), auto_unbox = TRUE) else body <- NULL - + response <- private$REST$http$exec("POST", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -1959,23 +1947,23 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("authorized_keys/${uuid}") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + if(length(authorizedkey) > 0) - body <- jsonlite::toJSON(list(authorizedkey = authorizedkey), + body <- jsonlite::toJSON(list(authorizedkey = authorizedkey), auto_unbox = TRUE) else body <- NULL - + response <- private$REST$http$exec("PUT", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -1983,19 +1971,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("authorized_keys/${uuid}") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + body <- NULL - + response <- private$REST$http$exec("DELETE", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -2006,22 +1994,22 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("authorized_keys") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- list(filters = filters, where = where, order = order, select = select, distinct = distinct, limit = limit, offset = offset, count = count, cluster_id = cluster_id, bypass_federation = bypass_federation) - + body <- NULL - + response <- private$REST$http$exec("GET", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -2029,19 +2017,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("collections/${uuid}") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + body <- NULL - + response <- private$REST$http$exec("GET", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -2050,24 +2038,24 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("collections") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- list(ensure_unique_name = ensure_unique_name, cluster_id = cluster_id) - + if(length(collection) > 0) - body <- jsonlite::toJSON(list(collection = collection), + body <- jsonlite::toJSON(list(collection = collection), auto_unbox = TRUE) else body <- NULL - + response <- private$REST$http$exec("POST", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -2075,23 +2063,23 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("collections/${uuid}") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + if(length(collection) > 0) - body <- jsonlite::toJSON(list(collection = collection), + body <- jsonlite::toJSON(list(collection = collection), auto_unbox = TRUE) else body <- NULL - + response <- private$REST$http$exec("PUT", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -2099,19 +2087,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("collections/${uuid}") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + body <- NULL - + response <- private$REST$http$exec("DELETE", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -2119,19 +2107,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("collections/${uuid}/provenance") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + body <- NULL - + response <- private$REST$http$exec("GET", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -2139,19 +2127,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("collections/${uuid}/used_by") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + body <- NULL - + response <- private$REST$http$exec("GET", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -2159,19 +2147,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("collections/${uuid}/trash") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + body <- NULL - + response <- private$REST$http$exec("POST", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -2179,19 +2167,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("collections/${uuid}/untrash") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + body <- NULL - + response <- private$REST$http$exec("POST", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -2203,23 +2191,23 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("collections") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- list(filters = filters, where = where, order = order, select = select, distinct = distinct, limit = limit, offset = offset, count = count, cluster_id = cluster_id, bypass_federation = bypass_federation, include_trash = include_trash, include_old_versions = include_old_versions) - + body <- NULL - + response <- private$REST$http$exec("GET", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -2227,19 +2215,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("containers/${uuid}") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + body <- NULL - + response <- private$REST$http$exec("GET", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -2248,24 +2236,24 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("containers") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- list(ensure_unique_name = ensure_unique_name, cluster_id = cluster_id) - + if(length(container) > 0) - body <- jsonlite::toJSON(list(container = container), + body <- jsonlite::toJSON(list(container = container), auto_unbox = TRUE) else body <- NULL - + response <- private$REST$http$exec("POST", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -2273,23 +2261,23 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("containers/${uuid}") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + if(length(container) > 0) - body <- jsonlite::toJSON(list(container = container), + body <- jsonlite::toJSON(list(container = container), auto_unbox = TRUE) else body <- NULL - + response <- private$REST$http$exec("PUT", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -2297,19 +2285,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("containers/${uuid}") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + body <- NULL - + response <- private$REST$http$exec("DELETE", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -2317,19 +2305,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("containers/${uuid}/auth") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + body <- NULL - + response <- private$REST$http$exec("GET", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -2337,19 +2325,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("containers/${uuid}/lock") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + body <- NULL - + response <- private$REST$http$exec("POST", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -2357,19 +2345,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("containers/${uuid}/unlock") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + body <- NULL - + response <- private$REST$http$exec("POST", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -2377,19 +2365,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("containers/${uuid}/secret_mounts") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + body <- NULL - + response <- private$REST$http$exec("GET", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -2397,19 +2385,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("containers/current") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + body <- NULL - + response <- private$REST$http$exec("GET", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -2420,22 +2408,22 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("containers") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- list(filters = filters, where = where, order = order, select = select, distinct = distinct, limit = limit, offset = offset, count = count, cluster_id = cluster_id, bypass_federation = bypass_federation) - + body <- NULL - + response <- private$REST$http$exec("GET", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -2443,19 +2431,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("container_requests/${uuid}") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + body <- NULL - + response <- private$REST$http$exec("GET", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -2464,24 +2452,24 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("container_requests") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- list(ensure_unique_name = ensure_unique_name, cluster_id = cluster_id) - + if(length(containerrequest) > 0) - body <- jsonlite::toJSON(list(containerrequest = containerrequest), + body <- jsonlite::toJSON(list(containerrequest = containerrequest), auto_unbox = TRUE) else body <- NULL - + response <- private$REST$http$exec("POST", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -2489,23 +2477,23 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("container_requests/${uuid}") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + if(length(containerrequest) > 0) - body <- jsonlite::toJSON(list(containerrequest = containerrequest), + body <- jsonlite::toJSON(list(containerrequest = containerrequest), auto_unbox = TRUE) else body <- NULL - + response <- private$REST$http$exec("PUT", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -2513,19 +2501,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("container_requests/${uuid}") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + body <- NULL - + response <- private$REST$http$exec("DELETE", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -2537,23 +2525,23 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("container_requests") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- list(filters = filters, where = where, order = order, select = select, distinct = distinct, limit = limit, offset = offset, count = count, cluster_id = cluster_id, bypass_federation = bypass_federation, include_trash = include_trash) - + body <- NULL - + response <- private$REST$http$exec("GET", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -2561,19 +2549,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("groups/${uuid}") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + body <- NULL - + response <- private$REST$http$exec("GET", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -2582,24 +2570,24 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("groups") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- list(ensure_unique_name = ensure_unique_name, cluster_id = cluster_id, async = async) - + if(length(group) > 0) - body <- jsonlite::toJSON(list(group = group), + body <- jsonlite::toJSON(list(group = group), auto_unbox = TRUE) else body <- NULL - + response <- private$REST$http$exec("POST", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -2607,23 +2595,23 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("groups/${uuid}") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- list(async = async) - + if(length(group) > 0) - body <- jsonlite::toJSON(list(group = group), + body <- jsonlite::toJSON(list(group = group), auto_unbox = TRUE) else body <- NULL - + response <- private$REST$http$exec("PUT", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -2631,19 +2619,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("groups/${uuid}") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + body <- NULL - + response <- private$REST$http$exec("DELETE", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -2656,23 +2644,23 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("groups/contents") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- list(filters = filters, where = where, order = order, distinct = distinct, limit = limit, offset = offset, count = count, cluster_id = cluster_id, bypass_federation = bypass_federation, include_trash = include_trash, uuid = uuid, recursive = recursive, include = include) - + body <- NULL - + response <- private$REST$http$exec("GET", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -2684,23 +2672,23 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("groups/shared") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- list(filters = filters, where = where, order = order, select = select, distinct = distinct, limit = limit, offset = offset, count = count, cluster_id = cluster_id, bypass_federation = bypass_federation, include_trash = include_trash, include = include) - + body <- NULL - + response <- private$REST$http$exec("GET", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -2708,19 +2696,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("groups/${uuid}/trash") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + body <- NULL - + response <- private$REST$http$exec("POST", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -2728,19 +2716,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("groups/${uuid}/untrash") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + body <- NULL - + response <- private$REST$http$exec("POST", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -2752,23 +2740,23 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("groups") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- list(filters = filters, where = where, order = order, select = select, distinct = distinct, limit = limit, offset = offset, count = count, cluster_id = cluster_id, bypass_federation = bypass_federation, include_trash = include_trash) - + body <- NULL - + response <- private$REST$http$exec("GET", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -2776,19 +2764,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("keep_services/${uuid}") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + body <- NULL - + response <- private$REST$http$exec("GET", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -2797,24 +2785,24 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("keep_services") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- list(ensure_unique_name = ensure_unique_name, cluster_id = cluster_id) - + if(length(keepservice) > 0) - body <- jsonlite::toJSON(list(keepservice = keepservice), + body <- jsonlite::toJSON(list(keepservice = keepservice), auto_unbox = TRUE) else body <- NULL - + response <- private$REST$http$exec("POST", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -2822,23 +2810,23 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("keep_services/${uuid}") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + if(length(keepservice) > 0) - body <- jsonlite::toJSON(list(keepservice = keepservice), + body <- jsonlite::toJSON(list(keepservice = keepservice), auto_unbox = TRUE) else body <- NULL - + response <- private$REST$http$exec("PUT", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -2846,19 +2834,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("keep_services/${uuid}") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + body <- NULL - + response <- private$REST$http$exec("DELETE", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -2866,19 +2854,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("keep_services/accessible") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + body <- NULL - + response <- private$REST$http$exec("GET", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -2889,22 +2877,22 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("keep_services") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- list(filters = filters, where = where, order = order, select = select, distinct = distinct, limit = limit, offset = offset, count = count, cluster_id = cluster_id, bypass_federation = bypass_federation) - + body <- NULL - + response <- private$REST$http$exec("GET", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -2912,19 +2900,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("links/${uuid}") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + body <- NULL - + response <- private$REST$http$exec("GET", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -2933,24 +2921,24 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("links") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- list(ensure_unique_name = ensure_unique_name, cluster_id = cluster_id) - + if(length(link) > 0) - body <- jsonlite::toJSON(list(link = link), + body <- jsonlite::toJSON(list(link = link), auto_unbox = TRUE) else body <- NULL - + response <- private$REST$http$exec("POST", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -2958,23 +2946,23 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("links/${uuid}") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + if(length(link) > 0) - body <- jsonlite::toJSON(list(link = link), + body <- jsonlite::toJSON(list(link = link), auto_unbox = TRUE) else body <- NULL - + response <- private$REST$http$exec("PUT", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -2982,19 +2970,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("links/${uuid}") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + body <- NULL - + response <- private$REST$http$exec("DELETE", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -3005,22 +2993,22 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("links") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- list(filters = filters, where = where, order = order, select = select, distinct = distinct, limit = limit, offset = offset, count = count, cluster_id = cluster_id, bypass_federation = bypass_federation) - + body <- NULL - + response <- private$REST$http$exec("GET", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -3028,19 +3016,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("permissions/${uuid}") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + body <- NULL - + response <- private$REST$http$exec("GET", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -3048,19 +3036,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("logs/${uuid}") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + body <- NULL - + response <- private$REST$http$exec("GET", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -3069,24 +3057,24 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("logs") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- list(ensure_unique_name = ensure_unique_name, cluster_id = cluster_id) - + if(length(log) > 0) - body <- jsonlite::toJSON(list(log = log), + body <- jsonlite::toJSON(list(log = log), auto_unbox = TRUE) else body <- NULL - + response <- private$REST$http$exec("POST", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -3094,23 +3082,23 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("logs/${uuid}") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + if(length(log) > 0) - body <- jsonlite::toJSON(list(log = log), + body <- jsonlite::toJSON(list(log = log), auto_unbox = TRUE) else body <- NULL - + response <- private$REST$http$exec("PUT", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -3118,19 +3106,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("logs/${uuid}") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + body <- NULL - + response <- private$REST$http$exec("DELETE", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -3141,22 +3129,22 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("logs") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- list(filters = filters, where = where, order = order, select = select, distinct = distinct, limit = limit, offset = offset, count = count, cluster_id = cluster_id, bypass_federation = bypass_federation) - + body <- NULL - + response <- private$REST$http$exec("GET", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -3164,19 +3152,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("users/${uuid}") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + body <- NULL - + response <- private$REST$http$exec("GET", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -3185,24 +3173,24 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("users") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- list(ensure_unique_name = ensure_unique_name, cluster_id = cluster_id) - + if(length(user) > 0) - body <- jsonlite::toJSON(list(user = user), + body <- jsonlite::toJSON(list(user = user), auto_unbox = TRUE) else body <- NULL - + response <- private$REST$http$exec("POST", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -3210,23 +3198,23 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("users/${uuid}") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- list(bypass_federation = bypass_federation) - + if(length(user) > 0) - body <- jsonlite::toJSON(list(user = user), + body <- jsonlite::toJSON(list(user = user), auto_unbox = TRUE) else body <- NULL - + response <- private$REST$http$exec("PUT", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -3234,19 +3222,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("users/${uuid}") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + body <- NULL - + response <- private$REST$http$exec("DELETE", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -3254,19 +3242,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("users/current") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + body <- NULL - + response <- private$REST$http$exec("GET", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -3274,19 +3262,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("users/system") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + body <- NULL - + response <- private$REST$http$exec("GET", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -3294,19 +3282,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("users/${uuid}/activate") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + body <- NULL - + response <- private$REST$http$exec("POST", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -3315,21 +3303,21 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("users/setup") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- list(uuid = uuid, user = user, repo_name = repo_name, vm_uuid = vm_uuid, send_notification_email = send_notification_email) - + body <- NULL - + response <- private$REST$http$exec("POST", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -3337,39 +3325,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("users/${uuid}/unsetup") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - - body <- NULL - - response <- private$REST$http$exec("POST", url, headers, body, - queryArgs, private$numRetries) - resource <- private$REST$httpParser$parseJSONResponse(response) - - if(!is.null(resource$errors)) - stop(resource$errors) - - resource - }, - users.update_uuid = function(uuid, new_uuid) - { - endPoint <- stringr::str_interp("users/${uuid}/update_uuid") - url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), - "Content-Type" = "application/json") - queryArgs <- list(new_uuid = new_uuid) - body <- NULL - + response <- private$REST$http$exec("POST", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -3379,21 +3347,21 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("users/merge") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- list(new_owner_uuid = new_owner_uuid, new_user_token = new_user_token, redirect_to_new_user = redirect_to_new_user, old_user_uuid = old_user_uuid, new_user_uuid = new_user_uuid) - + body <- NULL - + response <- private$REST$http$exec("POST", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -3404,22 +3372,22 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("users") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- list(filters = filters, where = where, order = order, select = select, distinct = distinct, limit = limit, offset = offset, count = count, cluster_id = cluster_id, bypass_federation = bypass_federation) - + body <- NULL - + response <- private$REST$http$exec("GET", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -3427,19 +3395,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("repositories/${uuid}") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + body <- NULL - + response <- private$REST$http$exec("GET", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -3448,24 +3416,24 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("repositories") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- list(ensure_unique_name = ensure_unique_name, cluster_id = cluster_id) - + if(length(repository) > 0) - body <- jsonlite::toJSON(list(repository = repository), + body <- jsonlite::toJSON(list(repository = repository), auto_unbox = TRUE) else body <- NULL - + response <- private$REST$http$exec("POST", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -3473,23 +3441,23 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("repositories/${uuid}") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + if(length(repository) > 0) - body <- jsonlite::toJSON(list(repository = repository), + body <- jsonlite::toJSON(list(repository = repository), auto_unbox = TRUE) else body <- NULL - + response <- private$REST$http$exec("PUT", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -3497,19 +3465,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("repositories/${uuid}") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + body <- NULL - + response <- private$REST$http$exec("DELETE", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -3517,19 +3485,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("repositories/get_all_permissions") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + body <- NULL - + response <- private$REST$http$exec("GET", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -3540,22 +3508,22 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("repositories") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- list(filters = filters, where = where, order = order, select = select, distinct = distinct, limit = limit, offset = offset, count = count, cluster_id = cluster_id, bypass_federation = bypass_federation) - + body <- NULL - + response <- private$REST$http$exec("GET", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -3563,19 +3531,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("virtual_machines/${uuid}") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + body <- NULL - + response <- private$REST$http$exec("GET", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -3584,24 +3552,24 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("virtual_machines") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- list(ensure_unique_name = ensure_unique_name, cluster_id = cluster_id) - + if(length(virtualmachine) > 0) - body <- jsonlite::toJSON(list(virtualmachine = virtualmachine), + body <- jsonlite::toJSON(list(virtualmachine = virtualmachine), auto_unbox = TRUE) else body <- NULL - + response <- private$REST$http$exec("POST", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -3609,23 +3577,23 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("virtual_machines/${uuid}") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + if(length(virtualmachine) > 0) - body <- jsonlite::toJSON(list(virtualmachine = virtualmachine), + body <- jsonlite::toJSON(list(virtualmachine = virtualmachine), auto_unbox = TRUE) else body <- NULL - + response <- private$REST$http$exec("PUT", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -3633,19 +3601,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("virtual_machines/${uuid}") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + body <- NULL - + response <- private$REST$http$exec("DELETE", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -3653,19 +3621,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("virtual_machines/${uuid}/logins") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + body <- NULL - + response <- private$REST$http$exec("GET", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -3673,19 +3641,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("virtual_machines/get_all_logins") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + body <- NULL - + response <- private$REST$http$exec("GET", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -3696,22 +3664,22 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("virtual_machines") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- list(filters = filters, where = where, order = order, select = select, distinct = distinct, limit = limit, offset = offset, count = count, cluster_id = cluster_id, bypass_federation = bypass_federation) - + body <- NULL - + response <- private$REST$http$exec("GET", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -3719,19 +3687,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("workflows/${uuid}") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + body <- NULL - + response <- private$REST$http$exec("GET", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -3740,24 +3708,24 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("workflows") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- list(ensure_unique_name = ensure_unique_name, cluster_id = cluster_id) - + if(length(workflow) > 0) - body <- jsonlite::toJSON(list(workflow = workflow), + body <- jsonlite::toJSON(list(workflow = workflow), auto_unbox = TRUE) else body <- NULL - + response <- private$REST$http$exec("POST", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -3765,23 +3733,23 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("workflows/${uuid}") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + if(length(workflow) > 0) - body <- jsonlite::toJSON(list(workflow = workflow), + body <- jsonlite::toJSON(list(workflow = workflow), auto_unbox = TRUE) else body <- NULL - + response <- private$REST$http$exec("PUT", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -3789,19 +3757,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("workflows/${uuid}") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + body <- NULL - + response <- private$REST$http$exec("DELETE", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -3812,22 +3780,22 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("workflows") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- list(filters = filters, where = where, order = order, select = select, distinct = distinct, limit = limit, offset = offset, count = count, cluster_id = cluster_id, bypass_federation = bypass_federation) - + body <- NULL - + response <- private$REST$http$exec("GET", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -3835,19 +3803,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("user_agreements/${uuid}") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + body <- NULL - + response <- private$REST$http$exec("GET", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -3856,24 +3824,24 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("user_agreements") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- list(ensure_unique_name = ensure_unique_name, cluster_id = cluster_id) - + if(length(useragreement) > 0) - body <- jsonlite::toJSON(list(useragreement = useragreement), + body <- jsonlite::toJSON(list(useragreement = useragreement), auto_unbox = TRUE) else body <- NULL - + response <- private$REST$http$exec("POST", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -3881,23 +3849,23 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("user_agreements/${uuid}") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + if(length(useragreement) > 0) - body <- jsonlite::toJSON(list(useragreement = useragreement), + body <- jsonlite::toJSON(list(useragreement = useragreement), auto_unbox = TRUE) else body <- NULL - + response <- private$REST$http$exec("PUT", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -3905,19 +3873,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("user_agreements/${uuid}") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + body <- NULL - + response <- private$REST$http$exec("DELETE", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -3925,19 +3893,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("user_agreements/signatures") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + body <- NULL - + response <- private$REST$http$exec("GET", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -3945,19 +3913,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("user_agreements/sign") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + body <- NULL - + response <- private$REST$http$exec("POST", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -3968,22 +3936,22 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("user_agreements") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- list(filters = filters, where = where, order = order, select = select, distinct = distinct, limit = limit, offset = offset, count = count, cluster_id = cluster_id, bypass_federation = bypass_federation) - + body <- NULL - + response <- private$REST$http$exec("GET", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -3991,19 +3959,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("user_agreements/new") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + body <- NULL - + response <- private$REST$http$exec("GET", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, @@ -4011,19 +3979,19 @@ Arvados <- R6::R6Class( { endPoint <- stringr::str_interp("config") url <- paste0(private$host, endPoint) - headers <- list(Authorization = paste("Bearer", private$token), + headers <- list(Authorization = paste("Bearer", private$token), "Content-Type" = "application/json") queryArgs <- NULL - + body <- NULL - + response <- private$REST$http$exec("GET", url, headers, body, queryArgs, private$numRetries) resource <- private$REST$httpParser$parseJSONResponse(response) - + if(!is.null(resource$errors)) stop(resource$errors) - + resource }, diff --git a/sdk/R/man/Arvados.Rd b/sdk/R/man/Arvados.Rd index 51f98d81dc..b55dd00dc5 100644 --- a/sdk/R/man/Arvados.Rd +++ b/sdk/R/man/Arvados.Rd @@ -171,7 +171,6 @@ Arvados class gives users ability to access Arvados REST API. \item{}{\code{\link{users.system}}} \item{}{\code{\link{users.unsetup}}} \item{}{\code{\link{users.update}}} - \item{}{\code{\link{users.update_uuid}}} \item{}{\code{\link{virtual_machines.create}}} \item{}{\code{\link{virtual_machines.delete}}} \item{}{\code{\link{virtual_machines.get}}} diff --git a/sdk/R/man/users.update_uuid.Rd b/sdk/R/man/users.update_uuid.Rd deleted file mode 100644 index af62c2c825..0000000000 --- a/sdk/R/man/users.update_uuid.Rd +++ /dev/null @@ -1,19 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/Arvados.R -\name{users.update_uuid} -\alias{users.update_uuid} -\title{users.update_uuid} -\usage{ -arv$users.update_uuid(uuid, new_uuid) -} -\arguments{ -\item{uuid}{} - -\item{new_uuid}{} -} -\value{ -User object. -} -\description{ -users.update_uuid is a method defined in Arvados class. -} diff --git a/sdk/go/arvados/api.go b/sdk/go/arvados/api.go index 736ace75e7..b429e80084 100644 --- a/sdk/go/arvados/api.go +++ b/sdk/go/arvados/api.go @@ -75,7 +75,6 @@ var ( EndpointUserSystem = APIEndpoint{"GET", "arvados/v1/users/system", ""} EndpointUserUnsetup = APIEndpoint{"POST", "arvados/v1/users/{uuid}/unsetup", ""} EndpointUserUpdate = APIEndpoint{"PATCH", "arvados/v1/users/{uuid}", "user"} - EndpointUserUpdateUUID = APIEndpoint{"POST", "arvados/v1/users/{uuid}/update_uuid", ""} EndpointUserBatchUpdate = APIEndpoint{"PATCH", "arvados/v1/users/batch_update", ""} EndpointUserAuthenticate = APIEndpoint{"POST", "arvados/v1/users/authenticate", ""} EndpointAPIClientAuthorizationCurrent = APIEndpoint{"GET", "arvados/v1/api_client_authorizations/current", ""} @@ -154,11 +153,6 @@ type GroupContentsOptions struct { ExcludeHomeProject bool `json:"exclude_home_project"` } -type UpdateUUIDOptions struct { - UUID string `json:"uuid"` - NewUUID string `json:"new_uuid"` -} - type UserActivateOptions struct { UUID string `json:"uuid"` } @@ -265,7 +259,6 @@ type API interface { SpecimenDelete(ctx context.Context, options DeleteOptions) (Specimen, error) UserCreate(ctx context.Context, options CreateOptions) (User, error) UserUpdate(ctx context.Context, options UpdateOptions) (User, error) - UserUpdateUUID(ctx context.Context, options UpdateUUIDOptions) (User, error) UserMerge(ctx context.Context, options UserMergeOptions) (User, error) UserActivate(ctx context.Context, options UserActivateOptions) (User, error) UserSetup(ctx context.Context, options UserSetupOptions) (map[string]interface{}, error) diff --git a/sdk/go/arvadosclient/arvadosclient.go b/sdk/go/arvadosclient/arvadosclient.go index f8e768c570..8f902d3a09 100644 --- a/sdk/go/arvadosclient/arvadosclient.go +++ b/sdk/go/arvadosclient/arvadosclient.go @@ -426,6 +426,24 @@ func (c *ArvadosClient) Discovery(parameter string) (value interface{}, err erro return value, ErrInvalidArgument } +// ClusterConfig returns the value of the given key in the current cluster's +// exported config. If key is an empty string, it'll return the entire config. +func (c *ArvadosClient) ClusterConfig(key string) (config interface{}, err error) { + var clusterConfig interface{} + err = c.Call("GET", "config", "", "", nil, &clusterConfig) + if err != nil { + return nil, err + } + if key == "" { + return clusterConfig, nil + } + configData, ok := clusterConfig.(map[string]interface{})[key] + if !ok { + return nil, ErrInvalidArgument + } + return configData, nil +} + func (c *ArvadosClient) httpClient() *http.Client { if c.Client != nil { return c.Client diff --git a/sdk/go/arvadosclient/arvadosclient_test.go b/sdk/go/arvadosclient/arvadosclient_test.go index 9d6e4fe7e8..27e23c1aea 100644 --- a/sdk/go/arvadosclient/arvadosclient_test.go +++ b/sdk/go/arvadosclient/arvadosclient_test.go @@ -158,6 +158,36 @@ func (s *ServerRequiredSuite) TestAPIDiscovery_Get_noSuchParameter(c *C) { c.Assert(value, IsNil) } +func (s *ServerRequiredSuite) TestAPIClusterConfig_Get_StorageClasses(c *C) { + arv, err := MakeArvadosClient() + c.Assert(err, IsNil) + data, err := arv.ClusterConfig("StorageClasses") + c.Assert(err, IsNil) + c.Assert(data, NotNil) + clusterConfig := data.(map[string]interface{}) + _, ok := clusterConfig["default"] + c.Assert(ok, Equals, true) +} + +func (s *ServerRequiredSuite) TestAPIClusterConfig_Get_All(c *C) { + arv, err := MakeArvadosClient() + c.Assert(err, IsNil) + data, err := arv.ClusterConfig("") + c.Assert(err, IsNil) + c.Assert(data, NotNil) + clusterConfig := data.(map[string]interface{}) + _, ok := clusterConfig["StorageClasses"] + c.Assert(ok, Equals, true) +} + +func (s *ServerRequiredSuite) TestAPIClusterConfig_Get_noSuchSection(c *C) { + arv, err := MakeArvadosClient() + c.Assert(err, IsNil) + data, err := arv.ClusterConfig("noSuchSection") + c.Assert(err, NotNil) + c.Assert(data, IsNil) +} + func (s *ServerRequiredSuite) TestCreateLarge(c *C) { arv, err := MakeArvadosClient() c.Assert(err, IsNil) diff --git a/sdk/go/arvadostest/api.go b/sdk/go/arvadostest/api.go index f255aeb2d0..8bf01693c4 100644 --- a/sdk/go/arvadostest/api.go +++ b/sdk/go/arvadostest/api.go @@ -193,10 +193,6 @@ func (as *APIStub) UserUpdate(ctx context.Context, options arvados.UpdateOptions as.appendCall(ctx, as.UserUpdate, options) return arvados.User{}, as.Error } -func (as *APIStub) UserUpdateUUID(ctx context.Context, options arvados.UpdateUUIDOptions) (arvados.User, error) { - as.appendCall(ctx, as.UserUpdateUUID, options) - return arvados.User{}, as.Error -} func (as *APIStub) UserActivate(ctx context.Context, options arvados.UserActivateOptions) (arvados.User, error) { as.appendCall(ctx, as.UserActivate, options) return arvados.User{}, as.Error diff --git a/sdk/go/keepclient/keepclient.go b/sdk/go/keepclient/keepclient.go index 3bc6f4afcd..68ac886ddd 100644 --- a/sdk/go/keepclient/keepclient.go +++ b/sdk/go/keepclient/keepclient.go @@ -97,17 +97,18 @@ type HTTPClient interface { // KeepClient holds information about Arvados and Keep servers. type KeepClient struct { - Arvados *arvadosclient.ArvadosClient - Want_replicas int - localRoots map[string]string - writableLocalRoots map[string]string - gatewayRoots map[string]string - lock sync.RWMutex - HTTPClient HTTPClient - Retries int - BlockCache *BlockCache - RequestID string - StorageClasses []string + Arvados *arvadosclient.ArvadosClient + Want_replicas int + localRoots map[string]string + writableLocalRoots map[string]string + gatewayRoots map[string]string + lock sync.RWMutex + HTTPClient HTTPClient + Retries int + BlockCache *BlockCache + RequestID string + StorageClasses []string + DefaultStorageClasses []string // Set by cluster's exported config // set to 1 if all writable services are of disk type, otherwise 0 replicasPerService int @@ -119,7 +120,23 @@ type KeepClient struct { disableDiscovery bool } -// MakeKeepClient creates a new KeepClient, calls +func (kc *KeepClient) loadDefaultClasses() error { + scData, err := kc.Arvados.ClusterConfig("StorageClasses") + if err != nil { + return err + } + classes := scData.(map[string]interface{}) + for scName := range classes { + scConf, _ := classes[scName].(map[string]interface{}) + isDefault, ok := scConf["Default"].(bool) + if ok && isDefault { + kc.DefaultStorageClasses = append(kc.DefaultStorageClasses, scName) + } + } + return nil +} + +// MakeKeepClient creates a new KeepClient, loads default storage classes, calls // DiscoverKeepServices(), and returns when the client is ready to // use. func MakeKeepClient(arv *arvadosclient.ArvadosClient) (*KeepClient, error) { @@ -138,11 +155,16 @@ func New(arv *arvadosclient.ArvadosClient) *KeepClient { defaultReplicationLevel = int(v) } } - return &KeepClient{ + kc := &KeepClient{ Arvados: arv, Want_replicas: defaultReplicationLevel, Retries: 2, } + err = kc.loadDefaultClasses() + if err != nil { + DebugPrintf("DEBUG: Unable to load the default storage classes cluster config") + } + return kc } // PutHR puts a block given the block hash, a reader, and the number of bytes diff --git a/sdk/go/keepclient/keepclient_test.go b/sdk/go/keepclient/keepclient_test.go index cddf03bc37..a6e0a11d51 100644 --- a/sdk/go/keepclient/keepclient_test.go +++ b/sdk/go/keepclient/keepclient_test.go @@ -24,7 +24,6 @@ import ( "git.arvados.org/arvados.git/sdk/go/arvadosclient" "git.arvados.org/arvados.git/sdk/go/arvadostest" . "gopkg.in/check.v1" - check "gopkg.in/check.v1" ) // Gocheck boilerplate @@ -76,9 +75,22 @@ func (s *ServerRequiredSuite) TestMakeKeepClient(c *C) { } } +func (s *ServerRequiredSuite) TestDefaultStorageClasses(c *C) { + arv, err := arvadosclient.MakeArvadosClient() + c.Assert(err, IsNil) + + cc, err := arv.ClusterConfig("StorageClasses") + c.Assert(err, IsNil) + c.Assert(cc, NotNil) + c.Assert(cc.(map[string]interface{})["default"], NotNil) + + kc := New(arv) + c.Assert(kc.DefaultStorageClasses, DeepEquals, []string{"default"}) +} + func (s *ServerRequiredSuite) TestDefaultReplications(c *C) { arv, err := arvadosclient.MakeArvadosClient() - c.Assert(err, Equals, nil) + c.Assert(err, IsNil) kc, err := MakeKeepClient(arv) c.Check(err, IsNil) @@ -133,7 +145,7 @@ func RunFakeKeepServer(st http.Handler) (ks KeepServer) { // bind to 0.0.0.0 or [::] which is not a valid address for Dial() ks.listener, err = net.ListenTCP("tcp", &net.TCPAddr{IP: []byte{127, 0, 0, 1}, Port: 0}) if err != nil { - panic(fmt.Sprintf("Could not listen on any port")) + panic("Could not listen on any port") } ks.url = fmt.Sprintf("http://%s", ks.listener.Addr().String()) go http.Serve(ks.listener, st) @@ -240,28 +252,107 @@ func (s *StandaloneSuite) TestUploadWithStorageClasses(c *C) { } } -func (s *StandaloneSuite) TestPutWithStorageClasses(c *C) { +func (s *StandaloneSuite) TestPutWithoutStorageClassesClusterSupport(c *C) { nServers := 5 for _, trial := range []struct { replicas int clientClasses []string - putClasses []string // putClasses takes precedence over clientClasses + putClasses []string minRequests int maxRequests int success bool }{ + // Talking to an older cluster (no default storage classes exported + // config) and no other additional storage classes requirements. + {1, nil, nil, 1, 1, true}, + {2, nil, nil, 2, 2, true}, + {3, nil, nil, 3, 3, true}, + {nServers*2 + 1, nil, nil, nServers, nServers, false}, + {1, []string{"class1"}, nil, 1, 1, true}, - {2, []string{"class1"}, nil, 1, 2, true}, - {3, []string{"class1"}, nil, 2, 3, true}, + {2, []string{"class1"}, nil, 2, 2, true}, + {3, []string{"class1"}, nil, 3, 3, true}, {1, []string{"class1", "class2"}, nil, 1, 1, true}, - {3, nil, []string{"class1"}, 2, 3, true}, - {1, nil, []string{"class1", "class2"}, 1, 1, true}, - {1, []string{"class404"}, []string{"class1", "class2"}, 1, 1, true}, - {1, []string{"class1"}, []string{"class404", "class2"}, nServers, nServers, false}, {nServers*2 + 1, []string{"class1"}, nil, nServers, nServers, false}, - {1, []string{"class404"}, nil, nServers, nServers, false}, - {1, []string{"class1", "class404"}, nil, nServers, nServers, false}, - {1, nil, []string{"class1", "class404"}, nServers, nServers, false}, + + {1, nil, []string{"class1"}, 1, 1, true}, + {2, nil, []string{"class1"}, 2, 2, true}, + {3, nil, []string{"class1"}, 3, 3, true}, + {1, nil, []string{"class1", "class2"}, 1, 1, true}, + {nServers*2 + 1, nil, []string{"class1"}, nServers, nServers, false}, + } { + c.Logf("%+v", trial) + st := &StubPutHandler{ + c: c, + expectPath: "acbd18db4cc2f85cedef654fccc4a4d8", + expectAPIToken: "abc123", + expectBody: "foo", + expectStorageClass: "*", + returnStorageClasses: "", // Simulate old cluster without SC keep support + handled: make(chan string, 100), + } + ks := RunSomeFakeKeepServers(st, nServers) + arv, _ := arvadosclient.MakeArvadosClient() + kc, _ := MakeKeepClient(arv) + kc.Want_replicas = trial.replicas + kc.StorageClasses = trial.clientClasses + kc.DefaultStorageClasses = nil // Simulate an old cluster without SC defaults + arv.ApiToken = "abc123" + localRoots := make(map[string]string) + writableLocalRoots := make(map[string]string) + for i, k := range ks { + localRoots[fmt.Sprintf("zzzzz-bi6l4-fakefakefake%03d", i)] = k.url + writableLocalRoots[fmt.Sprintf("zzzzz-bi6l4-fakefakefake%03d", i)] = k.url + defer k.listener.Close() + } + kc.SetServiceRoots(localRoots, writableLocalRoots, nil) + + _, err := kc.BlockWrite(context.Background(), arvados.BlockWriteOptions{ + Data: []byte("foo"), + StorageClasses: trial.putClasses, + }) + if trial.success { + c.Check(err, IsNil) + } else { + c.Check(err, NotNil) + } + c.Check(len(st.handled) >= trial.minRequests, Equals, true, Commentf("len(st.handled)==%d, trial.minRequests==%d", len(st.handled), trial.minRequests)) + c.Check(len(st.handled) <= trial.maxRequests, Equals, true, Commentf("len(st.handled)==%d, trial.maxRequests==%d", len(st.handled), trial.maxRequests)) + if trial.clientClasses == nil && trial.putClasses == nil { + c.Check(st.requests[0].Header.Get("X-Keep-Storage-Classes"), Equals, "") + } + } +} + +func (s *StandaloneSuite) TestPutWithStorageClasses(c *C) { + nServers := 5 + for _, trial := range []struct { + replicas int + defaultClasses []string + clientClasses []string // clientClasses takes precedence over defaultClasses + putClasses []string // putClasses takes precedence over clientClasses + minRequests int + maxRequests int + success bool + }{ + {1, []string{"class1"}, nil, nil, 1, 1, true}, + {2, []string{"class1"}, nil, nil, 1, 2, true}, + {3, []string{"class1"}, nil, nil, 2, 3, true}, + {1, []string{"class1", "class2"}, nil, nil, 1, 1, true}, + + // defaultClasses doesn't matter when any of the others is specified. + {1, []string{"class1"}, []string{"class1"}, nil, 1, 1, true}, + {2, []string{"class1"}, []string{"class1"}, nil, 1, 2, true}, + {3, []string{"class1"}, []string{"class1"}, nil, 2, 3, true}, + {1, []string{"class1"}, []string{"class1", "class2"}, nil, 1, 1, true}, + {3, []string{"class1"}, nil, []string{"class1"}, 2, 3, true}, + {1, []string{"class1"}, nil, []string{"class1", "class2"}, 1, 1, true}, + {1, []string{"class1"}, []string{"class404"}, []string{"class1", "class2"}, 1, 1, true}, + {1, []string{"class1"}, []string{"class1"}, []string{"class404", "class2"}, nServers, nServers, false}, + {nServers*2 + 1, []string{}, []string{"class1"}, nil, nServers, nServers, false}, + {1, []string{"class1"}, []string{"class404"}, nil, nServers, nServers, false}, + {1, []string{"class1"}, []string{"class1", "class404"}, nil, nServers, nServers, false}, + {1, []string{"class1"}, nil, []string{"class1", "class404"}, nServers, nServers, false}, } { c.Logf("%+v", trial) st := &StubPutHandler{ @@ -278,6 +369,7 @@ func (s *StandaloneSuite) TestPutWithStorageClasses(c *C) { kc, _ := MakeKeepClient(arv) kc.Want_replicas = trial.replicas kc.StorageClasses = trial.clientClasses + kc.DefaultStorageClasses = trial.defaultClasses arv.ApiToken = "abc123" localRoots := make(map[string]string) writableLocalRoots := make(map[string]string) @@ -293,17 +385,17 @@ func (s *StandaloneSuite) TestPutWithStorageClasses(c *C) { StorageClasses: trial.putClasses, }) if trial.success { - c.Check(err, check.IsNil) + c.Check(err, IsNil) } else { - c.Check(err, check.NotNil) + c.Check(err, NotNil) } - c.Check(len(st.handled) >= trial.minRequests, check.Equals, true, check.Commentf("len(st.handled)==%d, trial.minRequests==%d", len(st.handled), trial.minRequests)) - c.Check(len(st.handled) <= trial.maxRequests, check.Equals, true, check.Commentf("len(st.handled)==%d, trial.maxRequests==%d", len(st.handled), trial.maxRequests)) - if !trial.success && trial.replicas == 1 && c.Check(len(st.requests) >= 2, check.Equals, true) { + c.Check(len(st.handled) >= trial.minRequests, Equals, true, Commentf("len(st.handled)==%d, trial.minRequests==%d", len(st.handled), trial.minRequests)) + c.Check(len(st.handled) <= trial.maxRequests, Equals, true, Commentf("len(st.handled)==%d, trial.maxRequests==%d", len(st.handled), trial.maxRequests)) + if !trial.success && trial.replicas == 1 && c.Check(len(st.requests) >= 2, Equals, true) { // Max concurrency should be 1. First request // should have succeeded for class1. Second // request should only ask for class404. - c.Check(st.requests[1].Header.Get("X-Keep-Storage-Classes"), check.Equals, "class404") + c.Check(st.requests[1].Header.Get("X-Keep-Storage-Classes"), Equals, "class404") } } } @@ -390,7 +482,7 @@ func (s *StandaloneSuite) TestPutB(c *C) { expectPath: hash, expectAPIToken: "abc123", expectBody: "foo", - expectStorageClass: "", + expectStorageClass: "default", returnStorageClasses: "", handled: make(chan string, 5), } @@ -434,7 +526,7 @@ func (s *StandaloneSuite) TestPutHR(c *C) { expectPath: hash, expectAPIToken: "abc123", expectBody: "foo", - expectStorageClass: "", + expectStorageClass: "default", returnStorageClasses: "", handled: make(chan string, 5), } @@ -485,7 +577,7 @@ func (s *StandaloneSuite) TestPutWithFail(c *C) { expectPath: hash, expectAPIToken: "abc123", expectBody: "foo", - expectStorageClass: "", + expectStorageClass: "default", returnStorageClasses: "", handled: make(chan string, 4), } @@ -547,7 +639,7 @@ func (s *StandaloneSuite) TestPutWithTooManyFail(c *C) { expectPath: hash, expectAPIToken: "abc123", expectBody: "foo", - expectStorageClass: "", + expectStorageClass: "default", returnStorageClasses: "", handled: make(chan string, 1), } @@ -1157,7 +1249,7 @@ func (s *StandaloneSuite) TestPutBWant2ReplicasWithOnlyOneWritableLocalRoot(c *C expectPath: hash, expectAPIToken: "abc123", expectBody: "foo", - expectStorageClass: "", + expectStorageClass: "default", returnStorageClasses: "", handled: make(chan string, 5), } @@ -1376,7 +1468,7 @@ func (s *StandaloneSuite) TestPutBRetry(c *C) { expectPath: Md5String("foo"), expectAPIToken: "abc123", expectBody: "foo", - expectStorageClass: "", + expectStorageClass: "default", returnStorageClasses: "", handled: make(chan string, 5), }, diff --git a/sdk/go/keepclient/support.go b/sdk/go/keepclient/support.go index 633ec18968..8d299815b2 100644 --- a/sdk/go/keepclient/support.go +++ b/sdk/go/keepclient/support.go @@ -164,7 +164,11 @@ func (kc *KeepClient) BlockWrite(ctx context.Context, req arvados.BlockWriteOpti req.Hash = fmt.Sprintf("%x", m.Sum(nil)) } if req.StorageClasses == nil { - req.StorageClasses = kc.StorageClasses + if len(kc.StorageClasses) > 0 { + req.StorageClasses = kc.StorageClasses + } else { + req.StorageClasses = kc.DefaultStorageClasses + } } if req.Replicas == 0 { req.Replicas = kc.Want_replicas diff --git a/sdk/python/arvados/api.py b/sdk/python/arvados/api.py index 4fe3999f2c..86d24dfc06 100644 --- a/sdk/python/arvados/api.py +++ b/sdk/python/arvados/api.py @@ -157,7 +157,7 @@ def http_cache(data_type): return cache.SafeHTTPCache(path, max_age=60*60*24*2) def api(version=None, cache=True, host=None, token=None, insecure=False, - request_id=None, timeout=10, **kwargs): + request_id=None, timeout=5*60, **kwargs): """Return an apiclient Resources object for an Arvados instance. :version: @@ -211,7 +211,8 @@ def api(version=None, cache=True, host=None, token=None, insecure=False, pass elif not host and not token: return api_from_config( - version=version, cache=cache, request_id=request_id, **kwargs) + version=version, cache=cache, timeout=timeout, + request_id=request_id, **kwargs) else: # Caller provided one but not the other if not host: diff --git a/sdk/python/tests/test_api.py b/sdk/python/tests/test_api.py index 60183e06a3..0c4677e8a2 100644 --- a/sdk/python/tests/test_api.py +++ b/sdk/python/tests/test_api.py @@ -101,11 +101,15 @@ class ArvadosApiTest(run_test_server.TestCaseWithServers): text = "X" * maxsize arvados.api('v1').collections().create(body={"manifest_text": text}).execute() - # Checks for bug #17171 def test_default_request_timeout(self): api = arvados.api('v1') - self.assertEqual(api._http.timeout, 10, - "Default timeout value should be 10") + self.assertEqual(api._http.timeout, 300, + "Default timeout value should be 300") + + def test_custom_request_timeout(self): + api = arvados.api('v1', timeout=1234) + self.assertEqual(api._http.timeout, 1234, + "Requested timeout value was 1234") def test_ordered_json_model(self): mock_responses = { diff --git a/services/api/app/controllers/arvados/v1/users_controller.rb b/services/api/app/controllers/arvados/v1/users_controller.rb index f4d42edf6c..54db521768 100644 --- a/services/api/app/controllers/arvados/v1/users_controller.rb +++ b/services/api/app/controllers/arvados/v1/users_controller.rb @@ -10,7 +10,7 @@ class Arvados::V1::UsersController < ApplicationController [:activate, :current, :system, :setup, :merge, :batch_update] skip_before_action :render_404_if_no_object, only: [:activate, :current, :system, :setup, :merge, :batch_update] - before_action :admin_required, only: [:setup, :unsetup, :update_uuid, :batch_update] + before_action :admin_required, only: [:setup, :unsetup, :batch_update] # Internal API used by controller to update local cache of user # records from LoginCluster. @@ -29,7 +29,23 @@ class Arvados::V1::UsersController < ApplicationController end end if needupdate.length > 0 - u.update_attributes!(needupdate) + begin + u.update_attributes!(needupdate) + rescue ActiveRecord::RecordInvalid + loginCluster = Rails.configuration.Login.LoginCluster + if u.uuid[0..4] == loginCluster && !needupdate[:username].nil? + local_user = User.find_by_username(needupdate[:username]) + # A cached user record from the LoginCluster is stale, reset its username + # and retry the update operation. + if local_user.andand.uuid[0..4] == loginCluster && local_user.uuid != u.uuid + new_username = "#{needupdate[:username]}conflict#{rand(99999999)}" + Rails.logger.warn("cached username '#{needupdate[:username]}' collision with user '#{local_user.uuid}' - renaming to '#{new_username}' before retrying") + local_user.update_attributes!({username: new_username}) + retry + end + end + raise # Not the issue we're handling above + end end @objects << u end @@ -145,13 +161,6 @@ class Arvados::V1::UsersController < ApplicationController show end - # Change UUID to a new (unused) uuid and transfer all owned/linked - # objects accordingly. - def update_uuid - @object.update_uuid(new_uuid: params[:new_uuid]) - show - end - def merge if (params[:old_user_uuid] || params[:new_user_uuid]) if !current_user.andand.is_admin @@ -261,14 +270,6 @@ class Arvados::V1::UsersController < ApplicationController }) end - def self._update_uuid_requires_parameters - { - new_uuid: { - type: 'string', required: true, - }, - } - end - def apply_filters(model_class=nil) return super if @read_users.any?(&:is_admin) if params[:uuid] != current_user.andand.uuid diff --git a/services/api/app/models/user.rb b/services/api/app/models/user.rb index da7e7b310d..2e862d3ae6 100644 --- a/services/api/app/models/user.rb +++ b/services/api/app/models/user.rb @@ -362,37 +362,6 @@ SELECT target_uuid, perm_level end end - def update_uuid(new_uuid:) - if !current_user.andand.is_admin - raise PermissionDeniedError - end - if uuid == system_user_uuid || uuid == anonymous_user_uuid - raise "update_uuid cannot update system accounts" - end - if self.class != self.class.resource_class_for_uuid(new_uuid) - raise "invalid new_uuid #{new_uuid.inspect}" - end - transaction(requires_new: true) do - reload - old_uuid = self.uuid - self.uuid = new_uuid - save!(validate: false) - change_all_uuid_refs(old_uuid: old_uuid, new_uuid: new_uuid) - ActiveRecord::Base.connection.exec_update %{ -update #{PERMISSION_VIEW} set user_uuid=$1 where user_uuid = $2 -}, - 'User.update_uuid.update_permissions_user_uuid', - [[nil, new_uuid], - [nil, old_uuid]] - ActiveRecord::Base.connection.exec_update %{ -update #{PERMISSION_VIEW} set target_uuid=$1 where target_uuid = $2 -}, - 'User.update_uuid.update_permissions_target_uuid', - [[nil, new_uuid], - [nil, old_uuid]] - end - end - # Move this user's (i.e., self's) owned items to new_owner_uuid and # new_user_uuid (for things normally owned directly by the user). # diff --git a/services/api/config/routes.rb b/services/api/config/routes.rb index 6975858035..738426b1d8 100644 --- a/services/api/config/routes.rb +++ b/services/api/config/routes.rb @@ -81,7 +81,6 @@ Rails.application.routes.draw do post 'activate', on: :member post 'setup', on: :collection post 'unsetup', on: :member - post 'update_uuid', on: :member post 'merge', on: :collection patch 'batch_update', on: :collection end diff --git a/services/api/fpm-info.sh b/services/api/fpm-info.sh index b8ba801aca..570f4601c5 100644 --- a/services/api/fpm-info.sh +++ b/services/api/fpm-info.sh @@ -8,6 +8,10 @@ case "$TARGET" in centos*) fpm_depends+=(libcurl-devel postgresql-devel bison make automake gcc gcc-c++ postgresql shared-mime-info) ;; + ubuntu1804) + fpm_depends+=(libcurl-ssl-dev libpq-dev g++ bison zlib1g-dev make postgresql-client shared-mime-info) + fpm_conflicts+=(ruby-bundler) + ;; debian* | ubuntu*) fpm_depends+=(libcurl-ssl-dev libpq-dev g++ bison zlib1g-dev make postgresql-client shared-mime-info) ;; diff --git a/services/api/test/functional/arvados/v1/users_controller_test.rb b/services/api/test/functional/arvados/v1/users_controller_test.rb index e0f7b8970d..c807a7d6cb 100644 --- a/services/api/test/functional/arvados/v1/users_controller_test.rb +++ b/services/api/test/functional/arvados/v1/users_controller_test.rb @@ -800,27 +800,6 @@ The Arvados team. "user's writable_by should include its owner_uuid") end - [ - [:admin, true], - [:active, false], - ].each do |auth_user, expect_success| - test "update_uuid as #{auth_user}" do - authorize_with auth_user - orig_uuid = users(:active).uuid - post :update_uuid, params: { - id: orig_uuid, - new_uuid: 'zbbbb-tpzed-abcde12345abcde', - } - if expect_success - assert_response :success - assert_empty User.where(uuid: orig_uuid) - else - assert_response 403 - assert_not_empty User.where(uuid: orig_uuid) - end - end - end - test "merge with redirect_to_user_uuid=false" do authorize_with :project_viewer_trustedclient tok = api_client_authorizations(:project_viewer).api_token diff --git a/services/api/test/unit/owner_test.rb b/services/api/test/unit/owner_test.rb index e356f4d9fa..aa0ac5f361 100644 --- a/services/api/test/unit/owner_test.rb +++ b/services/api/test/unit/owner_test.rb @@ -92,12 +92,8 @@ class OwnerTest < ActiveSupport::TestCase "new #{o_class} should really be in DB") old_uuid = o.uuid new_uuid = o.uuid.sub(/..........$/, rand(2**256).to_s(36)[0..9]) - if o.respond_to? :update_uuid - o.update_uuid(new_uuid: new_uuid) - else - assert(o.update_attributes(uuid: new_uuid), - "should change #{o_class} uuid from #{old_uuid} to #{new_uuid}") - end + assert(o.update_attributes(uuid: new_uuid), + "should change #{o_class} uuid from #{old_uuid} to #{new_uuid}") assert_equal(false, o_class.where(uuid: old_uuid).any?, "#{old_uuid} should disappear when renamed to #{new_uuid}") end @@ -142,21 +138,4 @@ class OwnerTest < ActiveSupport::TestCase check_permissions_against_full_refresh end - test "change uuid of User that owns self" do - o = User.create! - assert User.where(uuid: o.uuid).any?, "new User should really be in DB" - assert_equal(true, o.update_attributes(owner_uuid: o.uuid), - "setting owner to self should work") - old_uuid = o.uuid - new_uuid = o.uuid.sub(/..........$/, rand(2**256).to_s(36)[0..9]) - o.update_uuid(new_uuid: new_uuid) - o = User.find_by_uuid(new_uuid) - assert_equal(false, User.where(uuid: old_uuid).any?, - "#{old_uuid} should not be in DB after deleting") - assert_equal(true, User.where(uuid: new_uuid).any?, - "#{new_uuid} should be in DB after renaming") - assert_equal(new_uuid, User.where(uuid: new_uuid).first.owner_uuid, - "#{new_uuid} should be its own owner in DB after renaming") - end - end diff --git a/services/api/test/unit/user_test.rb b/services/api/test/unit/user_test.rb index f973c6ba1f..c00164c0a3 100644 --- a/services/api/test/unit/user_test.rb +++ b/services/api/test/unit/user_test.rb @@ -686,72 +686,6 @@ class UserTest < ActiveSupport::TestCase end end - [ - [:active, 'zzzzz-borkd-abcde12345abcde'], - [:active, 'zzzzz-j7d0g-abcde12345abcde'], - [:active, 'zzzzz-tpzed-borkd'], - [:system_user, 'zzzzz-tpzed-abcde12345abcde'], - [:anonymous, 'zzzzz-tpzed-abcde12345abcde'], - ].each do |fixture, new_uuid| - test "disallow update_uuid #{fixture} -> #{new_uuid}" do - u = users(fixture) - orig_uuid = u.uuid - act_as_system_user do - assert_raises do - u.update_uuid(new_uuid: new_uuid) - end - end - # "Successfully aborted orig->new" outcome looks the same as - # "successfully updated new->orig". - assert_update_success(old_uuid: new_uuid, - new_uuid: orig_uuid, - expect_owned_objects: fixture == :active) - end - end - - [:active, :spectator, :admin].each do |target| - test "update_uuid on #{target} as non-admin user" do - act_as_user users(:active) do - assert_raises(ArvadosModel::PermissionDeniedError) do - users(target).update_uuid(new_uuid: 'zzzzz-tpzed-abcde12345abcde') - end - end - end - end - - test "update_uuid to existing uuid" do - u = users(:active) - orig_uuid = u.uuid - new_uuid = users(:admin).uuid - act_as_system_user do - assert_raises do - u.update_uuid(new_uuid: new_uuid) - end - end - u.reload - assert_equal u.uuid, orig_uuid - assert_not_empty Collection.where(owner_uuid: orig_uuid) - assert_not_empty Group.where(owner_uuid: orig_uuid) - end - - [ - [:active, 'zbbbb-tpzed-abcde12345abcde'], - [:active, 'zzzzz-tpzed-abcde12345abcde'], - [:admin, 'zbbbb-tpzed-abcde12345abcde'], - [:admin, 'zzzzz-tpzed-abcde12345abcde'], - ].each do |fixture, new_uuid| - test "update_uuid #{fixture} to unused uuid #{new_uuid}" do - u = users(fixture) - orig_uuid = u.uuid - act_as_system_user do - u.update_uuid(new_uuid: new_uuid) - end - assert_update_success(old_uuid: orig_uuid, - new_uuid: new_uuid, - expect_owned_objects: fixture == :active) - end - end - def assert_update_success(old_uuid:, new_uuid:, expect_owned_objects: true) [[User, :uuid], [Link, :head_uuid], diff --git a/services/fuse/arvados_fuse/fusedir.py b/services/fuse/arvados_fuse/fusedir.py index 2b963d9a68..d5a018ae88 100644 --- a/services/fuse/arvados_fuse/fusedir.py +++ b/services/fuse/arvados_fuse/fusedir.py @@ -2,11 +2,6 @@ # # SPDX-License-Identifier: AGPL-3.0 -from __future__ import absolute_import -from __future__ import division -from future.utils import viewitems -from future.utils import itervalues -from builtins import dict import apiclient import arvados import errno @@ -196,7 +191,7 @@ class Directory(FreshBase): def in_use(self): if super(Directory, self).in_use(): return True - for v in itervalues(self._entries): + for v in self._entries.values(): if v.in_use(): return True return False @@ -204,7 +199,7 @@ class Directory(FreshBase): def has_ref(self, only_children): if super(Directory, self).has_ref(only_children): return True - for v in itervalues(self._entries): + for v in self._entries.values(): if v.has_ref(False): return True return False @@ -226,7 +221,7 @@ class Directory(FreshBase): # Find self on the parent in order to invalidate this path. # Calling the public items() method might trigger a refresh, # which we definitely don't want, so read the internal dict directly. - for k,v in viewitems(parent._entries): + for k,v in parent._entries.items(): if v is self: self.inodes.invalidate_entry(parent, k) break @@ -347,9 +342,10 @@ class CollectionDirectoryBase(Directory): def populate(self, mtime): self._mtime = mtime - self.collection.subscribe(self.on_event) - for entry, item in viewitems(self.collection): - self.new_entry(entry, item, self.mtime()) + with self.collection.lock: + self.collection.subscribe(self.on_event) + for entry, item in self.collection.items(): + self.new_entry(entry, item, self.mtime()) def writable(self): return self.collection.writable() @@ -496,6 +492,7 @@ class CollectionDirectory(CollectionDirectoryBase): return _logger.debug("Updating collection %s inode %s to record version %s", self.collection_locator, self.inode, to_record_version) + new_collection_record = None if self.collection is not None: if self.collection.known_past_version(to_record_version): _logger.debug("%s already processed %s", self.collection_locator, to_record_version) @@ -522,12 +519,13 @@ class CollectionDirectory(CollectionDirectoryBase): if 'storage_classes_desired' not in new_collection_record: new_collection_record['storage_classes_desired'] = coll_reader.storage_classes_desired() - if self.collection_record is None or self.collection_record["portable_data_hash"] != new_collection_record.get("portable_data_hash"): - self.new_collection(new_collection_record, coll_reader) - - self._manifest_size = len(coll_reader.manifest_text()) - _logger.debug("%s manifest_size %i", self, self._manifest_size) # end with llfuse.lock_released, re-acquire lock + if (new_collection_record is not None and + (self.collection_record is None or + self.collection_record["portable_data_hash"] != new_collection_record.get("portable_data_hash"))): + self.new_collection(new_collection_record, coll_reader) + self._manifest_size = len(coll_reader.manifest_text()) + _logger.debug("%s manifest_size %i", self, self._manifest_size) self.fresh() return True @@ -1230,7 +1228,7 @@ class SharedDirectory(Directory): # end with llfuse.lock_released, re-acquire lock - self.merge(viewitems(contents), + self.merge(contents.items(), lambda i: i[0], lambda a, i: a.uuid() == i[1]['uuid'], lambda i: ProjectDirectory(self.inode, self.inodes, self.api, self.num_retries, i[1], poll=self._poll, poll_time=self._poll_time, storage_classes=self.storage_classes)) diff --git a/services/fuse/arvados_fuse/unmount.py b/services/fuse/arvados_fuse/unmount.py index dbfea1f904..12d047a8f3 100644 --- a/services/fuse/arvados_fuse/unmount.py +++ b/services/fuse/arvados_fuse/unmount.py @@ -159,7 +159,7 @@ def unmount(path, subtype=None, timeout=10, recursive=False): if attempted: # Report buffered stderr from previous call to fusermount, # now that we know it didn't succeed. - sys.stderr.write(fusermount_output) + sys.stderr.buffer.write(fusermount_output) delay = 1 if deadline: diff --git a/services/fuse/tests/test_exec.py b/services/fuse/tests/test_exec.py index c90e7fd8df..6af60302bc 100644 --- a/services/fuse/tests/test_exec.py +++ b/services/fuse/tests/test_exec.py @@ -21,6 +21,7 @@ except: def try_exec(mnt, cmd): try: + os.environ['KEEP_LOCAL_STORE'] = tempfile.mkdtemp() arvados_fuse.command.Mount( arvados_fuse.command.ArgumentParser().parse_args([ '--read-write', diff --git a/services/fuse/tests/test_mount.py b/services/fuse/tests/test_mount.py index 82e5c441eb..157f55e4a4 100644 --- a/services/fuse/tests/test_mount.py +++ b/services/fuse/tests/test_mount.py @@ -15,6 +15,7 @@ import os import subprocess import time import unittest +import tempfile import arvados import arvados_fuse as fuse @@ -788,10 +789,15 @@ class FuseDeleteProjectEventTest(MountTestBase): attempt(self.assertEqual, [], llfuse.listdir(os.path.join(self.mounttmp, "aproject"))) -def fuseFileConflictTestHelper(mounttmp): +def fuseFileConflictTestHelper(mounttmp, uuid, keeptmp, settings): class Test(unittest.TestCase): def runTest(self): + os.environ['KEEP_LOCAL_STORE'] = keeptmp + with open(os.path.join(mounttmp, "file1.txt"), "w") as f: + with arvados.collection.Collection(uuid, api_client=arvados.api_from_config('v1', apiconfig=settings)) as collection2: + with collection2.open("file1.txt", "w") as f2: + f2.write("foo") f.write("bar") d1 = sorted(llfuse.listdir(os.path.join(mounttmp))) @@ -820,12 +826,8 @@ class FuseFileConflictTest(MountTestBase): d1 = llfuse.listdir(os.path.join(self.mounttmp)) self.assertEqual([], sorted(d1)) - with arvados.collection.Collection(collection.manifest_locator(), api_client=self.api) as collection2: - with collection2.open("file1.txt", "w") as f: - f.write("foo") - # See note in MountTestBase.setUp - self.pool.apply(fuseFileConflictTestHelper, (self.mounttmp,)) + self.pool.apply(fuseFileConflictTestHelper, (self.mounttmp, collection.manifest_locator(), self.keeptmp, arvados.config.settings())) def fuseUnlinkOpenFileTest(mounttmp): diff --git a/services/keepstore/volume.go b/services/keepstore/volume.go index 3f7c9cb79b..cf0b7a3902 100644 --- a/services/keepstore/volume.go +++ b/services/keepstore/volume.go @@ -371,6 +371,9 @@ func makeRRVolumeManager(logger logrus.FieldLogger, cluster *arvados.Cluster, my sort.Slice(vm.writables, func(i, j int) bool { return less(vm.writables[i], vm.writables[j]) }) + sort.Slice(vm.mounts, func(i, j int) bool { + return less(vm.mounts[i], vm.mounts[j]) + }) return vm, nil } diff --git a/tools/arvbox/bin/arvbox b/tools/arvbox/bin/arvbox index fd464974fb..516ea35341 100755 --- a/tools/arvbox/bin/arvbox +++ b/tools/arvbox/bin/arvbox @@ -60,6 +60,9 @@ if test -z "$WORKBENCH2_BRANCH" ; then WORKBENCH2_BRANCH=main fi +# Update this to the docker tag for the version on releases. +DEFAULT_TAG= + PG_DATA="$ARVBOX_DATA/postgres" VAR_DATA="$ARVBOX_DATA/var" PASSENGER="$ARVBOX_DATA/passenger" @@ -195,6 +198,10 @@ run() { fi fi + if test -z "$TAG" -a -n "$DEFAULT_TAG"; then + TAG=":$DEFAULT_TAG" + fi + if [[ "$CONFIG" =~ ^public ]] ; then if test -n "$ARVBOX_PUBLISH_IP" ; then localip=$ARVBOX_PUBLISH_IP diff --git a/tools/compute-images/scripts/base.sh b/tools/compute-images/scripts/base.sh index af01cde38e..b7d0d0f363 100644 --- a/tools/compute-images/scripts/base.sh +++ b/tools/compute-images/scripts/base.sh @@ -58,7 +58,8 @@ wait_for_apt_locks && $SUDO DEBIAN_FRONTEND=noninteractive apt-get -qq --yes ins libcurl4-openssl-dev \ lvm2 \ cryptsetup \ - xfsprogs + xfsprogs \ + squashfs-tools # Install the Arvados packages we need wait_for_apt_locks && $SUDO DEBIAN_FRONTEND=noninteractive apt-get -qq --yes install \ @@ -67,6 +68,30 @@ wait_for_apt_locks && $SUDO DEBIAN_FRONTEND=noninteractive apt-get -qq --yes ins arvados-docker-cleaner \ docker.io +# Get Go and build singularity +goversion=1.16.3 +mkdir -p /var/lib/arvados +rm -rf /var/lib/arvados/go/ +curl -s https://storage.googleapis.com/golang/go${goversion}.linux-amd64.tar.gz | tar -C /var/lib/arvados -xzf - +ln -sf /var/lib/arvados/go/bin/* /usr/local/bin/ + +singularityversion=3.7.4 +curl -Ls https://github.com/sylabs/singularity/archive/refs/tags/v${singularityversion}.tar.gz | tar -C /var/lib/arvados -xzf - +cd /var/lib/arvados/singularity-${singularityversion} + +# build dependencies for singularity +wait_for_apt_locks && $SUDO DEBIAN_FRONTEND=noninteractive apt-get -qq --yes install \ + make build-essential libssl-dev uuid-dev cryptsetup + +echo $singularityversion > VERSION +./mconfig --prefix=/var/lib/arvados +make -C ./builddir +make -C ./builddir install +ln -sf /var/lib/arvados/bin/* /usr/local/bin/ + +# Print singularity version installed +singularity --version + # Remove unattended-upgrades if it is installed wait_for_apt_locks && $SUDO DEBIAN_FRONTEND=noninteractive apt-get -qq --yes remove unattended-upgrades --purge diff --git a/tools/test-collection-create/test-collection-create.py b/tools/test-collection-create/test-collection-create.py index 9a02745694..c8eae240d2 100644 --- a/tools/test-collection-create/test-collection-create.py +++ b/tools/test-collection-create/test-collection-create.py @@ -16,6 +16,8 @@ import arvados.collection logger = logging.getLogger('arvados.test_collection_create') logger.setLevel(logging.INFO) +max_manifest_size = 127*1024*1024 + opts = argparse.ArgumentParser(add_help=False) opts.add_argument('--min-files', type=int, default=30000, help=""" Minimum number of files on each directory. Default: 30000. @@ -381,7 +383,7 @@ def create_substreams(depth, base_stream_name, max_filesize, data_loc, args, cur current_size += len(current_stream) streams = [current_stream] - if current_size >= (128 * 1024 * 1024): + if current_size >= max_manifest_size: logger.debug("Maximum manifest size reached -- finishing early at {}".format(base_stream_name)) elif depth == 0: logger.debug("Finished stream {}".format(base_stream_name)) @@ -391,7 +393,7 @@ def create_substreams(depth, base_stream_name, max_filesize, data_loc, args, cur substreams = create_substreams(depth-1, stream_name, max_filesize, data_loc, args, current_size) current_size += sum([len(x) for x in substreams]) - if current_size >= (128 * 1024 * 1024): + if current_size >= max_manifest_size: break streams.extend(substreams) return streams @@ -421,7 +423,7 @@ def main(arguments=None): '.', max_filesize, data_loc, args) manifest = '' for s in streams: - if len(manifest)+len(s) > (1024*1024*128)-2: + if len(manifest)+len(s) > max_manifest_size: logger.info("Skipping stream {} to avoid making a manifest bigger than 128MiB".format(s.split(' ')[0])) break manifest += s + '\n'