projects
/
osm
/
MON.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Adds vdu_id to message bus models
[osm/MON.git]
/
osm_mon
/
core
/
database.py
diff --git
a/osm_mon/core/database.py
b/osm_mon/core/database.py
index
1d66264
..
857e8e5
100644
(file)
--- a/
osm_mon/core/database.py
+++ b/
osm_mon/core/database.py
@@
-25,14
+25,15
@@
import logging
from peewee import *
import logging
from peewee import *
-from playhouse.
sqlite_ext import SqliteExtDatabase
+from playhouse.
db_url import connect
-from osm_mon.
plugins.OpenStack
.settings import Config
+from osm_mon.
core
.settings import Config
log = logging.getLogger(__name__)
cfg = Config.instance()
log = logging.getLogger(__name__)
cfg = Config.instance()
+cfg.read_environ()
-db =
SqliteExtDatabase('mon.db'
)
+db =
connect(cfg.DATABASE
)
class BaseModel(Model):
class BaseModel(Model):
@@
-48,7
+49,7
@@
class VimCredentials(BaseModel):
user = CharField()
password = CharField()
tenant_name = CharField()
user = CharField()
password = CharField()
tenant_name = CharField()
- config = TextField(
null=True
)
+ config = TextField(
default='{}'
)
class Alarm(BaseModel):
class Alarm(BaseModel):