You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by qu...@apache.org on 2017/09/29 05:28:35 UTC

[1/2] libcloud git commit: BUGFIX: GCE Allow the setting of service account in instance templates/instance properties

Repository: libcloud
Updated Branches:
  refs/heads/trunk 4e42f86bb -> b491c2db3


BUGFIX: GCE Allow the setting of service account in instance templates/instance properties

Signed-off-by: Quentin Pradet <qu...@apache.org>

Closes #1108


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

Branch: refs/heads/trunk
Commit: 11337e2020839a65e0f0102336b614e56d32549b
Parents: 4e42f86
Author: Evan Carter <ev...@iextrading.com>
Authored: Fri Sep 8 08:54:18 2017 -0400
Committer: Quentin Pradet <qu...@apache.org>
Committed: Fri Sep 29 09:23:12 2017 +0400

----------------------------------------------------------------------
 libcloud/compute/drivers/gce.py   | 2 ++
 libcloud/test/compute/test_gce.py | 6 ++++++
 2 files changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/11337e20/libcloud/compute/drivers/gce.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/gce.py b/libcloud/compute/drivers/gce.py
index 737ed24..e5f29e7 100644
--- a/libcloud/compute/drivers/gce.py
+++ b/libcloud/compute/drivers/gce.py
@@ -4474,6 +4474,8 @@ class GCENodeDriver(NodeDriver):
         sa = {}
         if 'email' not in service_account:
             sa['email'] = default_email
+        else:
+            sa['email'] = service_account['email']
 
         if 'scopes' not in service_account:
             sa['scopes'] = [self.AUTH_URL + default_scope]

http://git-wip-us.apache.org/repos/asf/libcloud/blob/11337e20/libcloud/test/compute/test_gce.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_gce.py b/libcloud/test/compute/test_gce.py
index 31a1bce..ef5dcc9 100644
--- a/libcloud/test/compute/test_gce.py
+++ b/libcloud/test/compute/test_gce.py
@@ -214,6 +214,12 @@ class GCENodeDriverTest(GoogleTestCase, TestCaseMixin):
         self.assertTrue('email' in actual)
         self.assertTrue('scopes' in actual)
 
+        input = {'scopes': ['compute-ro'], 'email': 'test@test.com'}
+        actual = self.driver._build_service_account_gce_struct(input)
+        self.assertTrue('email' in actual)
+        self.assertEqual(actual['email'], 'test@test.com')
+        self.assertTrue('scopes' in actual)
+
     def test_build_service_account_gce_list(self):
         # ensure we have a list
         self.assertRaises(ValueError,


[2/2] libcloud git commit: Add changes for #1108

Posted by qu...@apache.org.
Add changes for #1108


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

Branch: refs/heads/trunk
Commit: b491c2db337439e97d1aef8d936ce70af96114c9
Parents: 11337e2
Author: Quentin Pradet <qu...@apache.org>
Authored: Fri Sep 29 09:27:50 2017 +0400
Committer: Quentin Pradet <qu...@apache.org>
Committed: Fri Sep 29 09:27:50 2017 +0400

----------------------------------------------------------------------
 CHANGES.rst | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/b491c2db/CHANGES.rst
----------------------------------------------------------------------
diff --git a/CHANGES.rst b/CHANGES.rst
index 7ba1806..6ab3db6 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -31,6 +31,9 @@ Compute
 - [ARM] Fix error when using SSH key auth with Python 3 (GITHUB-1098)
   [Sameh Elsharkawy]
 
+- [GCE] Allow setting service account in instance templates (LIBCLOUD-947, GITHUB-1108)
+  [Evan Carter]
+
 Changes in Apache Libcloud 2.2.1
 --------------------------------