From c5cc7ea83a867d3078217b7d692ea78917e22d72 Mon Sep 17 00:00:00 2001 From: orestica Date: Tue, 15 Jul 2014 16:05:43 -0700 Subject: [PATCH 1/2] GCE VM needs the Compute API enabled Added a comment emphasizing that the GCE VM needs to have the Compute API enabled. --- samples/call_compute_service.py | 1 + 1 file changed, 1 insertion(+) diff --git a/samples/call_compute_service.py b/samples/call_compute_service.py index a8e42c6..6d46283 100644 --- a/samples/call_compute_service.py +++ b/samples/call_compute_service.py @@ -1,5 +1,6 @@ # To be used to test GoogleCredentials.get_application_default() # from local machine and GCE. +# The GCE virtual machine needs to have the Compute API enabled. from googleapiclient.discovery import build from oauth2client.client import GoogleCredentials From 0e01b2a0bc680312d86f295db8ff35520d1e3885 Mon Sep 17 00:00:00 2001 From: orestica Date: Tue, 15 Jul 2014 16:22:10 -0700 Subject: [PATCH 2/2] service account + docs link Add reference to service account and a link to more documentation. --- samples/call_compute_service.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/samples/call_compute_service.py b/samples/call_compute_service.py index 6d46283..da9d207 100644 --- a/samples/call_compute_service.py +++ b/samples/call_compute_service.py @@ -1,6 +1,8 @@ # To be used to test GoogleCredentials.get_application_default() # from local machine and GCE. -# The GCE virtual machine needs to have the Compute API enabled. +# The GCE virtual machine needs to have both service account and +# Compute API enabled. +# See: https://developers.google.com/compute/docs/authentication from googleapiclient.discovery import build from oauth2client.client import GoogleCredentials