[google] Allow for old and new style service account client email address

Closes LIBCLOUD-785


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/22093a6a
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/22093a6a
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/22093a6a

Branch: refs/heads/0.20.1
Commit: 22093a6a55a73274be263567effbe1af577e22c7
Parents: 302b9bb
Author: Eric Johnson <erjoh...@google.com>
Authored: Fri Dec 18 23:57:47 2015 +0000
Committer: Eric Johnson <erjoh...@google.com>
Committed: Fri Jan 15 15:23:25 2016 +0000

----------------------------------------------------------------------
 CHANGES.rst               | 4 ++++
 libcloud/common/google.py | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/22093a6a/CHANGES.rst
----------------------------------------------------------------------
diff --git a/CHANGES.rst b/CHANGES.rst
index c70933e..250869c 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -30,6 +30,10 @@ General
 Compute
 ~~~~~~~
 
+- [google] Allow for old and new style service account client email address
+  (LIBCLOUD-785)
+  [Hoang Phan]
+
 - Removed DreamHosts Compute Driver, DreamHosts users will now use the 
OpenStack Node driver since DreamHosts are OpenStack
   API compliant
   (GITHUB-655)

http://git-wip-us.apache.org/repos/asf/libcloud/blob/22093a6a/libcloud/common/google.py
----------------------------------------------------------------------
diff --git a/libcloud/common/google.py b/libcloud/common/google.py
index e29451f..0a8a476 100644
--- a/libcloud/common/google.py
+++ b/libcloud/common/google.py
@@ -607,7 +607,7 @@ class GoogleAuthType(object):
 
     @staticmethod
     def _is_sa(user_id):
-        return user_id.endswith('@developer.gserviceaccount.com')
+        return user_id.endswith('.gserviceaccount.com')
 
 
 class GoogleBaseConnection(ConnectionUserAndKey, PollingConnection):

Reply via email to