What is the type of packet.src?
Should I declare by db entry class to be
class SourcetoPort(Base):
""""""
__tablename__ = 'source_to_port'
id = Column(Integer, primary_key=True)
port_no = Column(Integer)
src_address = Column(Integer)
#----------------------------------------------------------------------
def __init__(self, src_address,port_no):
""""""
self.src_address = src_address
self.port_no = port_no
instead of current decleration
class SourcetoPort(Base):
""""""
__tablename__ = 'source_to_port'
id = Column(Integer, primary_key=True)
port_no = Column(Integer)
src_address = Column(String)
#----------------------------------------------------------------------
def __init__(self, src_address,port_no):
""""""
self.src_address = src_address
self.port_no = port_no
Regards,
Karthik.
On 15 April 2013 10:35, Murphy McCauley <[email protected]> wrote:
> On Apr 14, 2013, at 3:19 PM, Karthik Sharma wrote:
>
> entry = SourcetoPort(src_address="packet.src" ,
> port_no=packet_in.in_port)
>
>
> I am not looking too closely, but you seem to be adding the literal string
> "packet.src" to your database. You probably want to be adding the actual
> source address.
>
> -- Murphy
>