merging bugfixes from trunk
authorTony Mack <tmack@cs.princeton.edu>
Wed, 14 Apr 2010 11:36:21 +0000 (11:36 +0000)
committerTony Mack <tmack@cs.princeton.edu>
Wed, 14 Apr 2010 11:36:21 +0000 (11:36 +0000)
sfa/plc/network.py
sfa/util/table.py

index 955036c..94f6e04 100644 (file)
@@ -115,6 +115,7 @@ class Slice:
         self.network = network
         self.id = slice['slice_id']
         self.name = slice['name']
+        self.peer_id = slice['peer_id']
         self.node_ids = set(slice['node_ids'])
         self.slice_tag_ids = slice['slice_tag_ids']
     
index bccda20..779562f 100644 (file)
@@ -84,6 +84,7 @@ class SfaTable(list):
         self.db.do(querystr)
         for index in indexes:
             self.db.do(index)
+        self.db.commit()
 
     def remove(self, record):
         query_str = "DELETE FROM %s WHERE record_id = %s" % \
@@ -96,6 +97,7 @@ class SfaTable(list):
             sql = " DELETE FROM %s WHERE authority = %s" % \
                     (self.tablename, record['hrn'])
             self.db.do(sql) 
+        self.db.commit()
 
     def insert(self, record):
         db_fields = self.db_fields(record)