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

Shiyao Ma i at introo.me
Wed Apr 30 08:17:23 PDT 2014


Hi. deepika

Given your error, it's more of a Pox related problem. And,, actually it's
more related to Python itself.
Seems like pox.core is not in your python search path. try this:
import sys; sys.path.insert(0, THE_PATH_WHERE_POX_RESIDES)

Regards.


2014-04-30 13:03 GMT+08:00 deepika m.s <deepikamscse at gmail.com>:

> 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
>
>
>
>
>
> _______________________________________________
> mininet-discuss mailing list
> mininet-discuss at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/mininet-discuss
>
>


-- 

吾輩は猫である。ホームーページはhttp://introo.me。
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/mininet-discuss/attachments/20140430/85e33a12/attachment.html>


More information about the mininet-discuss mailing list