The glanceclient.v2.schemas Module

The glanceclient.v2.schemas Module

class glanceclient.v2.schemas.Controller(http_client)

Bases: object

get(schema_name)
class glanceclient.v2.schemas.Schema(raw_schema)

Bases: object

is_base_property(property_name)

Checks if a property with a given name is a base property.

Parameters:property_name – name of the property
Returns:True if the property is base, False otherwise
is_core_property(property_name)

Check if a property with a given name is known to the schema.

Determines if it is either a base property or a custom one registered in schema-image.json file

Parameters:property_name – name of the property
Returns:True if the property is known, False otherwise
raw()
class glanceclient.v2.schemas.SchemaBasedModel(*args, **kwargs)

Bases: warlock.model.Model

Glance specific subclass of the warlock Model.

This implementation alters the function of the patch property to take into account the schema’s core properties. With this version undefined properties which are core will generated ‘replace’ operations rather than ‘add’ since this is what the Glance API expects.

patch

Return a jsonpatch object representing the delta.

class glanceclient.v2.schemas.SchemaProperty(name, **kwargs)

Bases: object

glanceclient.v2.schemas.translate_schema_properties(schema_properties)

Parse the properties dictionary of a schema document.

Returns:list of SchemaProperty objects
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.