From 0fddf2e7d6e8f9f5f7936ae5fae781581d3bffb1 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 24 Apr 2020 20:11:07 +0530 Subject: [PATCH 1/3] docs(storage): add samples for file archive generation and cors configuration --- storage/cloud-client/snippets_test.py | 63 +++++++++++++++++++ .../storage_change_default_storage_class.py | 40 ++++++++++++ .../storage_change_file_storage_class.py | 42 +++++++++++++ .../storage_copy_file_archived_generation.py | 63 +++++++++++++++++++ .../storage_cors_configuration.py | 48 ++++++++++++++ ...storage_delete_file_archived_generation.py | 40 ++++++++++++ .../storage_list_file_archived_generations.py | 39 ++++++++++++ .../storage_remove_cors_configuration.py | 39 ++++++++++++ 8 files changed, 374 insertions(+) create mode 100644 storage/cloud-client/storage_change_default_storage_class.py create mode 100644 storage/cloud-client/storage_change_file_storage_class.py create mode 100644 storage/cloud-client/storage_copy_file_archived_generation.py create mode 100644 storage/cloud-client/storage_cors_configuration.py create mode 100644 storage/cloud-client/storage_delete_file_archived_generation.py create mode 100644 storage/cloud-client/storage_list_file_archived_generations.py create mode 100644 storage/cloud-client/storage_remove_cors_configuration.py diff --git a/storage/cloud-client/snippets_test.py b/storage/cloud-client/snippets_test.py index 31cec838354..0e45dc7b594 100644 --- a/storage/cloud-client/snippets_test.py +++ b/storage/cloud-client/snippets_test.py @@ -42,6 +42,13 @@ import storage_generate_upload_signed_url_v4 import storage_generate_signed_post_policy_v4 import storage_set_bucket_default_kms_key +import storage_cors_configuration +import storage_remove_cors_configuration +import storage_list_file_archived_generations +import storage_delete_file_archived_generation +import storage_change_default_storage_class +import storage_change_file_storage_class +import storage_copy_file_archived_generation KMS_KEY = os.environ["CLOUD_KMS_KEY"] @@ -249,3 +256,59 @@ def test_copy_blob(test_blob): assert bucket.get_blob("test_copy_blob") is not None assert bucket.get_blob(test_blob.name) is not None + + +def test_cors_configuration(test_bucket, capsys): + bucket = storage_cors_configuration.cors_configuration(test_bucket) + out, _ = capsys.readouterr() + assert "Set CORS policies for bucket" in out + assert len(bucket.cors) > 0 + + bucket = storage_remove_cors_configuration.remove_cors_configuration(test_bucket) + out, _ = capsys.readouterr() + assert "Remove CORS policies for bucket" in out + assert len(bucket.cors) == 0 + + +def test_list_blobs_archived_generation(test_blob, capsys): + storage_list_file_archived_generations.list_file_archived_generations(test_blob.bucket.name) + out, _ = capsys.readouterr() + assert str(test_blob.generation) in out + + +def test_delete_blobs_archived_generation(test_blob, capsys): + storage_delete_file_archived_generation.delete_file_archived_generation(test_blob.bucket.name, test_blob.name, + test_blob.generation) + out, _ = capsys.readouterr() + assert "blob " + test_blob.name + " was deleted" in out + assert test_blob.bucket.get_blob(test_blob.name, generation=test_blob.generation) is None + + +def test_change_default_storage_class(test_bucket, capsys): + bucket = storage_change_default_storage_class.change_default_storage_class(test_bucket) + out, _ = capsys.readouterr() + assert "Default storage class for bucket" in out + assert bucket.storage_class == 'COLDLINE' + + +def test_change_file_storage_class(test_blob, capsys): + blob = storage_change_file_storage_class.change_file_storage_class(test_blob.bucket.name, test_blob.name) + out, _ = capsys.readouterr() + assert "Blob {} in bucket {}". format(blob.name, blob.bucket.name) in out + assert blob.storage_class == 'NEARLINE' + + +def test_copy_file_archived_generation(test_blob): + bucket = storage.Client().bucket(test_blob.bucket.name) + + try: + bucket.delete_blob("test_copy_blob") + except google.cloud.exceptions.NotFound: + pass + + storage_copy_file_archived_generation.copy_file_archived_generation( + bucket.name, test_blob.name, bucket.name, "test_copy_blob", test_blob.generation + ) + + assert bucket.get_blob("test_copy_blob") is not None + assert bucket.get_blob(test_blob.name) is not None diff --git a/storage/cloud-client/storage_change_default_storage_class.py b/storage/cloud-client/storage_change_default_storage_class.py new file mode 100644 index 00000000000..3e05a22eef2 --- /dev/null +++ b/storage/cloud-client/storage_change_default_storage_class.py @@ -0,0 +1,40 @@ +#!/usr/bin/env python + +# Copyright 2020 Google Inc. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the 'License'); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import sys + +# [START storage_change_default_storage_class] +from google.cloud import storage +from google.cloud.storage import constants + + +def change_default_storage_class(bucket_name): + """Change the default storage class of the bucket""" + # bucket_name = "your-bucket-name" + + storage_client = storage.Client() + + bucket = storage_client.get_bucket(bucket_name) + bucket.storage_class = constants.COLDLINE_STORAGE_CLASS + bucket.patch() + + print("Default storage class for bucket {} has been set to {}".format(bucket_name, bucket.storage_class)) + return bucket + +# [END storage_change_default_storage_class] + +if __name__ == "__main__": + change_default_storage_class(bucket_name=sys.argv[1]) \ No newline at end of file diff --git a/storage/cloud-client/storage_change_file_storage_class.py b/storage/cloud-client/storage_change_file_storage_class.py new file mode 100644 index 00000000000..c2620ed4f7a --- /dev/null +++ b/storage/cloud-client/storage_change_file_storage_class.py @@ -0,0 +1,42 @@ +#!/usr/bin/env python + +# Copyright 2020 Google Inc. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the 'License'); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import sys + +# [START storage_change_file_storage_class] +from google.cloud import storage +from google.cloud.storage import constants + + +def change_file_storage_class(bucket_name, blob_name): + """Change the default storage class of the blob""" + # bucket_name = "your-bucket-name" + # blob_name = "your-object-name" + + storage_client = storage.Client() + + bucket = storage_client.get_bucket(bucket_name) + blob = bucket.get_blob(blob_name) + blob.update_storage_class(constants.NEARLINE_STORAGE_CLASS) + + print("Blob {} in bucket {} had its storage class set to {}. ".format(blob_name, bucket_name, blob.storage_class)) + return blob + + +# [START storage_change_file_storage_class] + +if __name__ == "__main__": + change_file_storage_class(bucket_name=sys.argv[1], blob_name=sys.argv[2]) diff --git a/storage/cloud-client/storage_copy_file_archived_generation.py b/storage/cloud-client/storage_copy_file_archived_generation.py new file mode 100644 index 00000000000..6fb5b36eed9 --- /dev/null +++ b/storage/cloud-client/storage_copy_file_archived_generation.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python + +# Copyright 2020 Google Inc. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the 'License'); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import sys + +# [START storage_copy_file_archived_generation] +from google.cloud import storage + + +def copy_file_archived_generation( + bucket_name, blob_name, destination_bucket_name, destination_blob_name, generation +): + """Copies a blob from one bucket to another with a new name with the same generation.""" + # bucket_name = "your-bucket-name" + # blob_name = "your-object-name" + # destination_bucket_name = "destination-bucket-name" + # destination_blob_name = "destination-object-name" + # generation = 1579287380533984 + + storage_client = storage.Client() + + source_bucket = storage_client.bucket(bucket_name) + source_blob = source_bucket.blob(blob_name) + destination_bucket = storage_client.bucket(destination_bucket_name) + + blob_copy = source_bucket.copy_blob( + source_blob, destination_bucket, destination_blob_name, source_generation=generation + ) + + print( + "Generation {} of the Blob {} in bucket {} copied to blob {} in bucket {}.".format( + source_blob.generation, + source_blob.name, + source_bucket.name, + blob_copy.name, + destination_bucket.name, + ) + ) + + +# [END storage_copy_file_archived_generation] + +if __name__ == "__main__": + copy_file_archived_generation( + bucket_name=sys.argv[1], + blob_name=sys.argv[2], + destination_bucket_name=sys.argv[3], + destination_blob_name=sys.argv[4], + generation=sys.argv[5] + ) diff --git a/storage/cloud-client/storage_cors_configuration.py b/storage/cloud-client/storage_cors_configuration.py new file mode 100644 index 00000000000..0fb78459624 --- /dev/null +++ b/storage/cloud-client/storage_cors_configuration.py @@ -0,0 +1,48 @@ +#!/usr/bin/env python + +# Copyright 2020 Google Inc. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the 'License'); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import sys + +# [START storage_cors_configuration] +from google.cloud import storage + + +def cors_configuration(bucket_name): + """Set a bucket's CORS policies configuration.""" + # bucket_name = "your-bucket-name" + + storage_client = storage.Client() + bucket = storage_client.get_bucket(bucket_name) + bucket.cors = [ + { + "origin": ["*"], + "responseHeader": [ + "Content-Type", + "x-goog-resumable"], + "method": ['PUT', 'POST'], + "maxAgeSeconds": 3600 + } + ] + bucket.patch() + + print("Set CORS policies for bucket {} is {}".format(bucket.name, bucket.cors)) + return bucket + + +# [END storage_cors_configuration] + +if __name__ == "__main__": + cors_configuration(bucket_name=sys.argv[1]) diff --git a/storage/cloud-client/storage_delete_file_archived_generation.py b/storage/cloud-client/storage_delete_file_archived_generation.py new file mode 100644 index 00000000000..13fcd219991 --- /dev/null +++ b/storage/cloud-client/storage_delete_file_archived_generation.py @@ -0,0 +1,40 @@ +#!/usr/bin/env python + +# Copyright 2020 Google Inc. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the 'License'); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import sys + +# [START storage_delete_file_archived_generation] +from google.cloud import storage + + +def delete_file_archived_generation(bucket_name, blob_name, generation): + """Delete a blob in the bucket with the given generation.""" + # bucket_name = "your-bucket-name" + # blob_name = "your-object-name" + # generation = 1579287380533984 + + storage_client = storage.Client() + + bucket = storage_client.get_bucket(bucket_name) + bucket.delete_blob(blob_name, generation=generation) + print("Generation {} of blob {} was deleted from ".format(generation, blob_name, bucket_name)) + + +# [END storage_delete_file_archived_generation] + + +if __name__ == "__main__": + delete_file_archived_generation(bucket_name=sys.argv[1], blob_name=sys.argv[2], generation=sys.argv[3]) diff --git a/storage/cloud-client/storage_list_file_archived_generations.py b/storage/cloud-client/storage_list_file_archived_generations.py new file mode 100644 index 00000000000..3a5e19c02d7 --- /dev/null +++ b/storage/cloud-client/storage_list_file_archived_generations.py @@ -0,0 +1,39 @@ +#!/usr/bin/env python + +# Copyright 2020 Google Inc. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the 'License'); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import sys + +# [START storage_list_file_archived_generations] +from google.cloud import storage + + +def list_file_archived_generations(bucket_name): + """Lists all the blobs in the bucket with generation.""" + # bucket_name = "your-bucket-name" + + storage_client = storage.Client() + + blobs = storage_client.list_blobs(bucket_name) + + for blob in blobs: + print(blob.name + "," + str(blob.generation)) + + +# [END storage_list_file_archived_generations] + + +if __name__ == "__main__": + list_file_archived_generations(bucket_name=sys.argv[1]) diff --git a/storage/cloud-client/storage_remove_cors_configuration.py b/storage/cloud-client/storage_remove_cors_configuration.py new file mode 100644 index 00000000000..a3ba3d5b3c8 --- /dev/null +++ b/storage/cloud-client/storage_remove_cors_configuration.py @@ -0,0 +1,39 @@ +#!/usr/bin/env python + +# Copyright 2020 Google Inc. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the 'License'); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import sys + +# [START storage_remove_cors_configuration] +from google.cloud import storage + + +def remove_cors_configuration(bucket_name): + """Remove a bucket's CORS policies configuration.""" + # bucket_name = "your-bucket-name" + + storage_client = storage.Client() + bucket = storage_client.get_bucket(bucket_name) + bucket.cors = [] + bucket.patch() + + print("Remove CORS policies for bucket {}.".format(bucket.name)) + return bucket + + +# [END storage_remove_cors_configuration] + +if __name__ == "__main__": + remove_cors_configuration(bucket_name=sys.argv[1]) From 5214f8a4035a6909f7da9cadbc8d3166278046ae Mon Sep 17 00:00:00 2001 From: HemangChothani Date: Wed, 29 Apr 2020 19:55:21 +0530 Subject: [PATCH 2/3] docs(storage): nit --- storage/cloud-client/snippets_test.py | 20 +++++++++++++------ .../storage_change_default_storage_class.py | 3 ++- .../storage_change_file_storage_class.py | 8 +++++++- .../storage_copy_file_archived_generation.py | 2 +- ...storage_delete_file_archived_generation.py | 12 +++++++++-- .../storage_list_file_archived_generations.py | 2 +- 6 files changed, 35 insertions(+), 12 deletions(-) diff --git a/storage/cloud-client/snippets_test.py b/storage/cloud-client/snippets_test.py index 0e45dc7b594..ca9074fd795 100644 --- a/storage/cloud-client/snippets_test.py +++ b/storage/cloud-client/snippets_test.py @@ -271,28 +271,36 @@ def test_cors_configuration(test_bucket, capsys): def test_list_blobs_archived_generation(test_blob, capsys): - storage_list_file_archived_generations.list_file_archived_generations(test_blob.bucket.name) + storage_list_file_archived_generations.list_file_archived_generations( + test_blob.bucket.name + ) out, _ = capsys.readouterr() assert str(test_blob.generation) in out def test_delete_blobs_archived_generation(test_blob, capsys): - storage_delete_file_archived_generation.delete_file_archived_generation(test_blob.bucket.name, test_blob.name, - test_blob.generation) + storage_delete_file_archived_generation.delete_file_archived_generation( + test_blob.bucket.name, test_blob.name, test_blob.generation + ) out, _ = capsys.readouterr() assert "blob " + test_blob.name + " was deleted" in out - assert test_blob.bucket.get_blob(test_blob.name, generation=test_blob.generation) is None + blob = test_blob.bucket.get_blob(test_blob.name, generation=test_blob.generation) + assert blob is None def test_change_default_storage_class(test_bucket, capsys): - bucket = storage_change_default_storage_class.change_default_storage_class(test_bucket) + bucket = storage_change_default_storage_class.change_default_storage_class( + test_bucket + ) out, _ = capsys.readouterr() assert "Default storage class for bucket" in out assert bucket.storage_class == 'COLDLINE' def test_change_file_storage_class(test_blob, capsys): - blob = storage_change_file_storage_class.change_file_storage_class(test_blob.bucket.name, test_blob.name) + blob = storage_change_file_storage_class.change_file_storage_class( + test_blob.bucket.name, test_blob.name + ) out, _ = capsys.readouterr() assert "Blob {} in bucket {}". format(blob.name, blob.bucket.name) in out assert blob.storage_class == 'NEARLINE' diff --git a/storage/cloud-client/storage_change_default_storage_class.py b/storage/cloud-client/storage_change_default_storage_class.py index 3e05a22eef2..4fe870c70ea 100644 --- a/storage/cloud-client/storage_change_default_storage_class.py +++ b/storage/cloud-client/storage_change_default_storage_class.py @@ -34,7 +34,8 @@ def change_default_storage_class(bucket_name): print("Default storage class for bucket {} has been set to {}".format(bucket_name, bucket.storage_class)) return bucket + # [END storage_change_default_storage_class] if __name__ == "__main__": - change_default_storage_class(bucket_name=sys.argv[1]) \ No newline at end of file + change_default_storage_class(bucket_name=sys.argv[1]) diff --git a/storage/cloud-client/storage_change_file_storage_class.py b/storage/cloud-client/storage_change_file_storage_class.py index c2620ed4f7a..f8075081503 100644 --- a/storage/cloud-client/storage_change_file_storage_class.py +++ b/storage/cloud-client/storage_change_file_storage_class.py @@ -32,7 +32,13 @@ def change_file_storage_class(bucket_name, blob_name): blob = bucket.get_blob(blob_name) blob.update_storage_class(constants.NEARLINE_STORAGE_CLASS) - print("Blob {} in bucket {} had its storage class set to {}. ".format(blob_name, bucket_name, blob.storage_class)) + print( + "Blob {} in bucket {} had its storage class set to {}".format( + blob_name, + bucket_name, + blob.storage_class + ) + ) return blob diff --git a/storage/cloud-client/storage_copy_file_archived_generation.py b/storage/cloud-client/storage_copy_file_archived_generation.py index 6fb5b36eed9..6a97c010ebe 100644 --- a/storage/cloud-client/storage_copy_file_archived_generation.py +++ b/storage/cloud-client/storage_copy_file_archived_generation.py @@ -41,7 +41,7 @@ def copy_file_archived_generation( ) print( - "Generation {} of the Blob {} in bucket {} copied to blob {} in bucket {}.".format( + "Generation {} of the blob {} in bucket {} copied to blob {} in bucket {}.".format( source_blob.generation, source_blob.name, source_bucket.name, diff --git a/storage/cloud-client/storage_delete_file_archived_generation.py b/storage/cloud-client/storage_delete_file_archived_generation.py index 13fcd219991..62ddd71681c 100644 --- a/storage/cloud-client/storage_delete_file_archived_generation.py +++ b/storage/cloud-client/storage_delete_file_archived_generation.py @@ -30,11 +30,19 @@ def delete_file_archived_generation(bucket_name, blob_name, generation): bucket = storage_client.get_bucket(bucket_name) bucket.delete_blob(blob_name, generation=generation) - print("Generation {} of blob {} was deleted from ".format(generation, blob_name, bucket_name)) + print( + "Generation {} of blob {} was deleted from {}".format( + generation, blob_name, bucket_name + ) + ) # [END storage_delete_file_archived_generation] if __name__ == "__main__": - delete_file_archived_generation(bucket_name=sys.argv[1], blob_name=sys.argv[2], generation=sys.argv[3]) + delete_file_archived_generation( + bucket_name=sys.argv[1], + blob_name=sys.argv[2], + generation=sys.argv[3] + ) diff --git a/storage/cloud-client/storage_list_file_archived_generations.py b/storage/cloud-client/storage_list_file_archived_generations.py index 3a5e19c02d7..d0370c9990c 100644 --- a/storage/cloud-client/storage_list_file_archived_generations.py +++ b/storage/cloud-client/storage_list_file_archived_generations.py @@ -29,7 +29,7 @@ def list_file_archived_generations(bucket_name): blobs = storage_client.list_blobs(bucket_name) for blob in blobs: - print(blob.name + "," + str(blob.generation)) + print("{},{}".format(blob.name, blob.generation)) # [END storage_list_file_archived_generations] From 4d74c7e15a5761046216a8bf511da3446fa42011 Mon Sep 17 00:00:00 2001 From: HemangChothani Date: Tue, 19 May 2020 11:42:54 +0530 Subject: [PATCH 3/3] docs(storage): nit --- storage/cloud-client/storage_change_default_storage_class.py | 2 +- storage/cloud-client/storage_change_file_storage_class.py | 2 +- storage/cloud-client/storage_copy_file_archived_generation.py | 2 +- storage/cloud-client/storage_cors_configuration.py | 2 +- storage/cloud-client/storage_delete_file_archived_generation.py | 2 +- storage/cloud-client/storage_list_file_archived_generations.py | 2 +- storage/cloud-client/storage_remove_cors_configuration.py | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/storage/cloud-client/storage_change_default_storage_class.py b/storage/cloud-client/storage_change_default_storage_class.py index 4fe870c70ea..8a72719bad3 100644 --- a/storage/cloud-client/storage_change_default_storage_class.py +++ b/storage/cloud-client/storage_change_default_storage_class.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright 2020 Google Inc. All Rights Reserved. +# Copyright 2020 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. diff --git a/storage/cloud-client/storage_change_file_storage_class.py b/storage/cloud-client/storage_change_file_storage_class.py index f8075081503..d0d9b45e843 100644 --- a/storage/cloud-client/storage_change_file_storage_class.py +++ b/storage/cloud-client/storage_change_file_storage_class.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright 2020 Google Inc. All Rights Reserved. +# Copyright 2020 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. diff --git a/storage/cloud-client/storage_copy_file_archived_generation.py b/storage/cloud-client/storage_copy_file_archived_generation.py index 6a97c010ebe..988ebcbebd8 100644 --- a/storage/cloud-client/storage_copy_file_archived_generation.py +++ b/storage/cloud-client/storage_copy_file_archived_generation.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright 2020 Google Inc. All Rights Reserved. +# Copyright 2020 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. diff --git a/storage/cloud-client/storage_cors_configuration.py b/storage/cloud-client/storage_cors_configuration.py index 0fb78459624..3d2595a9ddb 100644 --- a/storage/cloud-client/storage_cors_configuration.py +++ b/storage/cloud-client/storage_cors_configuration.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright 2020 Google Inc. All Rights Reserved. +# Copyright 2020 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. diff --git a/storage/cloud-client/storage_delete_file_archived_generation.py b/storage/cloud-client/storage_delete_file_archived_generation.py index 62ddd71681c..4e490900100 100644 --- a/storage/cloud-client/storage_delete_file_archived_generation.py +++ b/storage/cloud-client/storage_delete_file_archived_generation.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright 2020 Google Inc. All Rights Reserved. +# Copyright 2020 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. diff --git a/storage/cloud-client/storage_list_file_archived_generations.py b/storage/cloud-client/storage_list_file_archived_generations.py index d0370c9990c..a496ed6ad55 100644 --- a/storage/cloud-client/storage_list_file_archived_generations.py +++ b/storage/cloud-client/storage_list_file_archived_generations.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright 2020 Google Inc. All Rights Reserved. +# Copyright 2020 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. diff --git a/storage/cloud-client/storage_remove_cors_configuration.py b/storage/cloud-client/storage_remove_cors_configuration.py index a3ba3d5b3c8..48ee7433856 100644 --- a/storage/cloud-client/storage_remove_cors_configuration.py +++ b/storage/cloud-client/storage_remove_cors_configuration.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright 2020 Google Inc. All Rights Reserved. +# Copyright 2020 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License.