X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=slivermanager.py;h=f0a610ae69dbd82f3f388787d4c43b99726cdb86;hb=7df10fab475b2ac64c3c45e595de8041cde630f1;hp=341800b2fb84b4db59c8bf8639abc33e4f5ac876;hpb=90fe600a45aa0002e35fd47b80757ce2c246714b;p=nodemanager.git diff --git a/slivermanager.py b/slivermanager.py index 341800b..f0a610a 100644 --- a/slivermanager.py +++ b/slivermanager.py @@ -178,15 +178,18 @@ def GetSlivers(data, config = None, plc=None, fullupdate=True): for resname, default_amount in DEFAULT_ALLOCATION.iteritems(): try: t = type(default_amount) - amt = t.__new__(t, attributes[resname]) - except (KeyError, ValueError): amt = default_amount - rspec[resname] = amt + amount = t.__new__(t, attributes[resname]) + except (KeyError, ValueError): amount = default_amount + rspec[resname] = amount # add in sysctl attributes into the rspec for key in attributes.keys(): if key.find("sysctl.") == 0: rspec[key] = attributes[key] + # also export tags in rspec so they make it to the sliver_vs.start call + rspec['tags']=attributes + database.db.deliver_record(rec) if fullupdate: database.db.set_min_timestamp(data['timestamp']) # slivers are created here.