libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject [libcloud] 01/05: Support GCE instances with no service accounts
Date Sun, 04 Oct 2020 17:09:02 GMT
This is an automated email from the ASF dual-hosted git repository.

tomaz pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/libcloud.git

commit a496af770e91905e286f9565f84acfcabe2db7d5
Author: David Tomaschik <david@systemoverlord.com>
AuthorDate: Fri Oct 2 00:51:42 2020 -0700

    Support GCE instances with no service accounts
    
    This fixes #1497.  When an empty list (`[]`) is passed in for ex_service_accounts,
    a VM with no service accounts is created.  When None is passed in (the default),
    the behavior remains unchanged, giving the default service account.
---
 libcloud/compute/drivers/gce.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libcloud/compute/drivers/gce.py b/libcloud/compute/drivers/gce.py
index ccefa0b..51b7a35 100644
--- a/libcloud/compute/drivers/gce.py
+++ b/libcloud/compute/drivers/gce.py
@@ -4893,7 +4893,7 @@ class GCENodeDriver(NodeDriver):
         :rtype:   ``list`` of ``dict``
         """
         gce_service_accounts = []
-        if not service_accounts:
+        if service_accounts is None:
             gce_service_accounts = [{
                 'email': default_email,
                 'scopes': [self.AUTH_URL + default_scope]


Mime
View raw message