1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-20 10:50:08 +03:00

Add default acct db

This commit is contained in:
Daniel Molina 2011-07-12 15:32:22 +02:00
parent c1f794603b
commit 78a58e6041
2 changed files with 9 additions and 2 deletions

View File

@ -15,7 +15,7 @@
#--------------------------------------------------------------------------- #
# Database URI
:DB: sqlite:///tmp/test_one_acct.db
#:DB: sqlite:///var/one/oneacct.db
# Duration of each daemon loop in seconds
:STEP: 300 # 5 minutes

View File

@ -6,13 +6,20 @@ module WatchHelper
if !ONE_LOCATION
ACCTD_CONF="/etc/one/acctd.conf"
ACCT_DB="/var/one/oneacct.db"
else
ACCTD_CONF=ONE_LOCATION+"/etc/acctd.conf"
ACCT_DB=ONE_LOCATION+"/var/oneacct.db"
end
CONF = YAML.load_file(ACCTD_CONF)
DB = Sequel.connect(CONF[:DB])
if CONF[:DB]
DB = Sequel.connect(CONF[:DB])
else
DB = Sequel.connect("sqlite//#{ACCT_DB}")
end
VM_DELTA = {
:net_rx => {
:type => Integer,