git://git.onelab.eu
/
nodemanager.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use the right variable.
[nodemanager.git]
/
sm.py
diff --git
a/sm.py
b/sm.py
index
efba0eb
..
9ba2c38
100644
(file)
--- a/
sm.py
+++ b/
sm.py
@@
-7,12
+7,13
@@
also to make inter-sliver resource loans. The sliver manager is also
responsible for handling delegation accounts.
"""
responsible for handling delegation accounts.
"""
-# $Id
: sm.py,v 1.28 2007/07/27 18:02:36 dhozac Exp
$
+# $Id$
try: from bwlimit import bwmin, bwmax
except ImportError: bwmin, bwmax = 8, 1000*1000*1000
import accounts
import api
try: from bwlimit import bwmin, bwmax
except ImportError: bwmin, bwmax = 8, 1000*1000*1000
import accounts
import api
+import api_calls
import database
import delegate
import logger
import database
import delegate
import logger
@@
-23,7
+24,7
@@
import string,re
DEFAULT_ALLOCATION = {
'enabled': 1,
# CPU parameters
DEFAULT_ALLOCATION = {
'enabled': 1,
# CPU parameters
- 'cpu_
min
': 0, # percent CPU reserved
+ 'cpu_
pct
': 0, # percent CPU reserved
'cpu_share': 1, # proportional share
# bandwidth parameters
'net_min_rate': bwmin / 1000, # kbps
'cpu_share': 1, # proportional share
# bandwidth parameters
'net_min_rate': bwmin / 1000, # kbps
@@
-90,7
+91,7
@@
def GetSlivers(data, fullupdate=True):
# convert attributes field to a proper dict
attr_dict = {}
# convert attributes field to a proper dict
attr_dict = {}
- for attr in rec.pop('attributes'): attr_dict[attr['name']] = attr['value']
+ for attr in rec.pop('attributes'): attr_dict[attr['
tag
name']] = attr['value']
# squash keys
keys = rec.pop('keys')
# squash keys
keys = rec.pop('keys')
@@
-142,5
+143,5
@@
def start(options, config):
accounts.register_class(delegate.Delegate)
accounts.Startingup = options.startup
database.start()
accounts.register_class(delegate.Delegate)
accounts.Startingup = options.startup
database.start()
- api.deliver_ticket = deliver_ticket
+ api
_calls
.deliver_ticket = deliver_ticket
api.start()
api.start()