libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject [5/6] git commit: Merge branch 'trunk' into LIBCLOUD-625_gce_auth_internal
Date Wed, 22 Oct 2014 07:07:27 GMT
Merge branch 'trunk' into LIBCLOUD-625_gce_auth_internal

Closes #376


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

Branch: refs/heads/trunk
Commit: 91a9be4282485d484a7d1f3b9749db86f442c4f4
Parents: 3a9dcb8 f01509d
Author: Tomaz Muraus <tomaz@apache.org>
Authored: Wed Oct 22 14:05:59 2014 +0800
Committer: Tomaz Muraus <tomaz@apache.org>
Committed: Wed Oct 22 14:05:59 2014 +0800

----------------------------------------------------------------------
 libcloud/compute/drivers/gce.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/91a9be42/libcloud/compute/drivers/gce.py
----------------------------------------------------------------------
diff --cc libcloud/compute/drivers/gce.py
index 648ae3e,7255755..139ab78
--- a/libcloud/compute/drivers/gce.py
+++ b/libcloud/compute/drivers/gce.py
@@@ -583,19 -580,17 +583,19 @@@ class GCENodeDriver(NodeDriver)
          :type     scopes: ``list``
  
          :keyword  credential_file: Path to file for caching authentication
 -                                   information used by GCEConnection
 +                                   information used by GCEConnection.
          :type     credential_file: ``str``
 -
          """
++        if not project:
++            raise ValueError('Project name must be specified using '
++                             '"project" keyword.')
 +
          self.auth_type = auth_type
          self.project = project
          self.scopes = scopes
 -        self.credential_file = credential_file
 -        if not self.project:
 -            raise ValueError('Project name must be specified using '
 -                             '"project" keyword.')
 +        self.credential_file = credential_file or \
 +            '~/.gce_libcloud_auth' + '.' + self.project
 +
-         if not self.project:
-             raise ValueError('Project name must be specified using '
-                              '"project" keyword.')
          super(GCENodeDriver, self).__init__(user_id, key, **kwargs)
  
          # Cache Zone and Region information to reduce API calls and


Mime
View raw message