#NEWLINE# def stats2json( k , v ) : #NEWLINE# #INDENT# return { #NEWLINE# #INDENT# 'vni' : int ( k . vni ) , #NEWLINE# 'outer_sip' : str ( IPAddress ( k . outer_sip ) ) , #NEWLINE# 'outer_dip' : str ( IPAddress ( k . outer_dip ) ) , #NEWLINE# 'inner_sip' : str ( IPAddress ( k . inner_sip ) ) , #NEWLINE# 'inner_dip' : str ( IPAddress ( k . inner_dip ) ) , #NEWLINE# 'tx_pkts' : v . tx_pkts , #NEWLINE# 'tx_bytes' : v . tx_bytes , #NEWLINE# 'rx_pkts' : v . rx_pkts , #NEWLINE# 'rx_bytes' : v . rx_bytes , #NEWLINE# #UNINDENT# }