[ARVADOS] updated: 1.1.3-153-g32b8eda
Git user
git at public.curoverse.com
Tue Mar 13 10:31:39 EDT 2018
Summary of changes:
sdk/R/NAMESPACE | 1 +
sdk/R/R/Arvados.R | 326 +++++++++++++-------------
sdk/R/R/RESTService.R | 32 ---
sdk/R/R/autoGenAPI.R | 6 +-
sdk/R/R/util.R | 37 ++-
sdk/R/man/api_client_authorizations.create.Rd | 2 +-
sdk/R/man/api_client_authorizations.update.Rd | 2 +-
sdk/R/man/api_clients.create.Rd | 2 +-
sdk/R/man/api_clients.update.Rd | 2 +-
sdk/R/man/authorized_keys.create.Rd | 2 +-
sdk/R/man/authorized_keys.update.Rd | 2 +-
sdk/R/man/container_requests.create.Rd | 2 +-
sdk/R/man/container_requests.update.Rd | 2 +-
sdk/R/man/job_tasks.create.Rd | 3 +-
sdk/R/man/job_tasks.update.Rd | 3 +-
sdk/R/man/keep_disks.create.Rd | 2 +-
sdk/R/man/keep_disks.update.Rd | 2 +-
sdk/R/man/keep_services.create.Rd | 2 +-
sdk/R/man/keep_services.update.Rd | 2 +-
sdk/R/man/listAll.Rd | 22 ++
sdk/R/man/pipeline_instances.create.Rd | 2 +-
sdk/R/man/pipeline_instances.update.Rd | 2 +-
sdk/R/man/pipeline_templates.create.Rd | 2 +-
sdk/R/man/pipeline_templates.update.Rd | 2 +-
sdk/R/man/user_agreements.create.Rd | 2 +-
sdk/R/man/user_agreements.update.Rd | 2 +-
sdk/R/man/virtual_machines.create.Rd | 2 +-
sdk/R/man/virtual_machines.update.Rd | 2 +-
sdk/R/tests/testthat/test-RESTService.R | 28 ---
sdk/R/tests/testthat/test-util.R | 24 ++
30 files changed, 271 insertions(+), 251 deletions(-)
create mode 100644 sdk/R/man/listAll.Rd
via 32b8eda74f24d1df963a18da5f8023b15d209ca9 (commit)
from f00ce9a30d252386634c79bc0a40da2e7da00de2 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 32b8eda74f24d1df963a18da5f8023b15d209ca9
Author: Fuad Muhic <fmuhic at capeannenterprises.com>
Date: Tue Mar 13 15:28:47 2018 +0100
Added listAll utility function which will always fetch all resources.
Arvados-DCO-1.1-Signed-off-by: Fuad Muhic <fmuhic at capeannenterprises.com>
diff --git a/sdk/R/NAMESPACE b/sdk/R/NAMESPACE
index de906aa..1cc6768 100644
--- a/sdk/R/NAMESPACE
+++ b/sdk/R/NAMESPACE
@@ -8,3 +8,4 @@ export(ArvadosFile)
export(Collection)
export(Subcollection)
export(generateAPI)
+export(listAll)
diff --git a/sdk/R/R/Arvados.R b/sdk/R/R/Arvados.R
index b2b40ef..c629a70 100644
--- a/sdk/R/R/Arvados.R
+++ b/sdk/R/R/Arvados.R
@@ -2464,8 +2464,8 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(filters = filters, where = where,
- order = order, select = select, distinct = distinct,
- limit = limit, offset = offset, count = count)
+ order = order, select = select, distinct = distinct,
+ limit = limit, offset = offset, count = count)
body <- NULL
@@ -2489,7 +2489,7 @@ Arvados <- R6::R6Class(
if(length(user) > 0)
body <- jsonlite::toJSON(list(user = user),
- auto_unbox = TRUE)
+ auto_unbox = TRUE)
else
body <- NULL
@@ -2513,7 +2513,7 @@ Arvados <- R6::R6Class(
if(length(user) > 0)
body <- jsonlite::toJSON(list(user = user),
- auto_unbox = TRUE)
+ auto_unbox = TRUE)
else
body <- NULL
@@ -2615,8 +2615,8 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(user = user, openid_prefix = openid_prefix,
- repo_name = repo_name, vm_uuid = vm_uuid,
- send_notification_email = send_notification_email)
+ repo_name = repo_name, vm_uuid = vm_uuid,
+ send_notification_email = send_notification_email)
body <- NULL
@@ -2679,8 +2679,8 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(filters = filters, where = where,
- order = order, select = select, distinct = distinct,
- limit = limit, offset = offset, count = count)
+ order = order, select = select, distinct = distinct,
+ limit = limit, offset = offset, count = count)
body <- NULL
@@ -2764,8 +2764,8 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(filters = filters, where = where,
- order = order, select = select, distinct = distinct,
- limit = limit, offset = offset, count = count)
+ order = order, select = select, distinct = distinct,
+ limit = limit, offset = offset, count = count)
body <- NULL
@@ -2790,7 +2790,7 @@ Arvados <- R6::R6Class(
if(length(apiclientauthorization) > 0)
body <- jsonlite::toJSON(list(apiclientauthorization = apiclientauthorization),
- auto_unbox = TRUE)
+ auto_unbox = TRUE)
else
body <- NULL
@@ -2814,7 +2814,7 @@ Arvados <- R6::R6Class(
if(length(apiclientauthorization) > 0)
body <- jsonlite::toJSON(list(apiclientauthorization = apiclientauthorization),
- auto_unbox = TRUE)
+ auto_unbox = TRUE)
else
body <- NULL
@@ -2855,7 +2855,7 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(api_client_id = api_client_id,
- scopes = scopes)
+ scopes = scopes)
body <- NULL
@@ -2899,8 +2899,8 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(filters = filters, where = where,
- order = order, select = select, distinct = distinct,
- limit = limit, offset = offset, count = count)
+ order = order, select = select, distinct = distinct,
+ limit = limit, offset = offset, count = count)
body <- NULL
@@ -2984,8 +2984,8 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(filters = filters, where = where,
- order = order, select = select, distinct = distinct,
- limit = limit, offset = offset, count = count)
+ order = order, select = select, distinct = distinct,
+ limit = limit, offset = offset, count = count)
body <- NULL
@@ -3009,7 +3009,7 @@ Arvados <- R6::R6Class(
if(length(apiclient) > 0)
body <- jsonlite::toJSON(list(apiclient = apiclient),
- auto_unbox = TRUE)
+ auto_unbox = TRUE)
else
body <- NULL
@@ -3033,7 +3033,7 @@ Arvados <- R6::R6Class(
if(length(apiclient) > 0)
body <- jsonlite::toJSON(list(apiclient = apiclient),
- auto_unbox = TRUE)
+ auto_unbox = TRUE)
else
body <- NULL
@@ -3077,8 +3077,8 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(filters = filters, where = where,
- order = order, select = select, distinct = distinct,
- limit = limit, offset = offset, count = count)
+ order = order, select = select, distinct = distinct,
+ limit = limit, offset = offset, count = count)
body <- NULL
@@ -3162,8 +3162,8 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(filters = filters, where = where,
- order = order, select = select, distinct = distinct,
- limit = limit, offset = offset, count = count)
+ order = order, select = select, distinct = distinct,
+ limit = limit, offset = offset, count = count)
body <- NULL
@@ -3188,7 +3188,7 @@ Arvados <- R6::R6Class(
if(length(containerrequest) > 0)
body <- jsonlite::toJSON(list(containerrequest = containerrequest),
- auto_unbox = TRUE)
+ auto_unbox = TRUE)
else
body <- NULL
@@ -3212,7 +3212,7 @@ Arvados <- R6::R6Class(
if(length(containerrequest) > 0)
body <- jsonlite::toJSON(list(containerrequest = containerrequest),
- auto_unbox = TRUE)
+ auto_unbox = TRUE)
else
body <- NULL
@@ -3256,8 +3256,8 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(filters = filters, where = where,
- order = order, select = select, distinct = distinct,
- limit = limit, offset = offset, count = count)
+ order = order, select = select, distinct = distinct,
+ limit = limit, offset = offset, count = count)
body <- NULL
@@ -3341,8 +3341,8 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(filters = filters, where = where,
- order = order, select = select, distinct = distinct,
- limit = limit, offset = offset, count = count)
+ order = order, select = select, distinct = distinct,
+ limit = limit, offset = offset, count = count)
body <- NULL
@@ -3367,7 +3367,7 @@ Arvados <- R6::R6Class(
if(length(authorizedkey) > 0)
body <- jsonlite::toJSON(list(authorizedkey = authorizedkey),
- auto_unbox = TRUE)
+ auto_unbox = TRUE)
else
body <- NULL
@@ -3391,7 +3391,7 @@ Arvados <- R6::R6Class(
if(length(authorizedkey) > 0)
body <- jsonlite::toJSON(list(authorizedkey = authorizedkey),
- auto_unbox = TRUE)
+ auto_unbox = TRUE)
else
body <- NULL
@@ -3435,8 +3435,8 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(filters = filters, where = where,
- order = order, select = select, distinct = distinct,
- limit = limit, offset = offset, count = count)
+ order = order, select = select, distinct = distinct,
+ limit = limit, offset = offset, count = count)
body <- NULL
@@ -3520,9 +3520,9 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(filters = filters, where = where,
- order = order, select = select, distinct = distinct,
- limit = limit, offset = offset, count = count,
- include_trash = include_trash)
+ order = order, select = select, distinct = distinct,
+ limit = limit, offset = offset, count = count,
+ include_trash = include_trash)
body <- NULL
@@ -3546,7 +3546,7 @@ Arvados <- R6::R6Class(
if(length(collection) > 0)
body <- jsonlite::toJSON(list(collection = collection),
- auto_unbox = TRUE)
+ auto_unbox = TRUE)
else
body <- NULL
@@ -3570,7 +3570,7 @@ Arvados <- R6::R6Class(
if(length(collection) > 0)
body <- jsonlite::toJSON(list(collection = collection),
- auto_unbox = TRUE)
+ auto_unbox = TRUE)
else
body <- NULL
@@ -3694,9 +3694,9 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(filters = filters, where = where,
- order = order, select = select, distinct = distinct,
- limit = limit, offset = offset, count = count,
- include_trash = include_trash)
+ order = order, select = select, distinct = distinct,
+ limit = limit, offset = offset, count = count,
+ include_trash = include_trash)
body <- NULL
@@ -3780,8 +3780,8 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(filters = filters, where = where,
- order = order, select = select, distinct = distinct,
- limit = limit, offset = offset, count = count)
+ order = order, select = select, distinct = distinct,
+ limit = limit, offset = offset, count = count)
body <- NULL
@@ -3805,7 +3805,7 @@ Arvados <- R6::R6Class(
if(length(container) > 0)
body <- jsonlite::toJSON(list(container = container),
- auto_unbox = TRUE)
+ auto_unbox = TRUE)
else
body <- NULL
@@ -3829,7 +3829,7 @@ Arvados <- R6::R6Class(
if(length(container) > 0)
body <- jsonlite::toJSON(list(container = container),
- auto_unbox = TRUE)
+ auto_unbox = TRUE)
else
body <- NULL
@@ -3953,8 +3953,8 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(filters = filters, where = where,
- order = order, select = select, distinct = distinct,
- limit = limit, offset = offset, count = count)
+ order = order, select = select, distinct = distinct,
+ limit = limit, offset = offset, count = count)
body <- NULL
@@ -4037,8 +4037,8 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(filters = filters, where = where,
- order = order, select = select, distinct = distinct,
- limit = limit, offset = offset, count = count)
+ order = order, select = select, distinct = distinct,
+ limit = limit, offset = offset, count = count)
body <- NULL
@@ -4062,7 +4062,7 @@ Arvados <- R6::R6Class(
if(length(human) > 0)
body <- jsonlite::toJSON(list(human = human),
- auto_unbox = TRUE)
+ auto_unbox = TRUE)
else
body <- NULL
@@ -4086,7 +4086,7 @@ Arvados <- R6::R6Class(
if(length(human) > 0)
body <- jsonlite::toJSON(list(human = human),
- auto_unbox = TRUE)
+ auto_unbox = TRUE)
else
body <- NULL
@@ -4129,8 +4129,8 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(filters = filters, where = where,
- order = order, select = select, distinct = distinct,
- limit = limit, offset = offset, count = count)
+ order = order, select = select, distinct = distinct,
+ limit = limit, offset = offset, count = count)
body <- NULL
@@ -4214,8 +4214,8 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(filters = filters, where = where,
- order = order, select = select, distinct = distinct,
- limit = limit, offset = offset, count = count)
+ order = order, select = select, distinct = distinct,
+ limit = limit, offset = offset, count = count)
body <- NULL
@@ -4239,7 +4239,7 @@ Arvados <- R6::R6Class(
if(length(jobtask) > 0)
body <- jsonlite::toJSON(list(jobtask = jobtask),
- auto_unbox = TRUE)
+ auto_unbox = TRUE)
else
body <- NULL
@@ -4263,7 +4263,7 @@ Arvados <- R6::R6Class(
if(length(jobtask) > 0)
body <- jsonlite::toJSON(list(jobtask = jobtask),
- auto_unbox = TRUE)
+ auto_unbox = TRUE)
else
body <- NULL
@@ -4307,8 +4307,8 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(filters = filters, where = where,
- order = order, select = select, distinct = distinct,
- limit = limit, offset = offset, count = count)
+ order = order, select = select, distinct = distinct,
+ limit = limit, offset = offset, count = count)
body <- NULL
@@ -4391,8 +4391,8 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(filters = filters, where = where,
- order = order, select = select, distinct = distinct,
- limit = limit, offset = offset, count = count)
+ order = order, select = select, distinct = distinct,
+ limit = limit, offset = offset, count = count)
body <- NULL
@@ -4416,7 +4416,7 @@ Arvados <- R6::R6Class(
if(length(link) > 0)
body <- jsonlite::toJSON(list(link = link),
- auto_unbox = TRUE)
+ auto_unbox = TRUE)
else
body <- NULL
@@ -4440,7 +4440,7 @@ Arvados <- R6::R6Class(
if(length(link) > 0)
body <- jsonlite::toJSON(list(link = link),
- auto_unbox = TRUE)
+ auto_unbox = TRUE)
else
body <- NULL
@@ -4483,8 +4483,8 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(filters = filters, where = where,
- order = order, select = select, distinct = distinct,
- limit = limit, offset = offset, count = count)
+ order = order, select = select, distinct = distinct,
+ limit = limit, offset = offset, count = count)
body <- NULL
@@ -4587,8 +4587,8 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(filters = filters, where = where,
- order = order, select = select, distinct = distinct,
- limit = limit, offset = offset, count = count)
+ order = order, select = select, distinct = distinct,
+ limit = limit, offset = offset, count = count)
body <- NULL
@@ -4611,13 +4611,13 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(ensure_unique_name = ensure_unique_name,
- find_or_create = find_or_create, filters = filters,
- minimum_script_version = minimum_script_version,
- exclude_script_versions = exclude_script_versions)
+ find_or_create = find_or_create, filters = filters,
+ minimum_script_version = minimum_script_version,
+ exclude_script_versions = exclude_script_versions)
if(length(job) > 0)
body <- jsonlite::toJSON(list(job = job),
- auto_unbox = TRUE)
+ auto_unbox = TRUE)
else
body <- NULL
@@ -4641,7 +4641,7 @@ Arvados <- R6::R6Class(
if(length(job) > 0)
body <- jsonlite::toJSON(list(job = job),
- auto_unbox = TRUE)
+ auto_unbox = TRUE)
else
body <- NULL
@@ -4684,8 +4684,8 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(filters = filters, where = where,
- order = order, select = select, distinct = distinct,
- limit = limit, offset = offset, count = count)
+ order = order, select = select, distinct = distinct,
+ limit = limit, offset = offset, count = count)
body <- NULL
@@ -4768,8 +4768,8 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(filters = filters, where = where,
- order = order, select = select, distinct = distinct,
- limit = limit, offset = offset, count = count)
+ order = order, select = select, distinct = distinct,
+ limit = limit, offset = offset, count = count)
body <- NULL
@@ -4853,8 +4853,8 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(filters = filters, where = where,
- order = order, select = select, distinct = distinct,
- limit = limit, offset = offset, count = count)
+ order = order, select = select, distinct = distinct,
+ limit = limit, offset = offset, count = count)
body <- NULL
@@ -4878,7 +4878,7 @@ Arvados <- R6::R6Class(
if(length(keepdisk) > 0)
body <- jsonlite::toJSON(list(keepdisk = keepdisk),
- auto_unbox = TRUE)
+ auto_unbox = TRUE)
else
body <- NULL
@@ -4902,7 +4902,7 @@ Arvados <- R6::R6Class(
if(length(keepdisk) > 0)
body <- jsonlite::toJSON(list(keepdisk = keepdisk),
- auto_unbox = TRUE)
+ auto_unbox = TRUE)
else
body <- NULL
@@ -4945,9 +4945,9 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(uuid = uuid, ping_secret = ping_secret,
- node_uuid = node_uuid, filesystem_uuid = filesystem_uuid,
- service_host = service_host, service_port = service_port,
- service_ssl_flag = service_ssl_flag)
+ node_uuid = node_uuid, filesystem_uuid = filesystem_uuid,
+ service_host = service_host, service_port = service_port,
+ service_ssl_flag = service_ssl_flag)
body <- NULL
@@ -4971,8 +4971,8 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(filters = filters, where = where,
- order = order, select = select, distinct = distinct,
- limit = limit, offset = offset, count = count)
+ order = order, select = select, distinct = distinct,
+ limit = limit, offset = offset, count = count)
body <- NULL
@@ -5056,8 +5056,8 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(filters = filters, where = where,
- order = order, select = select, distinct = distinct,
- limit = limit, offset = offset, count = count)
+ order = order, select = select, distinct = distinct,
+ limit = limit, offset = offset, count = count)
body <- NULL
@@ -5082,7 +5082,7 @@ Arvados <- R6::R6Class(
if(length(keepservice) > 0)
body <- jsonlite::toJSON(list(keepservice = keepservice),
- auto_unbox = TRUE)
+ auto_unbox = TRUE)
else
body <- NULL
@@ -5106,7 +5106,7 @@ Arvados <- R6::R6Class(
if(length(keepservice) > 0)
body <- jsonlite::toJSON(list(keepservice = keepservice),
- auto_unbox = TRUE)
+ auto_unbox = TRUE)
else
body <- NULL
@@ -5170,8 +5170,8 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(filters = filters, where = where,
- order = order, select = select, distinct = distinct,
- limit = limit, offset = offset, count = count)
+ order = order, select = select, distinct = distinct,
+ limit = limit, offset = offset, count = count)
body <- NULL
@@ -5255,8 +5255,8 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(filters = filters, where = where,
- order = order, select = select, distinct = distinct,
- limit = limit, offset = offset, count = count)
+ order = order, select = select, distinct = distinct,
+ limit = limit, offset = offset, count = count)
body <- NULL
@@ -5281,7 +5281,7 @@ Arvados <- R6::R6Class(
if(length(pipelinetemplate) > 0)
body <- jsonlite::toJSON(list(pipelinetemplate = pipelinetemplate),
- auto_unbox = TRUE)
+ auto_unbox = TRUE)
else
body <- NULL
@@ -5305,7 +5305,7 @@ Arvados <- R6::R6Class(
if(length(pipelinetemplate) > 0)
body <- jsonlite::toJSON(list(pipelinetemplate = pipelinetemplate),
- auto_unbox = TRUE)
+ auto_unbox = TRUE)
else
body <- NULL
@@ -5349,8 +5349,8 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(filters = filters, where = where,
- order = order, select = select, distinct = distinct,
- limit = limit, offset = offset, count = count)
+ order = order, select = select, distinct = distinct,
+ limit = limit, offset = offset, count = count)
body <- NULL
@@ -5434,8 +5434,8 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(filters = filters, where = where,
- order = order, select = select, distinct = distinct,
- limit = limit, offset = offset, count = count)
+ order = order, select = select, distinct = distinct,
+ limit = limit, offset = offset, count = count)
body <- NULL
@@ -5460,7 +5460,7 @@ Arvados <- R6::R6Class(
if(length(pipelineinstance) > 0)
body <- jsonlite::toJSON(list(pipelineinstance = pipelineinstance),
- auto_unbox = TRUE)
+ auto_unbox = TRUE)
else
body <- NULL
@@ -5484,7 +5484,7 @@ Arvados <- R6::R6Class(
if(length(pipelineinstance) > 0)
body <- jsonlite::toJSON(list(pipelineinstance = pipelineinstance),
- auto_unbox = TRUE)
+ auto_unbox = TRUE)
else
body <- NULL
@@ -5548,8 +5548,8 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(filters = filters, where = where,
- order = order, select = select, distinct = distinct,
- limit = limit, offset = offset, count = count)
+ order = order, select = select, distinct = distinct,
+ limit = limit, offset = offset, count = count)
body <- NULL
@@ -5632,8 +5632,8 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(filters = filters, where = where,
- order = order, select = select, distinct = distinct,
- limit = limit, offset = offset, count = count)
+ order = order, select = select, distinct = distinct,
+ limit = limit, offset = offset, count = count)
body <- NULL
@@ -5655,11 +5655,11 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(ensure_unique_name = ensure_unique_name,
- assign_slot = assign_slot)
+ assign_slot = assign_slot)
if(length(node) > 0)
body <- jsonlite::toJSON(list(node = node),
- auto_unbox = TRUE)
+ auto_unbox = TRUE)
else
body <- NULL
@@ -5683,7 +5683,7 @@ Arvados <- R6::R6Class(
if(length(node) > 0)
body <- jsonlite::toJSON(list(node = node),
- auto_unbox = TRUE)
+ auto_unbox = TRUE)
else
body <- NULL
@@ -5746,8 +5746,8 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(filters = filters, where = where,
- order = order, select = select, distinct = distinct,
- limit = limit, offset = offset, count = count)
+ order = order, select = select, distinct = distinct,
+ limit = limit, offset = offset, count = count)
body <- NULL
@@ -5831,8 +5831,8 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(filters = filters, where = where,
- order = order, select = select, distinct = distinct,
- limit = limit, offset = offset, count = count)
+ order = order, select = select, distinct = distinct,
+ limit = limit, offset = offset, count = count)
body <- NULL
@@ -5856,7 +5856,7 @@ Arvados <- R6::R6Class(
if(length(repository) > 0)
body <- jsonlite::toJSON(list(repository = repository),
- auto_unbox = TRUE)
+ auto_unbox = TRUE)
else
body <- NULL
@@ -5880,7 +5880,7 @@ Arvados <- R6::R6Class(
if(length(repository) > 0)
body <- jsonlite::toJSON(list(repository = repository),
- auto_unbox = TRUE)
+ auto_unbox = TRUE)
else
body <- NULL
@@ -5944,8 +5944,8 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(filters = filters, where = where,
- order = order, select = select, distinct = distinct,
- limit = limit, offset = offset, count = count)
+ order = order, select = select, distinct = distinct,
+ limit = limit, offset = offset, count = count)
body <- NULL
@@ -6029,8 +6029,8 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(filters = filters, where = where,
- order = order, select = select, distinct = distinct,
- limit = limit, offset = offset, count = count)
+ order = order, select = select, distinct = distinct,
+ limit = limit, offset = offset, count = count)
body <- NULL
@@ -6054,7 +6054,7 @@ Arvados <- R6::R6Class(
if(length(specimen) > 0)
body <- jsonlite::toJSON(list(specimen = specimen),
- auto_unbox = TRUE)
+ auto_unbox = TRUE)
else
body <- NULL
@@ -6078,7 +6078,7 @@ Arvados <- R6::R6Class(
if(length(specimen) > 0)
body <- jsonlite::toJSON(list(specimen = specimen),
- auto_unbox = TRUE)
+ auto_unbox = TRUE)
else
body <- NULL
@@ -6122,8 +6122,8 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(filters = filters, where = where,
- order = order, select = select, distinct = distinct,
- limit = limit, offset = offset, count = count)
+ order = order, select = select, distinct = distinct,
+ limit = limit, offset = offset, count = count)
body <- NULL
@@ -6206,8 +6206,8 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(filters = filters, where = where,
- order = order, select = select, distinct = distinct,
- limit = limit, offset = offset, count = count)
+ order = order, select = select, distinct = distinct,
+ limit = limit, offset = offset, count = count)
body <- NULL
@@ -6231,7 +6231,7 @@ Arvados <- R6::R6Class(
if(length(log) > 0)
body <- jsonlite::toJSON(list(log = log),
- auto_unbox = TRUE)
+ auto_unbox = TRUE)
else
body <- NULL
@@ -6255,7 +6255,7 @@ Arvados <- R6::R6Class(
if(length(log) > 0)
body <- jsonlite::toJSON(list(log = log),
- auto_unbox = TRUE)
+ auto_unbox = TRUE)
else
body <- NULL
@@ -6298,8 +6298,8 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(filters = filters, where = where,
- order = order, select = select, distinct = distinct,
- limit = limit, offset = offset, count = count)
+ order = order, select = select, distinct = distinct,
+ limit = limit, offset = offset, count = count)
body <- NULL
@@ -6382,8 +6382,8 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(filters = filters, where = where,
- order = order, select = select, distinct = distinct,
- limit = limit, offset = offset, count = count)
+ order = order, select = select, distinct = distinct,
+ limit = limit, offset = offset, count = count)
body <- NULL
@@ -6407,7 +6407,7 @@ Arvados <- R6::R6Class(
if(length(trait) > 0)
body <- jsonlite::toJSON(list(trait = trait),
- auto_unbox = TRUE)
+ auto_unbox = TRUE)
else
body <- NULL
@@ -6431,7 +6431,7 @@ Arvados <- R6::R6Class(
if(length(trait) > 0)
body <- jsonlite::toJSON(list(trait = trait),
- auto_unbox = TRUE)
+ auto_unbox = TRUE)
else
body <- NULL
@@ -6474,8 +6474,8 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(filters = filters, where = where,
- order = order, select = select, distinct = distinct,
- limit = limit, offset = offset, count = count)
+ order = order, select = select, distinct = distinct,
+ limit = limit, offset = offset, count = count)
body <- NULL
@@ -6559,8 +6559,8 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(filters = filters, where = where,
- order = order, select = select, distinct = distinct,
- limit = limit, offset = offset, count = count)
+ order = order, select = select, distinct = distinct,
+ limit = limit, offset = offset, count = count)
body <- NULL
@@ -6585,7 +6585,7 @@ Arvados <- R6::R6Class(
if(length(virtualmachine) > 0)
body <- jsonlite::toJSON(list(virtualmachine = virtualmachine),
- auto_unbox = TRUE)
+ auto_unbox = TRUE)
else
body <- NULL
@@ -6609,7 +6609,7 @@ Arvados <- R6::R6Class(
if(length(virtualmachine) > 0)
body <- jsonlite::toJSON(list(virtualmachine = virtualmachine),
- auto_unbox = TRUE)
+ auto_unbox = TRUE)
else
body <- NULL
@@ -6693,8 +6693,8 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(filters = filters, where = where,
- order = order, select = select, distinct = distinct,
- limit = limit, offset = offset, count = count)
+ order = order, select = select, distinct = distinct,
+ limit = limit, offset = offset, count = count)
body <- NULL
@@ -6778,8 +6778,8 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(filters = filters, where = where,
- order = order, select = select, distinct = distinct,
- limit = limit, offset = offset, count = count)
+ order = order, select = select, distinct = distinct,
+ limit = limit, offset = offset, count = count)
body <- NULL
@@ -6803,7 +6803,7 @@ Arvados <- R6::R6Class(
if(length(workflow) > 0)
body <- jsonlite::toJSON(list(workflow = workflow),
- auto_unbox = TRUE)
+ auto_unbox = TRUE)
else
body <- NULL
@@ -6827,7 +6827,7 @@ Arvados <- R6::R6Class(
if(length(workflow) > 0)
body <- jsonlite::toJSON(list(workflow = workflow),
- auto_unbox = TRUE)
+ auto_unbox = TRUE)
else
body <- NULL
@@ -6871,8 +6871,8 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(filters = filters, where = where,
- order = order, select = select, distinct = distinct,
- limit = limit, offset = offset, count = count)
+ order = order, select = select, distinct = distinct,
+ limit = limit, offset = offset, count = count)
body <- NULL
@@ -6956,9 +6956,9 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(filters = filters, where = where,
- order = order, select = select, distinct = distinct,
- limit = limit, offset = offset, count = count,
- include_trash = include_trash)
+ order = order, select = select, distinct = distinct,
+ limit = limit, offset = offset, count = count,
+ include_trash = include_trash)
body <- NULL
@@ -6982,7 +6982,7 @@ Arvados <- R6::R6Class(
if(length(group) > 0)
body <- jsonlite::toJSON(list(group = group),
- auto_unbox = TRUE)
+ auto_unbox = TRUE)
else
body <- NULL
@@ -7006,7 +7006,7 @@ Arvados <- R6::R6Class(
if(length(group) > 0)
body <- jsonlite::toJSON(list(group = group),
- auto_unbox = TRUE)
+ auto_unbox = TRUE)
else
body <- NULL
@@ -7050,9 +7050,9 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(filters = filters, where = where,
- order = order, distinct = distinct, limit = limit,
- offset = offset, count = count, include_trash = include_trash,
- uuid = uuid, recursive = recursive)
+ order = order, distinct = distinct, limit = limit,
+ offset = offset, count = count, include_trash = include_trash,
+ uuid = uuid, recursive = recursive)
body <- NULL
@@ -7116,9 +7116,9 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(filters = filters, where = where,
- order = order, select = select, distinct = distinct,
- limit = limit, offset = offset, count = count,
- include_trash = include_trash)
+ order = order, select = select, distinct = distinct,
+ limit = limit, offset = offset, count = count,
+ include_trash = include_trash)
body <- NULL
@@ -7202,8 +7202,8 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(filters = filters, where = where,
- order = order, select = select, distinct = distinct,
- limit = limit, offset = offset, count = count)
+ order = order, select = select, distinct = distinct,
+ limit = limit, offset = offset, count = count)
body <- NULL
@@ -7228,7 +7228,7 @@ Arvados <- R6::R6Class(
if(length(useragreement) > 0)
body <- jsonlite::toJSON(list(useragreement = useragreement),
- auto_unbox = TRUE)
+ auto_unbox = TRUE)
else
body <- NULL
@@ -7252,7 +7252,7 @@ Arvados <- R6::R6Class(
if(length(useragreement) > 0)
body <- jsonlite::toJSON(list(useragreement = useragreement),
- auto_unbox = TRUE)
+ auto_unbox = TRUE)
else
body <- NULL
@@ -7336,8 +7336,8 @@ Arvados <- R6::R6Class(
headers <- list(Authorization = paste("OAuth2", private$token),
"Content-Type" = "application/json")
queryArgs <- list(filters = filters, where = where,
- order = order, select = select, distinct = distinct,
- limit = limit, offset = offset, count = count)
+ order = order, select = select, distinct = distinct,
+ limit = limit, offset = offset, count = count)
body <- NULL
diff --git a/sdk/R/R/RESTService.R b/sdk/R/R/RESTService.R
index b87310e..dacf88a 100644
--- a/sdk/R/R/RESTService.R
+++ b/sdk/R/R/RESTService.R
@@ -50,38 +50,6 @@ RESTService <- R6::R6Class(
private$webDavHostName
},
- #Move this to utility
- fetchAllItems = function(resourceURL, filters)
- {
- headers <- list(Authorization = paste("OAuth2", self$token))
-
- offset <- 0
- itemsAvailable <- .Machine$integer.max
- items <- c()
- while(length(items) < itemsAvailable)
- {
- serverResponse <- self$http$execute(verb = "GET",
- url = resourceURL,
- headers = headers,
- body = NULL,
- query = filters,
- limit = NULL,
- offset = offset,
- retryTimes = self$numRetries)
-
- parsedResponse <- self$httpParser$parseJSONResponse(serverResponse)
-
- if(!is.null(parsedResponse$errors))
- stop(parsedResponse$errors)
-
- items <- c(items, parsedResponse$items)
- offset <- length(items)
- itemsAvailable <- parsedResponse$items_available
- }
-
- items
- },
-
create = function(files, uuid)
{
sapply(files, function(filePath)
diff --git a/sdk/R/R/autoGenAPI.R b/sdk/R/R/autoGenAPI.R
index a233938..4636be0 100644
--- a/sdk/R/R/autoGenAPI.R
+++ b/sdk/R/R/autoGenAPI.R
@@ -25,7 +25,6 @@ generateAPI <- function()
arvadosClassMethods,
arvadosAPIFooter)
- #TODO: Save to a file or load in memory?
fileConn <- file("./R/Arvados.R", "w")
writeLines(unlist(arvadosClass), fileConn)
close(fileConn)
@@ -224,7 +223,8 @@ getRequestQueryList <- function(methodMetaData)
lineLengthLimit <- 40
if(nchar(collapsedArgs) > lineLengthLimit)
- return(formatArgs("queryArgs <- list(", "\t", queryArgs, ")", lineLengthLimit))
+ return(formatArgs("queryArgs <- list(", "\t\t\t\t ", queryArgs, ")",
+ lineLengthLimit))
else
return(paste0("queryArgs <- list(", collapsedArgs, ")"))
}
@@ -242,7 +242,7 @@ getRequestBody <- function(methodMetaData)
c(paste0("if(length(", resourceName, ") > 0)"),
paste0("\tbody <- jsonlite::toJSON(list(", resourceName, " = ", resourceName, "), "),
- " auto_unbox = TRUE)",
+ "\t auto_unbox = TRUE)",
"else",
"\tbody <- NULL")
}
diff --git a/sdk/R/R/util.R b/sdk/R/R/util.R
index d9af8b0..57dd75f 100644
--- a/sdk/R/R/util.R
+++ b/sdk/R/R/util.R
@@ -1,3 +1,39 @@
+#' listAll
+#'
+#' List all resources even if the number of items is greater than maximum API limit.
+#'
+#' @param fn Arvados method used to retrieve items from REST service.
+#' @param ... Optional arguments which will be pased to fn .
+#' @examples
+#' \dontrun{
+#' arv <- Arvados$new("your Arvados token", "example.arvadosapi.com")
+#' cl <- listAll(arv$collections.list, filters = list(list("name", "like", "test%"))
+#' }
+#' @export
+listAll <- function(fn, ...)
+{
+ offset <- 0
+ itemsAvailable <- .Machine$integer.max
+ items <- c()
+
+ while(length(items) < itemsAvailable)
+ {
+ serverResponse <- fn(offset = offset, ...)
+
+ if(!is.null(serverResponse$errors))
+ stop(serverResponse$errors)
+
+ items <- c(items, serverResponse$items)
+ offset <- length(items)
+ itemsAvailable <- serverResponse$items_available
+ }
+
+ items
+}
+
+
+#NOTE: Package private functions
+
trimFromStart <- function(sample, trimCharacters)
{
if(startsWith(sample, trimCharacters))
@@ -49,6 +85,5 @@ splitToPathAndName = function(path)
nameAndPath$name <- components[length(components)]
nameAndPath$path <- trimFromStart(paste0(components[-length(components)], collapse = "/"),
"/")
-
nameAndPath
}
diff --git a/sdk/R/man/api_client_authorizations.create.Rd b/sdk/R/man/api_client_authorizations.create.Rd
index 257512c..f5d4d5f 100644
--- a/sdk/R/man/api_client_authorizations.create.Rd
+++ b/sdk/R/man/api_client_authorizations.create.Rd
@@ -4,7 +4,7 @@
\alias{api_client_authorizations.create}
\title{api_client_authorizations.create is a method defined in Arvados class.}
\usage{
-arv$api_client_authorizations.create(api_client_authorization,
+arv$api_client_authorizations.create(apiclientauthorization,
ensure_unique_name = "false")
}
\arguments{
diff --git a/sdk/R/man/api_client_authorizations.update.Rd b/sdk/R/man/api_client_authorizations.update.Rd
index 7790d95..aca5a98 100644
--- a/sdk/R/man/api_client_authorizations.update.Rd
+++ b/sdk/R/man/api_client_authorizations.update.Rd
@@ -4,7 +4,7 @@
\alias{api_client_authorizations.update}
\title{api_client_authorizations.update is a method defined in Arvados class.}
\usage{
-arv$api_client_authorizations.update(api_client_authorization,
+arv$api_client_authorizations.update(apiclientauthorization,
uuid)
}
\arguments{
diff --git a/sdk/R/man/api_clients.create.Rd b/sdk/R/man/api_clients.create.Rd
index 9b60787..da01010 100644
--- a/sdk/R/man/api_clients.create.Rd
+++ b/sdk/R/man/api_clients.create.Rd
@@ -4,7 +4,7 @@
\alias{api_clients.create}
\title{api_clients.create is a method defined in Arvados class.}
\usage{
-arv$api_clients.create(api_client,
+arv$api_clients.create(apiclient,
ensure_unique_name = "false")
}
\arguments{
diff --git a/sdk/R/man/api_clients.update.Rd b/sdk/R/man/api_clients.update.Rd
index b89060f..ec01831 100644
--- a/sdk/R/man/api_clients.update.Rd
+++ b/sdk/R/man/api_clients.update.Rd
@@ -4,7 +4,7 @@
\alias{api_clients.update}
\title{api_clients.update is a method defined in Arvados class.}
\usage{
-arv$api_clients.update(api_client,
+arv$api_clients.update(apiclient,
uuid)
}
\arguments{
diff --git a/sdk/R/man/authorized_keys.create.Rd b/sdk/R/man/authorized_keys.create.Rd
index 4ec8cea..9f523f3 100644
--- a/sdk/R/man/authorized_keys.create.Rd
+++ b/sdk/R/man/authorized_keys.create.Rd
@@ -4,7 +4,7 @@
\alias{authorized_keys.create}
\title{authorized_keys.create is a method defined in Arvados class.}
\usage{
-arv$authorized_keys.create(authorized_key,
+arv$authorized_keys.create(authorizedkey,
ensure_unique_name = "false")
}
\arguments{
diff --git a/sdk/R/man/authorized_keys.update.Rd b/sdk/R/man/authorized_keys.update.Rd
index fd8ce69..10a0af4 100644
--- a/sdk/R/man/authorized_keys.update.Rd
+++ b/sdk/R/man/authorized_keys.update.Rd
@@ -4,7 +4,7 @@
\alias{authorized_keys.update}
\title{authorized_keys.update is a method defined in Arvados class.}
\usage{
-arv$authorized_keys.update(authorized_key,
+arv$authorized_keys.update(authorizedkey,
uuid)
}
\arguments{
diff --git a/sdk/R/man/container_requests.create.Rd b/sdk/R/man/container_requests.create.Rd
index 94535f2..fe104ca 100644
--- a/sdk/R/man/container_requests.create.Rd
+++ b/sdk/R/man/container_requests.create.Rd
@@ -4,7 +4,7 @@
\alias{container_requests.create}
\title{container_requests.create is a method defined in Arvados class.}
\usage{
-arv$container_requests.create(container_request,
+arv$container_requests.create(containerrequest,
ensure_unique_name = "false")
}
\arguments{
diff --git a/sdk/R/man/container_requests.update.Rd b/sdk/R/man/container_requests.update.Rd
index e5257de..78aa17a 100644
--- a/sdk/R/man/container_requests.update.Rd
+++ b/sdk/R/man/container_requests.update.Rd
@@ -4,7 +4,7 @@
\alias{container_requests.update}
\title{container_requests.update is a method defined in Arvados class.}
\usage{
-arv$container_requests.update(container_request,
+arv$container_requests.update(containerrequest,
uuid)
}
\arguments{
diff --git a/sdk/R/man/job_tasks.create.Rd b/sdk/R/man/job_tasks.create.Rd
index 4390eb9..cda460c 100644
--- a/sdk/R/man/job_tasks.create.Rd
+++ b/sdk/R/man/job_tasks.create.Rd
@@ -4,8 +4,7 @@
\alias{job_tasks.create}
\title{job_tasks.create is a method defined in Arvados class.}
\usage{
-arv$job_tasks.create(job_task,
- ensure_unique_name = "false")
+arv$job_tasks.create(jobtask, ensure_unique_name = "false")
}
\arguments{
\item{jobTask}{JobTask object.}
diff --git a/sdk/R/man/job_tasks.update.Rd b/sdk/R/man/job_tasks.update.Rd
index 6e2a70d..e6fcec7 100644
--- a/sdk/R/man/job_tasks.update.Rd
+++ b/sdk/R/man/job_tasks.update.Rd
@@ -4,8 +4,7 @@
\alias{job_tasks.update}
\title{job_tasks.update is a method defined in Arvados class.}
\usage{
-arv$job_tasks.update(job_task,
- uuid)
+arv$job_tasks.update(jobtask, uuid)
}
\arguments{
\item{jobTask}{JobTask object.}
diff --git a/sdk/R/man/keep_disks.create.Rd b/sdk/R/man/keep_disks.create.Rd
index 3e4f833..9121546 100644
--- a/sdk/R/man/keep_disks.create.Rd
+++ b/sdk/R/man/keep_disks.create.Rd
@@ -4,7 +4,7 @@
\alias{keep_disks.create}
\title{keep_disks.create is a method defined in Arvados class.}
\usage{
-arv$keep_disks.create(keep_disk,
+arv$keep_disks.create(keepdisk,
ensure_unique_name = "false")
}
\arguments{
diff --git a/sdk/R/man/keep_disks.update.Rd b/sdk/R/man/keep_disks.update.Rd
index 5089f45..b8ec283 100644
--- a/sdk/R/man/keep_disks.update.Rd
+++ b/sdk/R/man/keep_disks.update.Rd
@@ -4,7 +4,7 @@
\alias{keep_disks.update}
\title{keep_disks.update is a method defined in Arvados class.}
\usage{
-arv$keep_disks.update(keep_disk,
+arv$keep_disks.update(keepdisk,
uuid)
}
\arguments{
diff --git a/sdk/R/man/keep_services.create.Rd b/sdk/R/man/keep_services.create.Rd
index 8b12a9a..88a8a9a 100644
--- a/sdk/R/man/keep_services.create.Rd
+++ b/sdk/R/man/keep_services.create.Rd
@@ -4,7 +4,7 @@
\alias{keep_services.create}
\title{keep_services.create is a method defined in Arvados class.}
\usage{
-arv$keep_services.create(keep_service,
+arv$keep_services.create(keepservice,
ensure_unique_name = "false")
}
\arguments{
diff --git a/sdk/R/man/keep_services.update.Rd b/sdk/R/man/keep_services.update.Rd
index f059463..51120dc 100644
--- a/sdk/R/man/keep_services.update.Rd
+++ b/sdk/R/man/keep_services.update.Rd
@@ -4,7 +4,7 @@
\alias{keep_services.update}
\title{keep_services.update is a method defined in Arvados class.}
\usage{
-arv$keep_services.update(keep_service,
+arv$keep_services.update(keepservice,
uuid)
}
\arguments{
diff --git a/sdk/R/man/listAll.Rd b/sdk/R/man/listAll.Rd
new file mode 100644
index 0000000..2084b47
--- /dev/null
+++ b/sdk/R/man/listAll.Rd
@@ -0,0 +1,22 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/util.R
+\name{listAll}
+\alias{listAll}
+\title{listAll}
+\usage{
+listAll(fn, ...)
+}
+\arguments{
+\item{fn}{Arvados method used to retrieve items from REST service.}
+
+\item{...}{Optional arguments which will be pased to fn .}
+}
+\description{
+List all resources even if the number of items is greater than maximum API limit.
+}
+\examples{
+\dontrun{
+arv <- Arvados$new("your Arvados token", "example.arvadosapi.com")
+cl <- listAll(arv$collections.list, filters = list(list("name", "like", "test\%"))
+}
+}
diff --git a/sdk/R/man/pipeline_instances.create.Rd b/sdk/R/man/pipeline_instances.create.Rd
index 8f0c1e9..63e081f 100644
--- a/sdk/R/man/pipeline_instances.create.Rd
+++ b/sdk/R/man/pipeline_instances.create.Rd
@@ -4,7 +4,7 @@
\alias{pipeline_instances.create}
\title{pipeline_instances.create is a method defined in Arvados class.}
\usage{
-arv$pipeline_instances.create(pipeline_instance,
+arv$pipeline_instances.create(pipelineinstance,
ensure_unique_name = "false")
}
\arguments{
diff --git a/sdk/R/man/pipeline_instances.update.Rd b/sdk/R/man/pipeline_instances.update.Rd
index 5058260..f9caa26 100644
--- a/sdk/R/man/pipeline_instances.update.Rd
+++ b/sdk/R/man/pipeline_instances.update.Rd
@@ -4,7 +4,7 @@
\alias{pipeline_instances.update}
\title{pipeline_instances.update is a method defined in Arvados class.}
\usage{
-arv$pipeline_instances.update(pipeline_instance,
+arv$pipeline_instances.update(pipelineinstance,
uuid)
}
\arguments{
diff --git a/sdk/R/man/pipeline_templates.create.Rd b/sdk/R/man/pipeline_templates.create.Rd
index 9b64766..32b332e 100644
--- a/sdk/R/man/pipeline_templates.create.Rd
+++ b/sdk/R/man/pipeline_templates.create.Rd
@@ -4,7 +4,7 @@
\alias{pipeline_templates.create}
\title{pipeline_templates.create is a method defined in Arvados class.}
\usage{
-arv$pipeline_templates.create(pipeline_template,
+arv$pipeline_templates.create(pipelinetemplate,
ensure_unique_name = "false")
}
\arguments{
diff --git a/sdk/R/man/pipeline_templates.update.Rd b/sdk/R/man/pipeline_templates.update.Rd
index a266fe2..d7e51bd 100644
--- a/sdk/R/man/pipeline_templates.update.Rd
+++ b/sdk/R/man/pipeline_templates.update.Rd
@@ -4,7 +4,7 @@
\alias{pipeline_templates.update}
\title{pipeline_templates.update is a method defined in Arvados class.}
\usage{
-arv$pipeline_templates.update(pipeline_template,
+arv$pipeline_templates.update(pipelinetemplate,
uuid)
}
\arguments{
diff --git a/sdk/R/man/user_agreements.create.Rd b/sdk/R/man/user_agreements.create.Rd
index 03113a9..00da636 100644
--- a/sdk/R/man/user_agreements.create.Rd
+++ b/sdk/R/man/user_agreements.create.Rd
@@ -4,7 +4,7 @@
\alias{user_agreements.create}
\title{user_agreements.create is a method defined in Arvados class.}
\usage{
-arv$user_agreements.create(user_agreement,
+arv$user_agreements.create(useragreement,
ensure_unique_name = "false")
}
\arguments{
diff --git a/sdk/R/man/user_agreements.update.Rd b/sdk/R/man/user_agreements.update.Rd
index 17c5f31..f61c8b1 100644
--- a/sdk/R/man/user_agreements.update.Rd
+++ b/sdk/R/man/user_agreements.update.Rd
@@ -4,7 +4,7 @@
\alias{user_agreements.update}
\title{user_agreements.update is a method defined in Arvados class.}
\usage{
-arv$user_agreements.update(user_agreement,
+arv$user_agreements.update(useragreement,
uuid)
}
\arguments{
diff --git a/sdk/R/man/virtual_machines.create.Rd b/sdk/R/man/virtual_machines.create.Rd
index 5ae56e5..d2ec7b6 100644
--- a/sdk/R/man/virtual_machines.create.Rd
+++ b/sdk/R/man/virtual_machines.create.Rd
@@ -4,7 +4,7 @@
\alias{virtual_machines.create}
\title{virtual_machines.create is a method defined in Arvados class.}
\usage{
-arv$virtual_machines.create(virtual_machine,
+arv$virtual_machines.create(virtualmachine,
ensure_unique_name = "false")
}
\arguments{
diff --git a/sdk/R/man/virtual_machines.update.Rd b/sdk/R/man/virtual_machines.update.Rd
index 4aa479c..8cee0bc 100644
--- a/sdk/R/man/virtual_machines.update.Rd
+++ b/sdk/R/man/virtual_machines.update.Rd
@@ -4,7 +4,7 @@
\alias{virtual_machines.update}
\title{virtual_machines.update is a method defined in Arvados class.}
\usage{
-arv$virtual_machines.update(virtual_machine,
+arv$virtual_machines.update(virtualmachine,
uuid)
}
\arguments{
diff --git a/sdk/R/tests/testthat/test-RESTService.R b/sdk/R/tests/testthat/test-RESTService.R
index ef4a114..898e59e 100644
--- a/sdk/R/tests/testthat/test-RESTService.R
+++ b/sdk/R/tests/testthat/test-RESTService.R
@@ -31,34 +31,6 @@ test_that("getWebDavHostName returns webDAV host name properly", {
expect_that("https://myWebDavServer.com", equals(REST$getWebDavHostName()))
})
-test_that("fetchAllItems always returns all resource items from server", {
-
- expectedURL <- NULL
- serverResponse <- list(items_available = 8,
- items = list("collection1",
- "collection2",
- "collection3",
- "collection4",
- "collection5",
- "collection6",
- "collection7",
- "collection8"))
-
- httpParser <- FakeHttpParser$new()
- httpRequest <- FakeHttpRequest$new(expectedURL, serverResponse)
- httpRequest$serverMaxElementsPerRequest <- 3
-
- REST <- RESTService$new("token", "host",
- httpRequest, httpParser,
- 0, "webDavHost")
-
- result <- REST$fetchAllItems(NULL, NULL)
-
- expect_that(length(result), equals(8))
- expect_that(httpRequest$numberOfGETRequests, equals(3))
- expect_that(httpParser$parserCallCount, equals(3))
-})
-
test_that("create calls REST service properly", {
uuid <- "aaaaa-j7d0g-ccccccccccccccc"
diff --git a/sdk/R/tests/testthat/test-util.R b/sdk/R/tests/testthat/test-util.R
index 62065f8..ea09151 100644
--- a/sdk/R/tests/testthat/test-util.R
+++ b/sdk/R/tests/testthat/test-util.R
@@ -1,5 +1,29 @@
context("Utility function")
+test_that("listAll always returns all resource items from server", {
+
+ serverResponseLimit <- 3
+ itemsAvailable <- 8
+ items <- list("collection1", "collection2", "collection3", "collection4",
+ "collection5", "collection6", "collection7", "collection8")
+
+ testFunction <- function(offset, ...)
+ {
+ response <- list()
+ response$items_available <- itemsAvailable
+
+ maxIndex <- offset + serverResponseLimit
+ lastElementIndex <- if(maxIndex < itemsAvailable) maxIndex else itemsAvailable
+
+ response$items <- items[(offset + 1):lastElementIndex]
+ response
+ }
+
+ result <- listAll(testFunction)
+
+ expect_that(length(result), equals(8))
+})
+
test_that("trimFromStart trims string correctly if string starts with trimCharacters", {
sample <- "./something/random"
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list