Remove topo_rspec attributes if egre_key not present
authorAndy Bavier <acb@cs.princeton.edu>
Thu, 19 Feb 2009 19:32:15 +0000 (19:32 +0000)
committerAndy Bavier <acb@cs.princeton.edu>
Thu, 19 Feb 2009 19:32:15 +0000 (19:32 +0000)
create-topo-attributes.py

index 816c819..6d64d99 100755 (executable)
@@ -128,9 +128,10 @@ for slice in GetSlices():
                 id = slice['slice_id']
                 AddSliceAttribute(id, 'topo_rspec', topo_str, node)
 
-        """ Remove old topo_rspec entries """
-        for node in topo_attr:
-            DeleteSliceAttribute(topo_attr[node])
-
     else:
         print "No EGRE key for %s" % slice['name']
+
+    """ Remove old topo_rspec entries """
+    for node in topo_attr:
+        DeleteSliceAttribute(topo_attr[node])
+