diff options
author | Rob Austein <sra@hactrn.net> | 2009-06-03 05:07:04 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2009-06-03 05:07:04 +0000 |
commit | ef20577491a69792f1692a135c79926b4cad551c (patch) | |
tree | 51146ebe46c95b49ecbb670933b2ba1fcdc0db68 /rpkid/testbed.py | |
parent | e60405db297bc46756fbde275b99fe6ae7c62fb0 (diff) |
Checkpoint: first step towards cleanup of SQL and left-right protocol.
svn path=/rpkid/doc/Installation; revision=2491
Diffstat (limited to 'rpkid/testbed.py')
-rw-r--r-- | rpkid/testbed.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/rpkid/testbed.py b/rpkid/testbed.py index f41a921a..0316a56d 100644 --- a/rpkid/testbed.py +++ b/rpkid/testbed.py @@ -679,8 +679,8 @@ class allocation(object): cur.execute(sql) for s in [self] + self.hosts: for kid in s.kids: - cur.execute("INSERT registrant (IRBE_mapped_id, subject_name, valid_until) VALUES (%s, %s, %s)", - (kid.name, kid.name, kid.resources.valid_until.to_sql())) + cur.execute("INSERT registrant (registrant_handle, valid_until) VALUES (%s, %s)", + (kid.name, kid.resources.valid_until.to_sql())) db.close() def sync_sql(self): @@ -696,7 +696,7 @@ class allocation(object): cur.execute("DELETE FROM net") for s in [self] + self.hosts: for kid in s.kids: - cur.execute("SELECT registrant_id FROM registrant WHERE IRBE_mapped_id = %s", (kid.name,)) + cur.execute("SELECT registrant_id FROM registrant WHERE registrant_handle = %s", (kid.name,)) registrant_id = cur.fetchone()[0] for as_range in kid.resources.asn: cur.execute("INSERT asn (start_as, end_as, registrant_id) VALUES (%s, %s, %s)", (as_range.min, as_range.max, registrant_id)) @@ -964,7 +964,7 @@ class allocation(object): k = s.kids[j] assert s.self_id == v.self_id k.child_id = v.child_id - sql_cur.execute("UPDATE registrant SET rpki_self_id = %s, rpki_child_id = %s WHERE IRBE_mapped_id = %s", (s.self_id, k.child_id, k.name)) + sql_cur.execute("UPDATE registrant SET rpki_self_id = %s, rpki_child_id = %s WHERE registrant_handle = %s", (s.self_id, k.child_id, k.name)) sql_cur.close() sql_db.close() |