Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[mininet-discuss] import module error

deepika m.s deepikamscse at gmail.com
Tue Apr 29 22:03:17 PDT 2014


Hi,

I am running predefined ip routing example, the code is given below.

from pox.core import core

import pox.openflow.libopenflow_01 as of

from pox.lib.util import dpidToStr



log = core.getLogger()



*def _handle_ConnectionUp (event):*



*  msg = of.ofp_flow_mod()*

*  msg.priority =1*

*  msg.idle_timeout = 0*

*  msg.match.in_port =1*

*  msg.actions.append(of.ofp_action_output(port = of.OFPP_ALL))*

*  event.connection.send(msg)*



*  msg = of.ofp_flow_mod()*

*  msg.priority =1*

*  msg.idle_timeout = 0*

*  msg.match.in_port =2*

*  msg.actions.append(of.ofp_action_output(port = of.OFPP_ALL))*

*  event.connection.send(msg)*



*  msg = of.ofp_flow_mod()*

*  msg.priority =1*

*  msg.idle_timeout = 0*

*  msg.match.in_port =3*

*  msg.actions.append(of.ofp_action_output(port = of.OFPP_ALL))*

*  event.connection.send(msg)*



*  msg = of.ofp_flow_mod()*

*  msg.priority =10*

*  msg.idle_timeout = 0*

*  msg.hard_timeout = 0 *

*  msg.match.dl_type = 0x0800*

*  msg.match.nw_dst = "192.168.123.3"*

*  msg.actions.append(of.ofp_action_output(port = 3))*

*  event.connection.send(msg) *



*  msg = of.ofp_flow_mod()*

*  msg.priority =10*

*  msg.idle_timeout = 0*

*  msg.hard_timeout = 0*

*  msg.match.dl_type = 0x0800*

*  msg.match.nw_dst = "192.168.123.2"*

*  msg.actions.append(of.ofp_action_output(port = 2))*

*  event.connection.send(msg)*



*  msg = of.ofp_flow_mod()*

*  msg.priority =10*

*  msg.idle_timeout = 0*

*  msg.hard_timeout = 0*

*  msg.match.dl_type = 0x0800*

*  msg.match.nw_dst = "192.168.123.1"*

*  msg.actions.append(of.ofp_action_output(port = 1))*

*  event.connection.send(msg)*



*def launch ():*

*  core.openflow.addListenerByName("ConnectionUp", _handle_ConnectionUp)*

   log.info("mypox1")



I am  getting an error when I run this, the error is,

from pox.core import core

ImportError: No module named pox.core

Please help me to resolve this error.


Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/mininet-discuss/attachments/20140430/48249422/attachment-0001.html>


More information about the mininet-discuss mailing list