watcher.decision_engine.model.collector.base
Module¶A Cluster Data Model (or CDM) is a logical representation of the current state and topology of the Cluster Managed resources.
It is represented as a set of Managed resources (which may be a simple tree or a flat list of key-value pairs) which enables Watcher Strategies to know the current relationships between the different resources of the Cluster during an Audit and enables the Strategy to request information such as:
In a word, this data model enables the Strategy to know:
In the Watcher project, we aim at providing a some generic and basic Cluster Data Model for each Goal, usable in the associated Strategies through a plugin-based mechanism which are called cluster data model collectors (or CDMCs). These CDMCs are responsible for loading and keeping up-to-date their associated CDM by listening to events and also periodically rebuilding themselves from the ground up. They are also directly accessible from the strategies classes. These CDMs are used to:
There may be various generic and basic Cluster Data Models proposed in Watcher helpers, each of them being adapted to achieving a given Goal:
Note however that a developer can use his/her own Cluster Data Model if the proposed data model does not fit his/her needs as long as the Strategy is able to produce a Solution for the requested Goal. For example, a developer could rely on the Nova Data Model to optimize some compute resources.
The Cluster Data Model may be persisted in any appropriate storage system (SQL database, NoSQL database, JSON file, XML File, In Memory Database, …). As of now, an in-memory model is built and maintained in the background in order to accelerate the execution of strategies.
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.