pycloudlib.gce.util module

Common GCE utils.

exception pycloudlib.gce.util.GceException[source]

Bases: Exception

Represents an error from the GCE API.

__init__

Initialize self. See help(type(self)) for accurate signature.

args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

pycloudlib.gce.util.get_credentials(credentials_path)[source]

Get GCE account credentials.

Try service account credentials first. If those fail, try the environment

pycloudlib.gce.util.raise_on_error(response)[source]

Look for errors in response and raise if found.