You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by to...@apache.org on 2020/10/04 17:09:02 UTC
[libcloud] 01/05: Support GCE instances with no service accounts
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 <da...@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]