From: Mark Huang Date: Fri, 2 Feb 2007 19:58:51 +0000 (+0000) Subject: settle on names for net_ slice attributes X-Git-Tag: planetlab-4_0-rc1~10 X-Git-Url: http://git.onelab.eu/?p=nodemanager.git;a=commitdiff_plain;h=55665e49361e51e7aec50698ca6d19ccd4647693 settle on names for net_ slice attributes --- diff --git a/database.py b/database.py index cc1732d..890e9c2 100644 --- a/database.py +++ b/database.py @@ -23,7 +23,7 @@ import tools # We enforce minimum allocations to keep the clueless from hosing their slivers. # Disallow disk loans because there's currently no way to punish slivers over quota. -MINIMUM_ALLOCATION = {'cpu_min': 0, 'cpu_share': 16, 'net_min': 0, 'net_max': 8, 'net2_min': 0, 'net2_max': 8, 'net_share': 1} +MINIMUM_ALLOCATION = {'cpu_min': 0, 'cpu_share': 16, 'net_min_rate': 0, 'net_max_rate': 8, 'net_i2_min_rate': 0, 'net_i2_max_rate': 8, 'net_share': 1} LOANABLE_RESOURCES = MINIMUM_ALLOCATION.keys() DB_FILE = '/root/sliver_mgr_db.pickle' diff --git a/sliver_vs.py b/sliver_vs.py index e4856a6..8963c15 100644 --- a/sliver_vs.py +++ b/sliver_vs.py @@ -106,7 +106,7 @@ class Sliver_VS(accounts.Account, vserver.VServer): logger.log('%s: failed to set max disk usage' % self.name) logger.log_exc() - net_limits = (self.rspec['net_min'], self.rspec['net_max'], self.rspec['net2_min'], self.rspec['net2_max'], self.rspec['net_share']) + net_limits = (self.rspec['net_min_rate'], self.rspec['net_max_rate'], self.rspec['net_i2_min_rate'], self.rspec['net_i2_max_rate'], self.rspec['net_share']) logger.log('%s: setting net limits to %s bps' % (self.name, net_limits[:-1])) logger.log('%s: setting net share to %d' % (self.name, net_limits[-1])) self.set_bwlimit(*net_limits) diff --git a/sm.py b/sm.py index 2d88151..cdb42ee 100644 --- a/sm.py +++ b/sm.py @@ -23,13 +23,13 @@ DEFAULT_ALLOCATION = { 'cpu_min': 0, # ms/s 'cpu_share': 32, # proportional share # bandwidth parameters - 'net_min': bwmin, # bps - 'net_max': bwmax, # bps + 'net_min_rate': bwmin, # bps + 'net_max_rate': bwmax, # bps 'net_share': 1, # proportional share # bandwidth parameters over routes exempt from node bandwidth limits - 'net2_min': bwmin, # bps - 'net2_max': bwmax, # bps - 'net2_share': 1, # proportional share + 'net_i2_min_rate': bwmin, # bps + 'net_i2_max_rate': bwmax, # bps + 'net_i2_share': 1, # proportional share 'disk_max': 5000000 # bytes }