fluxcloud.main.cloud.google package

Submodules

fluxcloud.main.cloud.google.client module

class fluxcloud.main.cloud.google.client.GoogleCloud(**kwargs)[source]

Bases: fluxcloud.main.cloud.base.CloudProvider

A Google Cloud provider wrapper

We allow the client init to proceed given authentication is not possible as it can provide data served from a cache, wrapping available instances.

instances()[source]

Use the API to retrieve (and return) instances within a set of regions.

load_instances(data)[source]

Load instance data from json.

load_prices(data)[source]

Load prices data from json instal class

name = 'google'
prices()[source]

Use the API to retrieve and return prices to cache.

fluxcloud.main.cloud.google.instance module

class fluxcloud.main.cloud.google.instance.GoogleCloudInstance(items)[source]

Bases: fluxcloud.main.cloud.base.Instance

attr_cpus()[source]

Number of cpus the instance has.

attr_free_tier()[source]

Determine if an instance is free tier. https://cloud.google.com/free/docs/free-cloud-features#compute

This is a best effort ESTIMATION based on the name of the instance, saying it _could_ be free tier but isn’t necessarily if you’ve used your monthly allowance. We will want to add that preamble somewhere.

attr_gpu()[source]

Determine if an instance can support gpu

https://cloud.google.com/compute/docs/gpus

To run NVIDIA A100 GPUs, you must use the accelerator-optimized (A2) machine type.

attr_gpus()[source]

Determine number of gpus an instance can support.

https://cloud.google.com/compute/docs/gpus

To run NVIDIA A100 GPUs, you must use the accelerator-optimized (A2) machine type.

attr_ipv6()[source]

Determine if an instance can support ipv6 As far as I can tell - they all can be configured with a subnet that does?

https://cloud.google.com/compute/docs/ip-addresses/configure-ipv6-address

attr_memory()[source]

Memory is in GB

attr_price()[source]

Price of an instance, USD per hour.

This is not added for Google yet

attr_region()[source]

Return the (| joined) listing of regions

class fluxcloud.main.cloud.google.instance.GoogleCloudInstanceGroup(items)[source]

Bases: fluxcloud.main.cloud.base.InstanceGroup

A Google Cloud instance group.

An instance group stores raw data, and allows for query or other interaction over instances.

Instance

alias of fluxcloud.main.cloud.google.instance.GoogleCloudInstance

add_instance_prices(prices)[source]

Add pricing information to instances

Prices have these categories:
  • {‘Compute’, ‘License’, ‘Network’, ‘Storage’}
And these usage types:
  • {‘Commit1Mo’, ‘Commit1Yr’, ‘Commit3Yr’, ‘OnDemand’, ‘Preemptible’}

For now we will filter to “Compute” and “OnDemand” but these could be changed.

filter_region(region)[source]

A request to filter down to a specific region regular expression.

The solver cannot handle this.

name_attribute = 'name'

fluxcloud.main.cloud.google.prices module

class fluxcloud.main.cloud.google.prices.GoogleCloudPrices(items)[source]

Bases: fluxcloud.main.cloud.base.Prices

Google Compute Engine prices

Module contents