Skip to content
This repository was archived by the owner on Jan 23, 2026. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions applications/endpointtracker/aci-endpoint-tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def connect_mysql(args):
epg CHAR(100) NOT NULL,
interface CHAR(100) NOT NULL,
timestart TIMESTAMP NOT NULL,
timestop TIMESTAMP);''')
timestop TIMESTAMP NULL);''')
cnx.commit()

return c, cnx
Expand Down Expand Up @@ -148,7 +148,7 @@ def tracker(args):
ep_exists = c.execute("""SELECT * FROM endpoints
WHERE mac="%s"
AND
timestop="0000-00-00 00:00:00";""" % ep.mac)
timestop is null;""" % ep.mac)
c.fetchall()
if not ep_exists:
c.execute("""INSERT INTO endpoints (mac, ip, tenant,
Expand Down Expand Up @@ -177,7 +177,7 @@ def tracker(args):
update_cmd = """UPDATE endpoints SET timestop='%s',
timestart=timestart
WHERE mac='%s' AND tenant='%s' AND
timestop='0000-00-00 00:00:00'""" % data
timestop is null""" % data
c.execute(update_cmd)
else:
if ep.if_dn:
Expand Down