Well I wanted a database, and the only interface I had through perl was their pseudo-OO interface. I figured if I have to mess around with objects, why restrict myself to half-assed perl objects when I could use whole-assed python objects instead?
tpFdbAddressOID = (1,3,6,1,2,1,17,4,3,1,1)
tpFdbPortOID = (1,3,6,1,2,1,17,4,3,1,2)
ethPortNameOID = (1,3,6,1,2,1,2,2,1,2)
ethArpOID = (1,3,6,1,2,1,4,22,1,2)
for row in tpFdbPortTable:
# each row is a list, which has a single list.
(oid, destination) = row[0]
# the target MAC is the last six components of the oid.
target = ""
for component in oid[-6:]:
target = target + ':' + str(component)
target = target[1:]
print "Switch:", switch, "Target:", target, "Destination:", destination