2755: Let the API server decide the correct collection UUID format.
authorTom Clegg <tom@curoverse.com>
Fri, 30 May 2014 15:06:17 +0000 (11:06 -0400)
committerTom Clegg <tom@curoverse.com>
Fri, 30 May 2014 15:06:17 +0000 (11:06 -0400)
sdk/python/bin/arv-put

index 241ac933e7d6b29df5537476d2afc90612ef2649..39b6b1a88b4fb4ce294de553a69dc7d773ceb3f5 100755 (executable)
@@ -203,25 +203,13 @@ elif args.raw:
     writer.finish_current_stream()
     print string.join(writer.data_locators(), ',')
 else:
-    manifest_locator = writer.finish()
-
-    # The manifest locator is also used as its UUID.  Remove any
-    # signature Keep may have added to the locator; it should not be
-    # considered part of the UUID and will confuse apiserver if the
-    # signature is passed to arvados.api().collections().get().
-    # apiserver will resolve permissions by checking permission links
-    # anyway.
-    # TODO(twp,tomclegg): re-evaluate the value of storing manifests
-    # in Keep at all.
-    manifest_uuid = re.sub(r'\+A[a-z0-9@_-]+', '', manifest_locator)
-
     # Register the resulting collection in Arvados.
-    arvados.api().collections().create(
+    collection = arvados.api().collections().create(
         body={
-            'uuid': manifest_uuid,
+            'uuid': writer.finish(),
             'manifest_text': writer.manifest_text(),
             },
         ).execute()
 
     # Print the locator (uuid) of the new collection.
-    print manifest_uuid
+    print collection['uuid']