distil/tests/constants.py
adriant ab75581297 Changes to the config system.
This patch addresses issues with the need for a global config.
Now any module needing config access can simply import the config module.
To facilitate this there were a lot of minor changes to config use throughout artifice,
as well as changes to classes that were passed a config on creation.
Also some changes to constants so that the new config system can work with them easier.

Change-Id: I6e9b4cbf0ff30683dc13e37f13334f7ed7ee7add
2014-04-02 15:55:00 +13:00

51 lines
1.2 KiB
Python

DATABASE_NAME = "test_artifice"
PG_DATABASE_URI = "postgresql://aurynn:postgres@localhost/%s" % DATABASE_NAME
MY_DATABASE_URI = "mysql://root:password@localhost/%s" % DATABASE_NAME
config = {
"main": {
"region": "Wellington",
"timezone": "Pacific/Auckland",
"export_provider": "tests.mock_exporter:MockExporter",
"database_uri": PG_DATABASE_URI
},
"export_config": {
"output_path": "./",
"delimiter": ",",
"output_file": "%(tenant)s-%(start)s-%(end)s.csv",
"rates": {
"file": "examples/test_rates.csv"
}
},
"auth": {
"end_point": "http://localhost:35357/v2.0",
"username": "admin",
"password": "openstack",
"default_tenant": "demo"
},
"ceilometer": {
"host": "http://localhost:8777/"
},
"transformers": {
"uptime": {
"tracked_states": ["active", "building",
"paused", "rescued", "resized"]
}
}
}
# from test data:
TENANT_ID = "cd3deadd3d5a4f11802d03928195f4ef"
TENANTS = [
{u'enabled': True,
u'description': None,
u'name': u'demo',
u'id': u'cd3deadd3d5a4f11802d03928195f4ef'}
]
AUTH_TOKEN = "ASDFTOKEN"