fluxcloud.main.cloud package¶
Submodules¶
fluxcloud.main.cloud.base module¶
-
class
fluxcloud.main.cloud.base.CloudData(items)[source]¶ Bases:
objectAn “abstract” class that stores a single data object
This also stores the encoder for any cloud object so we can encode it.
-
Encoder¶
-
-
class
fluxcloud.main.cloud.base.CloudDataEncoder(*, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, sort_keys=False, indent=None, separators=None, default=None)[source]¶ Bases:
json.encoder.JSONEncoderMake our group and instance classes json serializable.
Always return the data!
-
default(o)[source]¶ Implement this method in a subclass such that it returns a serializable object for
o, or calls the base implementation (to raise aTypeError).For example, to support arbitrary iterators, you could implement default like this:
def default(self, o): try: iterable = iter(o) except TypeError: pass else: return list(iterable) # Let the base class default method raise the TypeError return JSONEncoder.default(self, o)
-
-
class
fluxcloud.main.cloud.base.CloudProvider[source]¶ Bases:
objectA base class for a cloud provider
-
name= 'cloud'¶
-
-
class
fluxcloud.main.cloud.base.Instance(items)[source]¶ Bases:
fluxcloud.main.cloud.base.CloudDataBase of an instance.
This class defines the different common attributes that we want to expose. If a cloud instance (json) result differs, it should override this function.
-
property
attribute_getters¶ function names we can call to get an instance attribute.
-
property
cloud¶ Return the name of the cloud (module) derived from path.
-
generate_row()[source]¶ Given an instance name, return a row with the cloud name and other attributes.
-
property
name¶
-
property
-
class
fluxcloud.main.cloud.base.InstanceGroup(items)[source]¶ Bases:
fluxcloud.main.cloud.base.CloudDataA cloud instance group.
An instance group stores raw data, and allows for query or other interaction over instances.
-
class
fluxcloud.main.cloud.base.Prices(items)[source]¶ Bases:
fluxcloud.main.cloud.base.CloudDataCloud pricing