dispatcher Package¶
dispatcher Package¶
copyright: | © 2015 by CRS4. |
---|---|
license: | gpl-2, see License for more details. |
Dispatcher initialization script.
Dispatcher is the core of the Orchestrator, it provides a RESTful API web service with a JSON dialect.
The initialization script is not supposed to be used directly or imported.
In addiction to switch between development or production config file set proporly the variable:
>>> DEV = True # Debug on
>>> DEV = False # Debug off
scripts Module¶
copyright: | © 2015 by CRS4. |
---|---|
license: | gpl-2, see License for more details. |
Scripts file, used within flask-script routines to initialize the Orchestrator environment
settings Module¶
copyright: | © 2015 by CRS4. |
---|---|
license: | gpl-2, see License for more details. |
Description¶
Settings file, used to configure the main Flask app.
This configuration provides three classes:
- Config defines attributes for a global behaviour
- ProductionConfig defines and set attributes to use only in a stable environment ( like a loggin level not pushed to extreme )
- DevelopmentConfig defines and set attrs only for a dev environment
There is also another class, CloudConfig contains credentials and url of the favorite cloud providers
- class dispatcher.settings.CloudConfig[source]¶
Bases: object
- CLOUD_FARM = {'default': {'ENGINE': 'openstack', 'PASSWORD': 'secrete', 'USER': 'admin', 'EXTRA_PARAMS': {'ex_force_auth_version': '2.0_password', 'ex_tenant_name': 'demo', 'ex_force_auth_url': 'http://openstack.crs4.it:5000/v2.0'}}, 'eucalyptus': {'ENGINE': 'eucalyptus', 'PASSWORD': 'SlHFB5isHdqAAwMtTZT4fSB1KKeuAclcwIbgSZIv', 'USER': 'AKIMONBMNDMODZKP4SIX', 'EXTRA_PARAMS': {'path': '/services/Eucalyptus', 'host': 'eucalyptus.ecc.eucalyptus.com', 'secret': 'SlHFB5isHdqAAwMtTZT4fSB1KKeuAclcwIbgSZIv', 'secure': False, 'port': 8773}}, 'fake_driver': {'ENGINE': 'dummy'}}¶
- class dispatcher.settings.Config[source]¶
Bases: object
Main configuration class, is intended to be used as a base class to inheritate
- CISTERN_API = 'v1'¶
- CISTERN_HOST = '127.0.0.1'¶
- CISTERN_PORT = 5051¶
- HOST = '0.0.0.0'¶
- LOG_FILE = '/tmp/middleware.log'¶
- LOG_LEVEL = 10¶
- PORT = 5050¶
- SECRET_KEY = 'dev key pass foobar 1 2 3'¶
- SECURITY_REGISTERABLE = False¶
- SECURITY_TOKEN_AUTHENTICATION_HEADER = 'X-Auth-Token'¶
- SECURITY_TOKEN_AUTHENTICATION_KEY = 'auth_token'¶
- SECURITY_URL_PREFIX = '/api/v1/auth'¶
- SQLALCHEMY_DATABASE_URI = 'sqlite:////tmp/auth.db'¶
views Module¶
copyright: | © 2015 by CRS4. |
---|---|
license: | gpl-2, see License for more details. |
View file, used to register blueprints/api versions