-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
testingtype: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
For example:
$ rm -r .tox/
$ tox -e system-tests --notest
GLOB sdist-make: /home/tseaver/projects/agendaless/Google/src/google-cloud-python/setup.py
system-tests create: /home/tseaver/projects/agendaless/Google/src/google-cloud-python/.tox/system-tests
system-tests inst: /home/tseaver/projects/agendaless/Google/src/google-cloud-python/.tox/dist/google-cloud-0.20.0.zip
system-tests installed: -f file:///home/tseaver/.pip/wheels,enum34==1.1.6,future==0.15.2,futures==3.0.5,gapic-google-logging-v2==0.10.1,gapic-google-pubsub-v1==0.10.1,google-cloud==0.20.0,google-cloud-bigquery==0.20.0,google-cloud-bigtable==0.20.0,google-cloud-core==0.20.0,google-cloud-datastore==0.20.0,google-cloud-dns==0.20.0,google-cloud-error-reporting==0.20.0,google-cloud-happybase==0.20.0,google-cloud-language==0.20.0,google-cloud-logging==0.20.0,google-cloud-monitoring==0.20.0,google-cloud-pubsub==0.20.0,google-cloud-resource-manager==0.20.0,google-cloud-storage==0.20.0,google-cloud-translate==0.20.0,google-cloud-vision==0.20.0,google-gax==0.14.1,googleapis-common-protos==1.3.5,grpc-google-iam-v1==0.10.1,grpc-google-logging-v2==0.10.1,grpc-google-pubsub-v1==0.10.1,grpcio==1.0.0,httplib2==0.9.2,oauth2client==3.0.0,ply==3.8,protobuf==3.1.0.post1,pyasn1==0.1.9,pyasn1-modules==0.0.8,rsa==3.4.2,six==1.10.0
___________________________________ summary ____________________________________
system-tests: skipped tests
congratulations :)
$ diff -ru .tox/system-tests/lib/python2.7/site-packages/google/cloud/storage/ storage/google/cloud/storage/ --exclude="*.pyc"
diff -ru '--exclude=*.pyc' .tox/system-tests/lib/python2.7/site-packages/google/cloud/storage/blob.py storage/google/cloud/storage/blob.py
--- .tox/system-tests/lib/python2.7/site-packages/google/cloud/storage/blob.py 2016-10-05 18:15:48.724796000 -0400
+++ storage/google/cloud/storage/blob.py 2016-10-05 18:02:55.872830411 -0400
@@ -655,6 +655,32 @@
self.acl.all().grant_read()
self.acl.save(client=client)
+ def compose(self, sources, client=None):
+ """Concatenate source blobs into this one.
+
+ :type sources: list of :class:`Blob`
+ :param sources: blobs whose contents will be composed into this blob.
+
+ :type client: :class:`~google.cloud.storage.client.Client` or
+ ``NoneType``
+ :param client: Optional. The client to use. If not passed, falls back
+ to the ``client`` stored on the blob's bucket.
+
+ :raises: :exc:`ValueError` if this blob does not have its
+ :attr:`content_type` set.
+ """
+ if self.content_type is None:
+ raise ValueError("Destination 'content_type' not set.")
+ client = self._require_client(client)
+ request = {
+ 'sourceObjects': [{'name': source.name} for source in sources],
+ 'destination': self._properties.copy(),
+ }
+ api_response = client.connection.api_request(
+ method='POST', path=self.path + '/compose', data=request,
+ _target_object=self)
+ self._set_properties(api_response)
+
cache_control = _scalar_property('cacheControl')
"""HTTP 'Cache-Control' header for this object.Somehow, the tarball / wheel is being cached.
Metadata
Metadata
Assignees
Labels
testingtype: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.