Masakari Code Structure¶
Getting started with any codebase requires some getting used to the layout of the project, this guide is meant to make your journey navigating the code easier. All paths are relative to the repository root.
The Python source code for the project can be found in
masakari/apicontains the api service,
masakari/enginecontains the engine service.
The data model¶
The oslo objects¶
The base datamodel can be found in
These objects are used throughout the code, including RPC, REST API and database persistence.
The oslo notifications¶
The datamodel for oslo notifications (not to be confused with Masakari notifications
which are one type of Masakari data objects) can be found in
The REST API¶
Mappings of the models for the API are in
The controllers are in
The implementations of the actions are in
The database (persistence)¶
Some objects can be persisted (saved) to the database,
sqlalchemy is supported as the backend.
The general interface is in
The sqlalchemy implementation is in
Database mappings are in
The entry points¶
The Masakari project has a variety of entry points.
The entry points can be found in the
entry_points section of
The main entry points¶
The main entry points are for the engine and the api:
Another interesting one is the entry point for the management CLI,
The tests are located in: