apache/libcloud — pull request #372 by erjohnso (2014-10-10 16:03:38+00:00)
Title: LIBCLOUD-578: GCE adding Service Accounts to create_node

Adding support for user-defined Service Account scopes when creating nodes in the GCE driver. The default for this new paramter is modeled after both the Google Developers Console and Cloud SDK and sets an instance's (node's) default serviceAccount to,

```
[{'email': 'default',
'scopes': ['https://www.googleapis.com/auth/devstorage.read_only']
}]
```

To better match Google tools, short-name aliases as documented in Cloud SDK's `gcloud compute instances create --help` are supported.

Typical usage would likely just use the 'default' email for the Service Account but allow overriding the list of scopes. For example,

```
ex_service_accounts = [{'scopes': ['bigquery','compute-ro', 'pubsub']}]
```

Will map to,

```
[{'email': 'default',
'scopes': [
'https://www.googleapis.com/auth/bigquery',
'https://www.googleapis.com/auth/compute.readonly',
'https://www.googleapis.com/auth/pubsub'
]
}]
```

GCE public docs on this capability are,
https://cloud.google.com/compute/docs/authentication
https://cloud.google.com/compute/docs/reference/latest/instances#resource

/cc @ross-p