diff options
author | Rob Austein <sra@hactrn.net> | 2007-12-22 15:35:15 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2007-12-22 15:35:15 +0000 |
commit | 21e8c4bc5c12be2e73f9eff5a9045ddbe5c52912 (patch) | |
tree | d3cdc03b9f56071cecd58ece2ae36a0ac97f6915 | |
parent | 9d1010fbc5b0b69cfaa064f47685d4a59216f8b8 (diff) |
Doh, helps to put the foreign keys into the IRDB.
svn path=/scripts/testdb.py; revision=1418
-rw-r--r-- | scripts/testdb.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/testdb.py b/scripts/testdb.py index 8148ca65..d8f3a146 100644 --- a/scripts/testdb.py +++ b/scripts/testdb.py @@ -375,8 +375,12 @@ class allocation(object): cms_ta = self.parent.rpkid_ta, https_ta = self.parent.rpkid_ta, sender_name = self.name, recipient_name = self.parent.name, peer_contact_uri = "https://localhost:%s/up-down/%s" % (self.parent.rpki_port, self.child_id))).parent_id + db = MySQLdb.connect(user = "irdb", db = self.irdb_db_name, passwd = irdb_db_pass) + cur = db.cursor() for kid in self.kids: kid.child_id = self.call_rpkid(rpki.left_right.child_elt.make_pdu(action = "create", self_id = self.self_id, bsc_id = self.bsc_id, cms_ta = kid.rpkid_ta)).child_id + cur.execute("UPDATE registrant SET rpki_self_id = %s, rpki_child_id = %s WHERE IRBE_mapped_id = %s", (self.self_id, kid.child_id, kid.name)) + db.close() def write_leaf_yaml(self): """Write YAML scripts for leaf nodes. Only supports list requests |