Cloud provider for the Google Compute Engine.
See <https://code.google.com/p/google-cloud-platform-samples/source/browse/python-client-library-example/gce.py?repo=compute> for reference.
the OAuth scope for the GCE web API
Cloud provider for the Google Compute Engine.
Parameters: |
|
---|
Retrieves the ip addresses (private and public) from the cloud provider by the given instance id.
Parameters: | instance_id (str) – id of the instance |
---|---|
Returns: | tuple (ip_private, ip_public) |
Raises : | InstanceError if the ip could not be retrieved. |
Check whether the instance is up and running.
Parameters: | instance_id (str) – instance identifier |
---|---|
Reutrn : | True if instance is running, False otherwise |
List instances on GCE, optionally filtering the results.
Parameters: | filter (str) – Filter specification; see https://developers.google.com/compute/docs/reference/latest/instances/list for details. |
---|---|
Returns: | list of instances |
Starts a new instance with the given properties and returns the instance id.
Parameters: |
|
---|---|
Returns: | str - instance id of the started instance |