closes #11823
authorradhika <radhika@curoverse.com>
Wed, 21 Jun 2017 14:16:13 +0000 (10:16 -0400)
committerradhika <radhika@curoverse.com>
Wed, 21 Jun 2017 14:16:13 +0000 (10:16 -0400)
Merge branch '11823-collection-lifecycle-doc'

Arvados-DCO-1.1-Signed-off-by: Radhika Chippada <radhika@curoverse.com>

doc/_config.yml
doc/images/trash-button-topnav.png [new file with mode: 0644]
doc/user/tutorials/tutorial-keep-collection-lifecycle.html.textile.liquid [new file with mode: 0644]

index 55edc3d3a293e5bc2916dc8141cc39f6dca96659..3c4bb96a3c0adbb48d3a979ad2ff738ca3185b28 100644 (file)
@@ -40,6 +40,7 @@ navbar:
     - Working with data sets:
       - user/tutorials/tutorial-keep.html.textile.liquid
       - user/tutorials/tutorial-keep-get.html.textile.liquid
+      - user/tutorials/tutorial-keep-collection-lifecycle.html.textile.liquid
       - user/tutorials/tutorial-keep-mount.html.textile.liquid
       - user/topics/keep.html.textile.liquid
       - user/topics/arv-copy.html.textile.liquid
diff --git a/doc/images/trash-button-topnav.png b/doc/images/trash-button-topnav.png
new file mode 100644 (file)
index 0000000..d266437
Binary files /dev/null and b/doc/images/trash-button-topnav.png differ
diff --git a/doc/user/tutorials/tutorial-keep-collection-lifecycle.html.textile.liquid b/doc/user/tutorials/tutorial-keep-collection-lifecycle.html.textile.liquid
new file mode 100644 (file)
index 0000000..1bc775a
--- /dev/null
@@ -0,0 +1,66 @@
+---
+layout: default
+navsection: userguide
+title: "Keep collection lifecycle"
+...
+
+During it's lifetime, a keep collection can be in various states. These states are *persisted*, *expiring*, *trashed*  and *permanently deleted*.
+
+A collection is *expiring* when it has a *trash_at* time in the future. An expiring collection can be accessed as normal, but is scheduled to be trashed automatically at the *trash_at* time.
+
+A collection is *trashed* when it has a *trash_at* time in the past. The *is_trashed* attribute will also be "true". The delete operation immediately puts the collection in the trash by setting the *trash_at* time to "now". Once trashed, the collection is no longer readable through normal data access APIs. The collection will have *delete_at* set to some time in the future. The trashed collection is recoverable until the delete_at time passes, at which point the collection is permanently deleted.
+
+# "*Collection lifecycle attributes*":#collection_attributes
+# "*Deleting / trashing collections*":#delete-collection
+# "*Recovering trashed collections*":#trash-recovery
+
+{% include 'tutorial_expectations' %}
+
+h2(#collection_attributes). Collection lifecycle attributes
+
+As listed above the attributes that are used to manage a collection lifecycle are it's *is_trashed*, *trash_at*, and *delete_at*. The table below lists the values of these attributes and how they influence the state of a collection and it's accessibility.
+
+table(table table-bordered table-condensed).
+|_. collection state|_. is_trashed|_. trash_at|_. delete_at|_. get|_. index|_. index?include_trash=true|_. can be modified|
+|persisted collection|false |null |null |yes |yes |yes |yes |
+|expiring collection|false |future |future |yes  |yes |yes |yes |
+|trashed collection|true |past |future |no |no |yes |only is_trashed, trash_at and delete_at attribtues|
+|deleted collection|true|past |past |no |no |no |no |
+
+h2(#delete-collection). Deleting / trashing collections
+
+A collection can be deleted using either the arv command line tool or the workbench.
+
+h3. Trashing a collection using arv command line tool
+
+<pre>
+arv collection delete --uuid=qr1hi-4zz18-xxxxxxxxxxxxxxx
+</pre>
+
+h3. Trashing a collection using workbench
+
+To trash a collection using workbench, go to the Data collections tab in the project, and use the trash icon for this collection row.
+
+h2(#trash-recovery). Recovering trashed collections
+
+A collection can be un-trashed / recovered using either the arv command line tool or the workbench.
+
+h3. Un-trashing a collection using arv command line tool
+
+You can list the trashed collections using the index command.
+
+<pre>
+arv collection index --include-trash=true --filters '[["is_trashed", "=", "true"]]'
+</pre>
+
+You can then untrash a particular collection using arv using it's uuid.
+
+<pre>
+arv collection untrash --uuid=qr1hi-4zz18-xxxxxxxxxxxxxxx
+</pre>
+
+h3. Un-trashing a collection using workbench
+
+To untrash a collection using workbench, go to trash page on workbench by clicking on the "Trash" icon in the top navigation in workbench and use the recycle icon or selection dropdown option.
+
+!{display: block;margin-left: 25px;margin-right: auto;border:1px solid lightgray;}{{ site.baseurl }}/images/trash-button-topnav.png!