In its current incarnation, conftool only supports two object types:
- nodes, describing single applications in a service pool
- service, describing the corresponding service
What we want is to extend its behaviour so that any generic object type can be added programmaticaly, via a schema file.
Schema files should allow to add objects with different characteristics, and also allow the same syncronization mechanism that we use now: define which objects are present from yaml files, and - for specific objects - also the content of objects themselves.
The objects in the schema will have the following format:
<object-name>: path: <base-path> tags: [tag1, tag2] schema: field1: { type: string, default: <field1-default-value> }
So we need to define the base path on the kvstore for an object class, the tags needed to describe the object itself, and a schema with a dict of fields, their type and default value.
As far as types are concerned, I think we can limit ourselves to a series of simple ones, namely:
- integer
- string
- boolean
- list
- dictionary/hash
relationships between such objects can be described as dependencies: for example, nodes depend on a corresponding service being defined. Those can be listed as well., and will determine the order of syncronization between the on disc structures and the live data.