From bb9c1815c05335b1904ccf1837041aadbb89ee9d Mon Sep 17 00:00:00 2001 From: Shun Fan Date: Wed, 22 Jul 2015 09:53:59 -0700 Subject: [PATCH 1/2] Reword credential creation in README.md --- storage/storage_transfer/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/storage_transfer/README.md b/storage/storage_transfer/README.md index 2c3f7762ff3f..0dab787d3030 100644 --- a/storage/storage_transfer/README.md +++ b/storage/storage_transfer/README.md @@ -8,7 +8,7 @@ This app creates two types of transfers using the Transfer Service tool. 1. Go to the [Developers Console](https://cloud.google.com/console) and create or select your project. You will need the project ID later. 1. Within Developers Console, select APIs & auth > Credentials. - 1. Add a new JSON key credential for a service account. + 1. Select Add credentials > Service account > JSON key. 1. Set the environment variable GOOGLE_APPLICATION_CREDENTIALS to point to your JSON key. 1. Add the Storage Transfer service account, cloud-mobility@system.gserviceaccount.com as an editor of your project. From fd753e6ade2cd6244fae1710ef0c12e694e8ea23 Mon Sep 17 00:00:00 2001 From: Shun Fan Date: Wed, 22 Jul 2015 10:10:32 -0700 Subject: [PATCH 2/2] Add region tags to exclude the license --- storage/storage_transfer/aws_request.py | 2 ++ storage/storage_transfer/create_client.py | 2 ++ storage/storage_transfer/nearline_request.py | 2 ++ storage/storage_transfer/transfer_check.py | 2 ++ 4 files changed, 8 insertions(+) diff --git a/storage/storage_transfer/aws_request.py b/storage/storage_transfer/aws_request.py index 84714de47934..40274175335a 100644 --- a/storage/storage_transfer/aws_request.py +++ b/storage/storage_transfer/aws_request.py @@ -11,6 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# [START all] import json import logging @@ -66,3 +67,4 @@ def main(): if __name__ == '__main__': main() +# [END all] diff --git a/storage/storage_transfer/create_client.py b/storage/storage_transfer/create_client.py index c5708950918c..c5e0a16434d5 100644 --- a/storage/storage_transfer/create_client.py +++ b/storage/storage_transfer/create_client.py @@ -11,6 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# [START all] import logging from apiclient import discovery @@ -25,3 +26,4 @@ def create_transfer_client(): logging.getLogger().setLevel(logging.DEBUG) credentials = GoogleCredentials.get_application_default() return discovery.build('storagetransfer', 'v1', credentials=credentials) +# [END all] diff --git a/storage/storage_transfer/nearline_request.py b/storage/storage_transfer/nearline_request.py index 2e16b52252e7..d31bc1907200 100644 --- a/storage/storage_transfer/nearline_request.py +++ b/storage/storage_transfer/nearline_request.py @@ -11,6 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# [START all] import json import logging @@ -62,3 +63,4 @@ def main(): if __name__ == '__main__': main() +# [END all] diff --git a/storage/storage_transfer/transfer_check.py b/storage/storage_transfer/transfer_check.py index 5b1029819bb9..7e9055fe49be 100644 --- a/storage/storage_transfer/transfer_check.py +++ b/storage/storage_transfer/transfer_check.py @@ -11,6 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# [START all] import json import logging @@ -42,3 +43,4 @@ def main(): if __name__ == '__main__': main() +# [END all]