CVS doesn't know the difference between spaces and tabs. tabs are bad...or so ive...
authorFaiyaz Ahmed <faiyaza@cs.princeton.edu>
Sat, 16 Jun 2007 14:30:17 +0000 (14:30 +0000)
committerFaiyaz Ahmed <faiyaza@cs.princeton.edu>
Sat, 16 Jun 2007 14:30:17 +0000 (14:30 +0000)
bwmon.py
sm.py

index af70370..4fb581d 100644 (file)
--- a/bwmon.py
+++ b/bwmon.py
@@ -15,7 +15,7 @@
 # Faiyaz Ahmed <faiyaza@cs.princeton.edu>
 # Copyright (C) 2004-2006 The Trustees of Princeton University
 #
-# $Id: bwmon.py,v 1.1.2.9 2007/04/26 19:09:05 faiyaza Exp $
+# $Id: bwmon.py,v 1.20 2007/06/15 20:29:26 faiyaza Exp $
 #
 
 import os
@@ -393,7 +393,7 @@ class Slice:
 def gethtbs(root_xid, default_xid):
     """
     Return dict {xid: {*rates}} of running htbs as reported by tc that have names.
-       Turn off HTBs without names.
+    Turn off HTBs without names.
     """
     livehtbs = {}
     for params in bwlimit.get():
@@ -407,8 +407,8 @@ def gethtbs(root_xid, default_xid):
         
         
         if (name is None) \
-               and (xid != root_xid) \
-               and (xid != default_xid):
+        and (xid != root_xid) \
+        and (xid != default_xid):
             # Orphaned (not associated with a slice) class
             name = "%d?" % xid
             logger.log("bwmon:  Found orphaned HTB %s. Removing." %name)
@@ -458,11 +458,11 @@ def sync(nmdbcopy):
         (version, slices) = pickle.load(f)
         f.close()
         # Check version of data file
-        if version != "$Id: bwmon.py,v 1.1.2.9 2007/04/26 19:09:05 faiyaza Exp $":
+        if version != "$Id: bwmon.py,v 1.20 2007/06/15 20:29:26 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.1.2.9 2007/04/26 19:09:05 faiyaza Exp $"
+        version = "$Id: bwmon.py,v 1.20 2007/06/15 20:29:26 faiyaza Exp $"
         slices = {}
 
     # Get/set special slice IDs
diff --git a/sm.py b/sm.py
index 7084ef0..e159213 100644 (file)
--- a/sm.py
+++ b/sm.py
@@ -143,12 +143,12 @@ def GetSlivers(data, fullupdate=True):
         keys = rec.pop('keys')
         rec.setdefault('keys', '\n'.join([key_struct['key'] for key_struct in keys]))
 
-               # Handle nm controller here
-               rec.setdefault('type', attr_dict.get('type', 'sliver.VServer'))
-               if rec['instantiation'] == 'nm-controller':
-               # type isn't returned by GetSlivers() for whatever reason.  We're overloading
-               # instantiation here, but i suppose its the ssame thing when you think about it. -FA
-                       rec['type'] = 'delegate'
+        # Handle nm controller here
+        rec.setdefault('type', attr_dict.get('type', 'sliver.VServer'))
+        if rec['instantiation'] == 'nm-controller':
+        # type isn't returned by GetSlivers() for whatever reason.  We're overloading
+        # instantiation here, but i suppose its the ssame thing when you think about it. -FA
+            rec['type'] = 'delegate'
 
         rec.setdefault('vref', attr_dict.get('vref', 'default'))
         is_id = attr_dict.get('plc_initscript_id')