@@ -44,7 +44,7 @@ def __init__(self, topic, af, start, end, host="localhost", dbname="ihr"):
44
44
# conn_string = "host='127.0.0.1' dbname='%s'" % dbname
45
45
46
46
self .conn = psycopg2 .connect (DB_CONNECTION_STRING )
47
- columns = ("timebin" , "prefix" , "originasn_id" , "asn_id" , "country_id" , "hege" , "rpki_status" , "irr_status" , "delegated_prefix_status" , "delegated_asn_status" , "af" , "descr" , "visibility" , "moas" )
47
+ columns = ("id" , " timebin" , "prefix" , "originasn_id" , "asn_id" , "country_id" , "hege" , "rpki_status" , "irr_status" , "delegated_prefix_status" , "delegated_asn_status" , "af" , "descr" , "visibility" , "moas" )
48
48
self .cpmgr = CopyManager (self .conn , "ihr_hegemony_prefix" , columns )
49
49
self .cursor = self .conn .cursor ()
50
50
logging .debug ("Connected to the PostgreSQL server" )
@@ -235,7 +235,7 @@ def save(self, msg):
235
235
236
236
# Hegemony values to copy in the database
237
237
if hege != 0 :
238
- #("timebin", "prefix", "originasn_id", "asn_id", "country_id", "hege",
238
+ #("id", " timebin", "prefix", "originasn_id", "asn_id", "country_id", "hege",
239
239
# "rpki_status", "irr_status", "delegated_prefix_status", "delegated_asn_status",
240
240
# "af", "descr", "visibility", "moas")
241
241
@@ -279,7 +279,7 @@ def save(self, msg):
279
279
self .cache ['descr' ] = descr
280
280
281
281
self .dataHege .append ([
282
- self .currenttime , prefix , int (originasn ), int (asn ), cc , float (hege ),
282
+ 0 , self .currenttime , prefix , int (originasn ), int (asn ), cc , float (hege ),
283
283
rov_check ['rpki' ]['status' ], rov_check ['irr' ]['status' ],
284
284
rov_check ['delegated' ]['prefix' ]['status' ], rov_check ['delegated' ]['asn' ]['status' ],
285
285
self .af , descr , msg ['nb_peers' ]
0 commit comments