[ARVADOS] updated: a84be631958ac0bb45b5e06efdb2782f02fdb2af

git at public.curoverse.com git at public.curoverse.com
Tue May 20 09:58:40 EDT 2014


Summary of changes:
 apps/workbench/.gitignore                          |   4 +
 apps/workbench/Gemfile                             |  18 +-
 apps/workbench/Gemfile.lock                        | 147 ++--
 .../api_client_authorizations.js.coffee            |   3 -
 .../assets/javascripts/authorized_keys.js.coffee   |   3 -
 .../app/assets/javascripts/collections.js          |   1 -
 .../app/assets/javascripts/folders.js.coffee       |   3 -
 .../app/assets/javascripts/groups.js.coffee        |   3 -
 .../app/assets/javascripts/humans.js.coffee        |   3 -
 .../app/assets/javascripts/job_tasks.js.coffee     |   3 -
 .../app/assets/javascripts/jobs.js.coffee          |   3 -
 .../app/assets/javascripts/keep_disks.js.coffee    |  31 +-
 .../app/assets/javascripts/links.js.coffee         |   3 -
 .../app/assets/javascripts/logs.js.coffee          |   3 -
 .../app/assets/javascripts/nodes.js.coffee         |   3 -
 .../app/assets/javascripts/pipeline_instances.js   |   1 -
 .../javascripts/pipeline_templates.js.coffee       |   3 -
 .../app/assets/javascripts/repositories.js.coffee  |   3 -
 .../app/assets/javascripts/sessions.js.coffee      |   3 -
 apps/workbench/app/assets/javascripts/sizing.js    |   2 +-
 .../app/assets/javascripts/specimens.js.coffee     |   3 -
 .../app/assets/javascripts/traits.js.coffee        |   3 -
 .../assets/javascripts/user_agreements.js.coffee   |   3 -
 .../app/assets/javascripts/users.js.coffee         |   3 -
 .../assets/javascripts/virtual_machines.js.coffee  |   3 -
 .../app/assets/stylesheets/keep_disks.css.scss     |   8 +
 .../app/controllers/actions_controller.rb          |   2 +-
 .../api_client_authorizations_controller.rb        |  13 -
 .../app/controllers/application_controller.rb      |  21 +-
 .../app/controllers/collections_controller.rb      |   3 +-
 apps/workbench/app/controllers/jobs_controller.rb  |   7 +-
 .../app/controllers/keep_disks_controller.rb       |  47 ++
 .../controllers/pipeline_instances_controller.rb   |   2 +-
 .../app/controllers/sessions_controller.rb         |   2 +-
 apps/workbench/app/controllers/users_controller.rb |  10 +-
 .../app/helpers/arvados_api_client_helper.rb       |  13 +
 apps/workbench/app/models/arvados_api_client.rb    |  43 +-
 apps/workbench/app/models/arvados_base.rb          |  60 +-
 apps/workbench/app/models/arvados_resource_list.rb |   7 +-
 apps/workbench/app/models/collection.rb            |   4 +-
 apps/workbench/app/models/group.rb                 |   4 +-
 apps/workbench/app/models/job.rb                   |   4 +
 apps/workbench/app/models/pipeline_instance.rb     |   3 +-
 apps/workbench/app/models/user.rb                  |  26 +-
 apps/workbench/app/models/user_agreement.rb        |   8 +-
 .../application/_pipeline_status_label.html.erb    |   6 +-
 .../app/views/application/_show_metadata.html.erb  |   4 +-
 .../workbench/app/views/jobs/_show_recent.html.erb |   6 +-
 .../app/views/keep_disks/_content_layout.html.erb  |  21 +
 .../app/views/layouts/application.html.erb         |   7 +-
 apps/workbench/app/views/links/_recent.html.erb    |   2 +-
 .../pipeline_instances/_show_components.html.erb   |  27 +-
 .../views/pipeline_instances/_show_recent.html.erb |   8 +-
 .../app/views/pipeline_instances/show.js.erb       |   6 +-
 .../workbench/app/views/users/_show_admin.html.erb |   2 +-
 apps/workbench/app/views/users/welcome.html.erb    |   2 +-
 apps/workbench/app/views/websocket/index.html.erb  |   2 +-
 apps/workbench/config/application.default.yml      |  14 +-
 apps/workbench/config/application.rb               |  15 +-
 .../config/environments/development.rb.example     |  12 +-
 .../config/environments/production.rb.example      |   6 +-
 apps/workbench/config/environments/test.rb.example |   6 -
 .../config/initializers/zzz_arvados_api_client.rb  |   8 -
 .../zza_load_config.rb => load_config.rb}          |   0
 apps/workbench/config/routes.rb                    |   8 +-
 .../workbench/test/integration/collections_test.rb |   9 +
 apps/workbench/test/integration/users_test.rb      |   7 +-
 apps/workbench/test/test_helper.rb                 |  78 +-
 .../install-workbench-app.html.textile.liquid      |  11 +
 doc/sdk/python/sdk-python.html.textile.liquid      |   3 +-
 sdk/cli/arvados-cli.gemspec                        |   1 +
 sdk/cli/bin/arv                                    |  11 +-
 sdk/cli/bin/arv-run-pipeline-instance              |  62 +-
 sdk/cli/bin/crunch-job                             |  13 +-
 .../main/java/org/arvados/sdk/java/Arvados.java    |  86 +-
 .../java/org/arvados/sdk/java/ArvadosTest.java     |  72 +-
 sdk/perl/lib/Arvados.pm                            |   2 +-
 sdk/perl/lib/Arvados/Request.pm                    |   9 +-
 sdk/python/arvados/api.py                          |   7 +-
 sdk/python/requirements.txt                        |  14 +-
 sdk/python/run_test_server.py                      | 196 ++++-
 sdk/python/setup.py                                |   3 +-
 sdk/python/setup.py.src                            |  23 -
 sdk/python/setup_header.py                         |  11 -
 sdk/python/test_keep_client.py                     |  23 +-
 sdk/python/test_pipeline_template.py               |  18 +-
 sdk/python/test_websockets.py                      |   6 +-
 sdk/ruby/arvados.gemspec                           |   1 +
 sdk/ruby/lib/arvados.rb                            |   7 +-
 services/api/.gitignore                            |   4 +
 services/api/Gemfile.lock                          |  10 +-
 services/api/app/models/api_client.rb              |   2 +-
 services/api/app/models/arvados_model.rb           |  10 +-
 services/api/app/models/authorized_key.rb          |   2 +-
 services/api/app/models/collection.rb              |   2 +-
 services/api/app/models/group.rb                   |   5 +-
 services/api/app/models/human.rb                   |   2 +-
 services/api/app/models/job.rb                     |   2 +-
 services/api/app/models/job_task.rb                |   2 +-
 services/api/app/models/keep_disk.rb               |   2 +-
 services/api/app/models/link.rb                    |   2 +-
 services/api/app/models/log.rb                     |   2 +-
 services/api/app/models/node.rb                    |   2 +-
 services/api/app/models/pipeline_instance.rb       |  38 +-
 services/api/app/models/pipeline_template.rb       |   2 +-
 services/api/app/models/repository.rb              |   2 +-
 services/api/app/models/specimen.rb                |   2 +-
 services/api/app/models/trait.rb                   |   2 +-
 services/api/app/models/user.rb                    |   6 +-
 services/api/app/models/virtual_machine.rb         |   2 +-
 services/api/config/application.default.yml        |  10 +
 services/api/config/application.yml.example        |   7 -
 services/api/config/initializers/assign_uuid.rb    |   1 -
 services/api/config/initializers/eventbus.rb       |   6 +-
 .../20140422011506_pipeline_instance_state.rb      |   2 +
 services/api/lib/assign_uuid.rb                    |  31 -
 services/api/lib/can_be_an_owner.rb                |  47 ++
 services/api/lib/has_uuid.rb                       |  42 +
 services/api/lib/record_filters.rb                 |   4 +
 services/api/script/crunch-dispatch.rb             |  20 +-
 services/api/test/fixtures/links.yml               |  16 +
 services/api/test/fixtures/pipeline_instances.yml  |   3 +
 .../api/test/functional/arvados/v1/filters_test.rb |  16 +
 services/api/test/unit/arvados_model_test.rb       |  34 +
 services/api/test/unit/link_test.rb                |  14 +-
 services/api/test/unit/owner_test.rb               | 126 +++
 services/api/test/unit/pipeline_instance_test.rb   |  26 +-
 services/datamanager/experimental/datamanager.py   | 887 +++++++++++++++++++++
 .../datamanager/experimental/datamanager_test.py   |  41 +
 services/fuse/.gitignore                           |   1 +
 .../fuse/arvados_fuse}/__init__.py                 |  27 +-
 {sdk/python => services/fuse}/bin/arv-mount        |   6 +-
 {sdk/python => services/fuse}/readme.llfuse        |   0
 services/fuse/requirements.txt                     |   3 +
 services/fuse/run_test_server.py                   |   1 +
 sdk/python/setup_fuse.py => services/fuse/setup.py |  13 +-
 {sdk/python => services/fuse}/test_mount.py        |  21 +-
 services/keep/src/keep/handler_test.go             | 438 ++++++++++
 services/keep/src/keep/keep.go                     | 274 ++++++-
 services/keep/src/keep/keep_test.go                |   5 +-
 services/keep/src/keep/perms.go                    |  11 +-
 141 files changed, 2924 insertions(+), 692 deletions(-)
 delete mode 100644 apps/workbench/app/assets/javascripts/api_client_authorizations.js.coffee
 delete mode 100644 apps/workbench/app/assets/javascripts/authorized_keys.js.coffee
 delete mode 100644 apps/workbench/app/assets/javascripts/folders.js.coffee
 delete mode 100644 apps/workbench/app/assets/javascripts/groups.js.coffee
 delete mode 100644 apps/workbench/app/assets/javascripts/humans.js.coffee
 delete mode 100644 apps/workbench/app/assets/javascripts/job_tasks.js.coffee
 delete mode 100644 apps/workbench/app/assets/javascripts/jobs.js.coffee
 delete mode 100644 apps/workbench/app/assets/javascripts/links.js.coffee
 delete mode 100644 apps/workbench/app/assets/javascripts/logs.js.coffee
 delete mode 100644 apps/workbench/app/assets/javascripts/nodes.js.coffee
 delete mode 100644 apps/workbench/app/assets/javascripts/pipeline_templates.js.coffee
 delete mode 100644 apps/workbench/app/assets/javascripts/repositories.js.coffee
 delete mode 100644 apps/workbench/app/assets/javascripts/sessions.js.coffee
 delete mode 100644 apps/workbench/app/assets/javascripts/specimens.js.coffee
 delete mode 100644 apps/workbench/app/assets/javascripts/traits.js.coffee
 delete mode 100644 apps/workbench/app/assets/javascripts/user_agreements.js.coffee
 delete mode 100644 apps/workbench/app/assets/javascripts/users.js.coffee
 delete mode 100644 apps/workbench/app/assets/javascripts/virtual_machines.js.coffee
 create mode 100644 apps/workbench/app/helpers/arvados_api_client_helper.rb
 create mode 100644 apps/workbench/app/views/keep_disks/_content_layout.html.erb
 delete mode 100644 apps/workbench/config/initializers/zzz_arvados_api_client.rb
 rename apps/workbench/config/{initializers/zza_load_config.rb => load_config.rb} (100%)
 delete mode 100644 sdk/python/setup.py.src
 delete mode 100644 sdk/python/setup_header.py
 delete mode 100644 services/api/config/initializers/assign_uuid.rb
 delete mode 100644 services/api/lib/assign_uuid.rb
 create mode 100644 services/api/lib/can_be_an_owner.rb
 create mode 100644 services/api/lib/has_uuid.rb
 create mode 100644 services/api/test/functional/arvados/v1/filters_test.rb
 create mode 100644 services/api/test/unit/arvados_model_test.rb
 create mode 100644 services/api/test/unit/owner_test.rb
 create mode 100755 services/datamanager/experimental/datamanager.py
 create mode 100755 services/datamanager/experimental/datamanager_test.py
 create mode 120000 services/fuse/.gitignore
 rename {sdk/python/arvados/fuse => services/fuse/arvados_fuse}/__init__.py (95%)
 rename {sdk/python => services/fuse}/bin/arv-mount (96%)
 rename {sdk/python => services/fuse}/readme.llfuse (100%)
 create mode 100644 services/fuse/requirements.txt
 create mode 120000 services/fuse/run_test_server.py
 rename sdk/python/setup_fuse.py => services/fuse/setup.py (68%)
 rename {sdk/python => services/fuse}/test_mount.py (95%)
 create mode 100644 services/keep/src/keep/handler_test.go

       via  a84be631958ac0bb45b5e06efdb2782f02fdb2af (commit)
       via  c3367d7b827035d0cfc3418bc028a67142696e13 (commit)
       via  7ed1dcf8b0bfa8fc78f228a07b2318094b68abea (commit)
       via  5da718633e3663073a624db78274cd69e5dfe6e0 (commit)
       via  90744f405977dcfac40d5dea3dbe79391080b80d (commit)
       via  471cc718e0cf5a1846feb444887c35c285f33cdf (commit)
       via  043002e8d0dfd2a5dbb3cfc135ac21732c199c05 (commit)
       via  278fe7048f9035b350a60e032432c9119f151add (commit)
       via  7a873b4adfd0a7f94a4e7dfa64eb088caece46df (commit)
       via  7b4d7faff279490a40190208bd571a86090e2bf5 (commit)
       via  83c873af757aea4217648cc5a909fcadcf3e93e4 (commit)
       via  949c388c5ec3bc4f8cc6b3d503c11dcd20e5bbd4 (commit)
       via  03395937ba05b9e3192e346a355c691f45cc7c85 (commit)
       via  cff5301bbc1e1c8f8421fb56dca5a76dfebb058c (commit)
       via  2d9f17f33a9d8737d97705b8b77e3e1c05f7b411 (commit)
       via  67176a2637ca895015908c7c3bdb1ab7688c1b2c (commit)
       via  a797b27604a0f5a277d73e2d3522dec033fd4ecf (commit)
       via  6ebfb077cbe7357aadccc7ae4f803c61d66d0279 (commit)
       via  a792aabc3159439c66098935fea2da685eee7ed2 (commit)
       via  7ec5dedd6301ae84db941de986f2f0eacc4532e7 (commit)
       via  130bd6ec07cf6844861e49602d33b07dd2402595 (commit)
       via  a46e35694b573fd5c9b355c51323992670fc87b4 (commit)
       via  93842871ab5266e45fb6a29da89462af102a6384 (commit)
       via  85ab544a82c685a74d814a0e10c48624810be0af (commit)
       via  bfa9ee952c1ae3f03fe2f9fa781a132411963030 (commit)
       via  ce5b843c32f6ee74f02a40044073dd4288d16dee (commit)
       via  fba37ca64631be9e0bdfd17ca70d85dd2c896bfa (commit)
       via  ea9592e911a3ccdbbbfeed8812b67e968fe1cc5f (commit)
       via  3dccfa028282d8b667a7b447ea061b7eecc8618f (commit)
       via  7ca81caa537132acf4be86811e300b8a6ed3baac (commit)
       via  fb8dd22df54d0c8f87e97f41e1a1677741a47892 (commit)
       via  96b9b6b0a45ffb1965412fe9a12e23d10260ea8e (commit)
       via  900f179c96733c2ce9140b2d7767f97feb9eaff6 (commit)
       via  b093bbdccf67d895337e47bf32b0ab6f22bea632 (commit)
       via  f71c9e59bfff91da4b89050ceae27dbe3edcdb6c (commit)
       via  b91db14a4dced9d6ea124e86be3c796e6f2c8e8c (commit)
       via  a6c79a723f05e11c3b40d459e902eeca894c27b8 (commit)
       via  ff60e33ff3d9ad8144b9c269d12d1e5f18455416 (commit)
       via  e5f3ce60249a14f4fafdd9e0f31be45d1886a888 (commit)
       via  e6e94ca43f788b28d61c03f81b15ab5647f22d4c (commit)
       via  acef63e2e3e629da8b6825f33e6de7bf6bcc4fc2 (commit)
       via  b08f16445f02a02ea9246094657e93b354999b38 (commit)
       via  3e6368d077fa4831f93255e271a18842788183fb (commit)
       via  f54395a1b98c4146a795ce7b18e04c23630ab631 (commit)
       via  4742810338ec15a0654d18532f97f5ae41d48c5a (commit)
       via  67f17818338153fc6f7b0c65f51e97bbb16f0cc7 (commit)
       via  d0b6bb76a0a7478794faebd3e1e5ab94b717596d (commit)
       via  82393afcb6101fe6f601f6a752589d10b0909f8f (commit)
       via  8ef62a19514b4cc0dd886b01902016f19be09ccf (commit)
       via  a6f78c31607b37d207dcebada38ee05335deac50 (commit)
       via  d836cb04ab7e577b3f7896d6b49e78b97ed832f8 (commit)
       via  7ff85869345089297f5196c4be3cee6f7ee03c6b (commit)
       via  100e1ab71d64e21f1c21de2fc305a6f92fa244dc (commit)
       via  8aaf3a61c6981160eaa779fb32064895de00e5a6 (commit)
       via  d455c8373cf39f4310d2b0e13e7a9d02aca0b2ab (commit)
       via  81b517450a657fc56b91b25426505bf9b3937db7 (commit)
       via  95db3bc262b44b508462e1b2d9ce7a55c5ba1ffc (commit)
       via  fb95d0d2d09c9537f5bdc503e51cf4f091d02c46 (commit)
       via  def9a846a5d9dd91cc0a1ed9c50dee35b81425c0 (commit)
       via  fadf2b0fe1240f607fc91d65d6831621262afeb1 (commit)
       via  cf32ef421c037692e7ae896f695c61d8e3670f01 (commit)
       via  34ac761cb1fd2b7b9438765d14ded85dfab0453b (commit)
       via  e19b02f69914c086f979ec31eb603bb3b456cd15 (commit)
       via  e7ebb0cb4f642fbb2297e1ed54591244cc886f81 (commit)
       via  eef1936a73c7c85ba530cca028230241f5171333 (commit)
       via  8dea7244cf5e50b9fa70bec15b1db3fd2cdd03bf (commit)
       via  9da4a83c2cb602e872bb606503fa438dd3296864 (commit)
       via  2d79630f56a010aa0b7544b876c7c31b122c70af (commit)
       via  3c3bc28bc6c991d8111dd66bfef6fe310e00f232 (commit)
       via  949e27e0dd0a97cf78f0b90636df387fa0d65be3 (commit)
       via  b20333af04a3507b85c52cc4e50a0e2c3fc04433 (commit)
       via  a7100af369a892a7f38eb2875320a7c742ec4da8 (commit)
       via  60c604d8e89501af180487ae7b39c1e25a66c8f3 (commit)
       via  faf355bede4c4a9b01ef5658fa925cec6e4b503f (commit)
       via  7c21045a213c5cc8846a263124271c93d38d78b1 (commit)
       via  b249529bb02dd34e54f8816222ebf81d778c957b (commit)
       via  568d941d3fe4bc554af0bca6c1dc4d9fc66ce999 (commit)
       via  179c431787943f3711f2127d127c33a831378b06 (commit)
       via  4556f61d8f4ec294afa7980d1b00882e2a1ffdfa (commit)
       via  1a844d06238368c9d5c946a34c0c52485de1c435 (commit)
       via  dc068f04e966c35eee87af8da280bbbeb9ba3595 (commit)
       via  8fa8b34bcc334388d8c885e3f0e192503fdb7616 (commit)
       via  04ec74cf7dedfbb0becea0e0cb5018ccf55a31eb (commit)
       via  1ca9c477ffa476305a920a0df7ae1e8d5b69c8b2 (commit)
       via  087773f25a3df2d35e402f1afc6c7204a0852727 (commit)
       via  bfd037dee4c82f355816c449dd25921fc2923837 (commit)
       via  ef47dfeb871015d9da6d5e2e0a04100c2e9e8eee (commit)
       via  383aa9f906c32876a71599024084283627070adb (commit)
       via  f990e6880050eafaf3b6bfd063e36aa016e8682a (commit)
       via  28fe4303b1c04142bf0939b05280749e590673f0 (commit)
       via  f900ccf514a3653a64002fe07d9ce5b16adcfd51 (commit)
       via  a87ad3026e4f7e1cc2e22082a523fa7143388c88 (commit)
       via  b2a8e117cd2a02851c69136f76a1e63005386f1d (commit)
       via  97d8fa64264069fe6d8ae6c8131fd3cc2f347189 (commit)
       via  2a3f67fa270b9660d4dc17b55c48fa781bdba4bb (commit)
       via  7fb83a3380e62721801a4980c48ba78208c7b2e2 (commit)
       via  d5c8f2dc3faf77da783c2016630808f6351a4d6f (commit)
       via  1a4846b2e916d3cf3958cf77117d710f72fa61cf (commit)
       via  297f48f2e6233da1e61cda57af30c9c6b64f0908 (commit)
       via  1d5b46697b5d7c68b0bb159fc570ed63c1e3acc3 (commit)
       via  9736526e7abfd50eb8f18293f8ac312bf61937e4 (commit)
       via  638d136057f4d9ed19f132075079da396217d6fd (commit)
       via  b63b4b51a7bdaa38960e0b4428141c16c0a07d7a (commit)
       via  2b8857f631f58df2baa93077185fb7a5a29c6aad (commit)
       via  7e049a91425a51398f38e6b1ee839a4070483267 (commit)
       via  bdc9139d17c184a58e5088270f2ce6ba361fb8a7 (commit)
       via  7c8bfeb8d19db4f27b5fb5fd78e0afa3b7d07a89 (commit)
       via  647c8b8c47ef521046bea7675af84b621c235e0f (commit)
       via  6f6235983d91e0b9fb5660d0a2825f510bbdac73 (commit)
       via  54897c8f978f127a44c0a9d20c1e87cea840b21f (commit)
       via  f1b5f32b00d481e06d600cd6009d0995ecd19699 (commit)
       via  e419f135d46050250fdeb10b6e2a2a254caa85d4 (commit)
       via  aade22d7587e9f5921edb18ad76792a60eaa92fb (commit)
       via  2e9a14d193db2948e14804539494f3b2384a87b8 (commit)
       via  ba4fcbd29b2615d9cc64010d756de49eac5109a5 (commit)
       via  a0a7b1a0c6f43a80449a76c00fb0c30858d38233 (commit)
       via  bfb190a4c3f5bd995ccae37536c3234b14eaf3ed (commit)
       via  389f092ce9dc3a08245530fcf70d535783e62813 (commit)
       via  de9903cfc08ea7c3da459e7c4ee5a744d52a7c89 (commit)
       via  d034adbaf26a19e8fd48124cadd5108d2d3de642 (commit)
       via  a3650fa043500139ac36587a4b61ffed1a2dc1a3 (commit)
       via  f7538ca2df4a43ff60f87675f52a59edacfcdc7e (commit)
       via  f4925bb0e7d9de484579b71087f181b9dbea5bff (commit)
       via  ab66542f7c9c2dd4909e1bf3d03ef5df5f95a6f9 (commit)
       via  ec4e2b3707c030dab6081db499adc5ac369e61bd (commit)
       via  b189f5ed7a6fd3585535b9d9d3d587115cf383e7 (commit)
       via  2fce84531f36daa2323276f0c6b147efe82852ec (commit)
       via  5254bebf574f0f72bb0321e944d089ad6f6c25e2 (commit)
       via  42c9be2a3187291502efcebefc09ce603fd31106 (commit)
       via  b586267c7ff0a5973ecf2f83b3fa5eb452669cfc (commit)
       via  4efaeba6eb371d03aa8c8f052b63c2b3404de063 (commit)
       via  f76947a7c1ba973a11e563b0977d54a2ece2ce38 (commit)
       via  e3ce426fda2e7d2283d7092f988245c6900c8949 (commit)
       via  cd2672dc235efaacd533aadeef489994fe684a25 (commit)
       via  40cc2b01c2a3ff911549c2d31c8195905109633d (commit)
       via  74236320d68bf092f7f76f7ccf4f7a974735c6ab (commit)
       via  d0bf7a1ff103285e54433d3bcb67c2138b534542 (commit)
       via  bb6f6fb4021045b86ef58b3a975cf60b58807fa2 (commit)
       via  264c7fdb6c651ef73cfe4f0a280bf6672846eada (commit)
       via  1ea7294edb4aa80f13d805ef29875a39caab471c (commit)
      from  c501af3c5d3216c2ca56ab77f4f05bd74198c622 (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 a84be631958ac0bb45b5e06efdb2782f02fdb2af
Author: radhika <radhika at curoverse.com>
Date:   Tue May 20 09:57:20 2014 -0400

    2525: handling of array objects was not quite correct. it would not have worked if a pure array object that is not filters is passed in.

diff --git a/sdk/java/src/main/java/org/arvados/sdk/java/Arvados.java b/sdk/java/src/main/java/org/arvados/sdk/java/Arvados.java
index acaaf52..b9b7a8f 100644
--- a/sdk/java/src/main/java/org/arvados/sdk/java/Arvados.java
+++ b/sdk/java/src/main/java/org/arvados/sdk/java/Arvados.java
@@ -189,28 +189,49 @@ public class Arvados {
    * @return Set
    * @throws Exception
    */
-  public Set<String> getAvailableParametersForMethod(String resourceName, String methodName)
+  public Map<String,List<String>> getAvailableParametersForMethod(String resourceName, String methodName)
       throws Exception {
     RestMethod method = getMatchingMethod(resourceName, methodName);
-    Set<String> parameters = method.getParameters().keySet();
-    Request request = method.getRequest();
-    if (request != null) {
-      Object requestProperties = request.get("properties");
-      if (requestProperties != null) {
-        if (requestProperties instanceof Map) {
-          Map properties = (Map)requestProperties;
-          Set<String> propertyKeys = properties.keySet();
-          if (propertyKeys.size()>0) {
-            try {
-              propertyKeys.addAll(parameters);
-              return propertyKeys;
-            } catch (Exception e){
-              logger.error(e);
+    Map<String, List<String>> parameters = new HashMap<String, List<String>>();
+    List<String> requiredParameters = new ArrayList<String>();
+    List<String> optionalParameters = new ArrayList<String>();
+    parameters.put ("required", requiredParameters);
+    parameters.put("optional", optionalParameters);
+
+    try {
+      // get any request parameters
+      Request request = method.getRequest();
+      if (request != null) {
+        Object required = request.get("required");
+        Object requestProperties = request.get("properties");
+        if (requestProperties != null) {
+          if (requestProperties instanceof Map) {
+            Map properties = (Map)requestProperties;
+            Set<String> propertyKeys = properties.keySet();
+            for (String property : propertyKeys) {
+              if (Boolean.TRUE.equals(required)) {
+                requiredParameters.add(property);
+              } else {
+                optionalParameters.add(property);                
+              }
             }
           }
         }
       }
+
+      // get other listed parameters
+      Map<String,JsonSchema> methodParameters = method.getParameters();
+      for (Map.Entry<String, JsonSchema> entry : methodParameters.entrySet()) {
+        if (Boolean.TRUE.equals(entry.getValue().getRequired())) {
+          requiredParameters.add(entry.getKey());
+        } else {
+          optionalParameters.add(entry.getKey());
+        }
+      }
+    } catch (Exception e){
+      logger.error(e);
     }
+
     return parameters;
   }
 
@@ -329,6 +350,8 @@ public class Arvados {
         value = new BigInteger(parameterValue.toString());
       } else if ("float".equals(parameter.getType())) {
         value = new BigDecimal(parameterValue.toString());
+      } else if ("Java.util.Calendar".equals(parameter.getType())) {
+        value = new BigDecimal(parameterValue.toString());
       } else if (("array".equals(parameter.getType())) ||
           ("Array".equals(parameter.getType()))) {
         if (parameterValue.getClass().isArray()){
@@ -355,32 +378,35 @@ public class Arvados {
 
   private String getJsonValueFromArrayType (Object parameterValue) {
     String arrayStr = Arrays.deepToString((Object[])parameterValue);
-    arrayStr = arrayStr.substring(1, arrayStr.length()-1);
+
+    // we can expect either an array of array objects or an array of objects
+    if (arrayStr.startsWith("[[")) {
+      Object[][] array = new Object[1][];
+      arrayStr = arrayStr.substring(2, arrayStr.length()-2);
+      String jsonStr = getJsonStringForArray(arrayStr);
+      String value = "[" + jsonStr + "]";
+      return value;
+    } else {
+      arrayStr = arrayStr.substring(1, arrayStr.length()-1);
+      return (getJsonStringForArray(arrayStr));
+    }
+  }
+
+  private String getJsonStringForArray(String arrayStr) {
     Object[] array = arrayStr.split(",");
     Object[] trimmedArray = new Object[array.length];
     for (int i=0; i<array.length; i++){
       trimmedArray[i] = array[i].toString().trim();
     }
-    String jsonString = JSONArray.toJSONString(Arrays.asList(trimmedArray));
-    String value = "["+ jsonString +"]";
-
+    String value = JSONArray.toJSONString(Arrays.asList(trimmedArray));
     return value;
   }
 
   private String getJsonValueFromListType (Object parameterValue) {
     List paramList = (List)parameterValue;
     Object[] array = new Object[paramList.size()];
-    String arrayStr = Arrays.deepToString(paramList.toArray(array));
-    arrayStr = arrayStr.substring(1, arrayStr.length()-1);
-    array = arrayStr.split(",");
-    Object[] trimmedArray = new Object[array.length];
-    for (int i=0; i<array.length; i++){
-      trimmedArray[i] = array[i].toString().trim();
-    }
-    String jsonString = JSONArray.toJSONString(Arrays.asList(trimmedArray));
-    String value = "["+ jsonString +"]";
-
-    return value;
+    Arrays.deepToString(paramList.toArray(array));
+    return (getJsonValueFromArrayType(array));
   }
 
   private String getJsonValueFromMapType (Object parameterValue) {
diff --git a/sdk/java/src/test/java/org/arvados/sdk/java/ArvadosTest.java b/sdk/java/src/test/java/org/arvados/sdk/java/ArvadosTest.java
index bb1cf64..5176e8c 100644
--- a/sdk/java/src/test/java/org/arvados/sdk/java/ArvadosTest.java
+++ b/sdk/java/src/test/java/org/arvados/sdk/java/ArvadosTest.java
@@ -2,7 +2,11 @@ package org.arvados.sdk.java;
 
 import java.io.File;
 import java.io.FileInputStream;
+import java.math.BigDecimal;
 import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.GregorianCalendar;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -334,11 +338,12 @@ public class ArvadosTest {
     Map response = arv.call("links", "list", params);
     assertEquals("Expected links.list in response", "arvados#linkList", response.get("kind"));
 
-    String[] filters = new String[3];
-    filters[0] = "name";
-    filters[1] = "=";
-    filters[2] = "can_manage";
-    
+    String[][] filters = new String[1][];
+    String[] condition = new String[3];
+    condition[0] = "name";
+    condition[1] = "=";
+    condition[2] = "can_manage";
+    filters[0] = condition;
     params.put("filters", filters);
     
     response = arv.call("links", "list", params);
@@ -356,11 +361,12 @@ public class ArvadosTest {
     Map response = arv.call("links", "list", params);
     assertEquals("Expected links.list in response", "arvados#linkList", response.get("kind"));
 
-    List<String> filters = new ArrayList<String>();
-    filters.add("name");
-    filters.add("is_a");
-    filters.add("can_manage");
-    
+    List<List> filters = new ArrayList<List>();
+    List<String> condition = new ArrayList<String>();
+    condition.add("name");
+    condition.add("is_a");
+    condition.add("can_manage");
+    filters.add(condition);
     params.put("filters", filters);
     
     response = arv.call("links", "list", params);
@@ -370,6 +376,35 @@ public class ArvadosTest {
   }
 
   @Test
+  public void testGetLinksWithTimestampFilters() throws Exception {
+    Arvados arv = new Arvados("arvados", "v1");
+
+    Map<String, Object> params = new HashMap<String, Object>();
+
+    Map response = arv.call("links", "list", params);
+    assertEquals("Expected links.list in response", "arvados#linkList", response.get("kind"));
+
+    // get links created "tomorrow". Expect none in response
+    Calendar calendar = new GregorianCalendar();
+    calendar.setTime(new Date());
+    calendar.add(Calendar.DAY_OF_MONTH, 1);
+    
+    Object[][] filters = new Object[1][];
+    Object[] condition = new Object[3];
+    condition[0] = "created_at";
+    condition[1] = ">";
+    condition[2] = calendar.get(Calendar.YEAR) + "-" + (calendar.get(Calendar.MONTH)+1) + "-" + calendar.get(Calendar.DAY_OF_MONTH);
+    filters[0] = condition;
+    params.put("filters", filters);
+    
+    response = arv.call("links", "list", params);
+    
+    assertEquals("Expected links.list in response", "arvados#linkList", response.get("kind"));
+    int items_avail = ((BigDecimal)response.get("items_available")).intValue();
+    assertEquals("Expected zero links", items_avail, 0);
+  }
+
+  @Test
   public void testGetLinksWithWhereClause() throws Exception {
     Arvados arv = new Arvados("arvados", "v1");
 
@@ -404,17 +439,26 @@ public class ArvadosTest {
   @Test
   public void testGetAvailableParametersForUsersGetMethod() throws Exception {
     Arvados arv = new Arvados("arvados", "v1");
-    Set<String> parameters = arv.getAvailableParametersForMethod("users", "get");
+    Map<String,List<String>> parameters = arv.getAvailableParametersForMethod("users", "get");
     assertNotNull("Expected parameters", parameters);
-    assertTrue("Excected uuid parameter for get method for users", parameters.contains("uuid"));
+    assertTrue("Excected uuid parameter for get method for users", parameters.get("required").contains("uuid"));
   }
 
   @Test
   public void testGetAvailableParametersForUsersCreateMethod() throws Exception {
     Arvados arv = new Arvados("arvados", "v1");
-    Set<String> parameters = arv.getAvailableParametersForMethod("users", "create");
+    Map<String,List<String>> parameters = arv.getAvailableParametersForMethod("users", "create");
+    assertNotNull("Expected parameters", parameters);
+    assertTrue("Excected user parameter for get method for users", parameters.get("required").contains("user"));
+  }
+
+  @Test
+  public void testGetAvailableParametersForUsersListMethod() throws Exception {
+    Arvados arv = new Arvados("arvados", "v1");
+    Map<String,List<String>> parameters = arv.getAvailableParametersForMethod("users", "list");
     assertNotNull("Expected parameters", parameters);
-    assertTrue("Excected user parameter for create method for users", parameters.contains("user"));
+    assertTrue("Excected no required parameter for list method for users", parameters.get("required").size() == 0);
+    assertTrue("Excected some optional parameters for list method for users", parameters.get("optional").contains("filters"));
   }
 
 }
\ No newline at end of file

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list