X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sm.py;h=45644d856c2c54189ca3939b30e0c869cd1e6827;hb=33fc7bb08d50591a28b5a12725baa1b50abe253f;hp=abbcaec9f484618c5109f3345714f93618e8d387;hpb=ef1c8f6a368f70e1b23bc1fc2c4f167efc63b0d9;p=nodemanager.git diff --git a/sm.py b/sm.py index abbcaec..45644d8 100644 --- 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. """ -# $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 +import api_calls import database import delegate import logger @@ -126,6 +127,11 @@ def GetSlivers(data, fullupdate=True): except (KeyError, ValueError): amt = default_amt rspec[resname] = amt + # add in sysctl attributes into the rspec + for key in attr_dict.keys(): + if key.find("sysctl.") == 0: + rspec[key] = attr_dict[key] + database.db.deliver_record(rec) if fullupdate: database.db.set_min_timestamp(data['timestamp']) database.db.sync() @@ -142,5 +148,5 @@ def start(options, config): accounts.register_class(delegate.Delegate) accounts.Startingup = options.startup database.start() - api.deliver_ticket = deliver_ticket + api_calls.deliver_ticket = deliver_ticket api.start()