Change the order of ./compass/README.md to reflect a typical RESTful call logic path

Change-Id: I157f2f2d14950191916d2ff7c7dd37c0300c4615
This commit is contained in:
Shuo Yang 2015-06-30 11:51:14 -07:00
parent c946aeb254
commit 13ac3b2727
1 changed files with 45 additions and 31 deletions

View File

@ -4,35 +4,47 @@ Compass Core Python Modules
##Direcotries and Files ##Direcotries and Files
* actions/ - compass heavy-lifting actions. This directory includes wrappers of heavy-lifting utility functions, * apiclient/ - API client.
such as clean.py, delete.py and deploy.py. It also has complete modules, e.g. health_check/ that does a health * example.py - example code to deploy a cluster by calling compass API client.
check on compass and output diagnoses. * restful.py - compass API client library.
* api/ - API related files go here. * v1/ - deprecated directory.
* api.py - defines compass RESTful API.
* api.raml - raml file to display/document compass RESTful api. * api/ - API related files go here.
* auth_handler.py - handles API authentication. * api.py - defines compass RESTful API.
* exception_handlers.py - handles API exceptions. * api.raml - raml file to display/document compass RESTful api.
* utils.py - utilities for API. * auth_handler.py - handles API authentication.
* v1/ - deprecated directory. * exception_handlers.py - handles API exceptions.
* apiclient/ - API client. * utils.py - utilities for API.
* example.py - example code to deploy a cluster by calling compass API client. * v1/ - deprecated directory.
* restful.py - compass API client library.
* v1/ - deprecated directory.a * db/ - compass database modules.
* db/ - compass database modules. * api/ - Database level API interfaces, which includes all compass primitive data types.
* api/ - Database level API interfaces, which includes all compass primitive data types. - This is the wrapper layer of the ORM tables and expose the useful logic of DB accessing.
* callback.py - metadata callback methods. * callback.py - metadata callback methods.
* config_validation/ - configuration validation module. * config_validation/ - configuration validation module.
* exception.py - compass defined exceptions for database module. * exception.py - compass defined exceptions for database module.
* models.py - database model file, defining all compass database tables. * models.py - database model file, defining all compass database tables.
* validator.py - database validation methods. * validator.py - database validation methods.
* vi/ - deprecated directory. * vi/ - deprecated directory.
* deployment/ - backend deployment module that handles upstream data and dumps to installers
* tasks/ - all celery tasks are defined here, and they asynchronously exercise functions in the ./actions directory.
* client.py - module to setup celery client.
* tasks.py - defines all celery tasks.
* actions/ - wrappers of heavy-lifting utility functions located in ./deployment,
./hdsdiscovery, ./log_analyzor
* health_check/ that does a health
check on compass and output diagnoses.
* deployment/ - backend deployment module that handles upstream data and dumps to installers
* deployment_manager.py - deployment dispatcher that defines interfaces and retrieves/updates configurations. * deployment_manager.py - deployment dispatcher that defines interfaces and retrieves/updates configurations.
* installers - contains base installers and its children installers such as os_installer and pk_installer * installers - contains base installers and its children installers such as os_installer and pk_installer
(package_installer). These installers here are the "plugin" kind of files that interact with installer (package_installer). These installers here are the "plugin" kind of files that interact with installer
tools(e.g. chef) that do the real installation tricks. tools(e.g. chef) that do the real installation tricks.
* utils/ - utility module that contains a constant.py which defines all keyword variables for deployment. * utils/ - utility module that contains a constant.py which defines all keyword variables for deployment.
* hdsdiscovery/ - hardware discovery module, mainly for mac-address retrieval from switches.
* hdsdiscovery/ - hardware discovery module, mainly for mac-address retrieval from switches.
* base.py - a base class that can be extended by vendors under vendor/ directory. * base.py - a base class that can be extended by vendors under vendor/ directory.
* error.py - hdsdiscovery module error handling. * error.py - hdsdiscovery module error handling.
* hdmanager.py - manages hdsdiscovery functionalities. * hdmanager.py - manages hdsdiscovery functionalities.
@ -45,14 +57,16 @@ Compass Core Python Modules
using arista as an example, first a python file with the same name of its parent directory should be added using arista as an example, first a python file with the same name of its parent directory should be added
(e.g: arista.py). Define the class_name in the vendor file as "Arista" and give the class identical name. (e.g: arista.py). Define the class_name in the vendor file as "Arista" and give the class identical name.
Then create a subdirectory called "plugins" and place mac.py under it. Then create a subdirectory called "plugins" and place mac.py under it.
* log_analyzor/ - compass progress tracking module.
* log_analyzor/ - compass progress tracking module.
* adapter_matcher.py - module to provide installing progress calculation for the adapters. * adapter_matcher.py - module to provide installing progress calculation for the adapters.
* file_matcher.py - updates installing progresses by processing the log files. * file_matcher.py - updates installing progresses by processing the log files.
* line_matcher.py - updates/gets progress when a matched line is found in log files. * line_matcher.py - updates/gets progress when a matched line is found in log files.
* progress_calculator.py: provides functions to update installing progresses. * progress_calculator.py: provides functions to update installing progresses.
* tasks/ - all celery tasks are defined here.
* client.py - module to setup celery client.
* tasks.py - defines all celery tasks. * utils/ - compass core module utility functions.
* tests/ - all unittest code
* test_serverside/ - tests for installers(now only supports chef). * tests/ - all unittest code
* utils/ - compass core module utility functions.
* test_serverside/ - tests for installers(now only supports chef).