From b287745b8fc925c46fbce723149c482b9133c5d2 Mon Sep 17 00:00:00 2001 From: Faiyaz Ahmed Date: Tue, 24 Apr 2007 23:06:54 +0000 Subject: [PATCH] Create new slices if not running. --- bwmon.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/bwmon.py b/bwmon.py index 2806713..7226935 100644 --- a/bwmon.py +++ b/bwmon.py @@ -15,7 +15,7 @@ # Faiyaz Ahmed # Copyright (C) 2004-2006 The Trustees of Princeton University # -# $Id: bwmon.py,v 1.12 2007/03/06 20:46:54 faiyaza Exp $ +# $Id: bwmon.py,v 1.1.2.6 2007/04/23 19:47:50 faiyaza Exp $ # import os @@ -413,11 +413,11 @@ def GetSlivers(db): (version, slices) = pickle.load(f) f.close() # Check version of data file - if version != "$Id: bwmon.py,v 1.12 2007/03/06 20:46:54 faiyaza Exp $": + if version != "$Id: bwmon.py,v 1.1.2.6 2007/04/23 19:47:50 faiyaza Exp $": logger.log("bwmon: Not using old version '%s' data file %s" % (version, datafile)) raise Exception except Exception: - version = "$Id: bwmon.py,v 1.12 2007/03/06 20:46:54 faiyaza Exp $" + version = "$Id: bwmon.py,v 1.1.2.6 2007/04/23 19:47:50 faiyaza Exp $" slices = {} # Get/set special slice IDs @@ -441,8 +441,12 @@ def GetSlivers(db): live[bwlimit.get_xid(sliver)] = sliver # Setup new slices. - # live.xids - runing.xids = new.xids - newslicesxids = Set(live.keys()) - Set(slices.keys()) + # live.xids - runing(slices).xids = new.xids + newslicesxids = [] + for plcxid in live.keys(): + if plcxid not in slices.keys(): + newslicesxids.append(plcxid) + #newslicesxids = Set(live.keys()) - Set(slices.keys()) for newslicexid in newslicesxids: # Delegated slices dont have xids (which are uids) since they haven't been # instantiated yet. -- 2.43.0