12960: Update documentation.
authorPeter Amstutz <pamstutz@veritasgenetics.com>
Fri, 8 Jun 2018 14:13:03 +0000 (10:13 -0400)
committerPeter Amstutz <pamstutz@veritasgenetics.com>
Fri, 8 Jun 2018 14:23:14 +0000 (10:23 -0400)
Also allow "properties" to be updated on committed container
requests (bugfix implementation to match documented behavior).

Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz@veritasgenetics.com>

doc/api/methods.html.textile.liquid
doc/api/methods/container_requests.html.textile.liquid
doc/api/methods/links.html.textile.liquid
doc/api/methods/nodes.html.textile.liquid
services/api/app/models/container_request.rb

index 00c120d9f8f1be4aad90022b514fe37024618dc3..937ae706d66295055ffbca485c1b587bc5c40739 100644 (file)
@@ -98,7 +98,7 @@ table(table table-bordered table-condensed).
 |@is_a@|string|Arvados object type|@["head_uuid","is_a","arvados#collection"]@|
 |@exists@|string|Test if a subproperty is present.|@["properties","exists","my_subproperty"]@|
 
-h4. Filtering on subproperties
+h4(#subpropertyfilters). Filtering on subproperties
 
 Some record type have an additional @properties@ attribute that allows recording and filtering on additional key-value pairs.  To filter on a subproperty, the value in the @attribute@ position has the form @properties.user_property@.  You may also use JSON-LD / RDF style URIs for property keys by enclosing them in @<...>@ for example @properties.<http://example.com/user_property>@.  Alternately you may also provide a JSON-LD "@context" field, however at this time JSON-LD contexts are not interpreted by Arvados.
 
index 1c2550f723f5d8d96241ff12b9d5c09cf136e512..0e2e8ce7c6135490e61585594471080ce1ae1719 100644 (file)
@@ -29,7 +29,7 @@ table(table table-bordered table-condensed).
 |_. Attribute|_. Type|_. Description|_. Notes|
 |name|string|The name of the container_request.||
 |description|string|The description of the container_request.||
-|properties|hash|Client-defined structured data that does not affect how the container is run.||
+|properties|hash|User-defined metadata that does not affect how the container is run.  May be used in queries using "subproperty filters":{{site.baseurl}}/api/methods.html#subpropertyfilters||
 |state|string|The allowed states are "Uncommitted", "Committed", and "Final".|Once a request is Committed, the only attributes that can be modified are priority, container_uuid, and container_count_max. A request in the "Final" state cannot have any of its functional parts modified (i.e., only name, description, and properties fields can be modified).|
 |requesting_container_uuid|string|The uuid of the parent container that created this container_request, if any. Represents a process tree.|The priority of this container_request is inherited from the parent container, if the parent container is cancelled, this container_request will be cancelled as well.|
 |container_uuid|string|The uuid of the container that satisfies this container_request. The system may return a preexisting Container that matches the container request criteria. See "Container reuse":#container_reuse for more details.|Container reuse is the default behavior, but may be disabled with @use_existing: false@ to always create a new container.|
index ec5d53010456bb36e239927bcdb563f1c6467e7e..04643443e680e4170df952aeb802f3dcf4eea9c7 100644 (file)
@@ -29,7 +29,7 @@ table(table table-bordered table-condensed).
 |tail_uuid|string|The origin or actor in the description or action (may be null).|
 |link_class|string|Type of link|
 |name|string|Primary value of the link.|
-|properties|hash|Additional information, expressed as a key&rarr;value hash. Key: string. Value: string, number, array, or hash.|
+|properties|hash|Additional information, expressed as a key&rarr;value hash. Key: string. Value: string, number, array, or hash.  May be used in queries using "subproperty filters":{{site.baseurl}}/api/methods.html#subpropertyfilters|
 
 h2. Link classes
 
index 1b51f01c632ff1e4387d94355f5c6138ec01504f..7ddc62519c1922ad48a254827078f7b0651065ea 100644 (file)
@@ -32,7 +32,8 @@ table(table table-bordered table-condensed).
 |job_uuid|string|The UUID of the job that this node is assigned to work on.  If you do not have permission to read the job, this will be null.||
 |first_ping_at|datetime|||
 |last_ping_at|datetime|||
-|info|hash|||
+|info|hash|Sensitive information about the node (only visible to admin) such as 'ping_secret' and 'ec2_instance_id'. May be used in queries using "subproperty filters":{{site.baseurl}}/api/methods.html#subpropertyfilters||
+|properties|hash|Public information about the node, such as 'total_cpu_cores', 'total_ram_mb', and 'total_scratch_mb'.  May be used in queries using "subproperty filters":{{site.baseurl}}/api/methods.html#subpropertyfilters||
 
 h2. Methods
 
index b4d1a414578d8fdd5f988d55f8890567ed729f1a..93fae73a5a797b738c4b5d2fafe225007fcc70ef 100644 (file)
@@ -83,10 +83,10 @@ class ContainerRequest < ArvadosModel
     Committed => [Final]
   }
 
-  AttrsPermittedAlways = [:owner_uuid, :state, :name, :description]
+  AttrsPermittedAlways = [:owner_uuid, :state, :name, :description, :properties]
   AttrsPermittedBeforeCommit = [:command, :container_count_max,
   :container_image, :cwd, :environment, :filters, :mounts,
-  :output_path, :priority, :properties,
+  :output_path, :priority,
   :runtime_constraints, :state, :container_uuid, :use_existing,
   :scheduling_parameters, :secret_mounts, :output_name, :output_ttl]