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

Murphy McCauley murphy.mccauley at gmail.com
Wed Apr 30 12:56:25 PDT 2014


That'll probably get the module to load, but it probably won't do anything without actually starting up POX.

The usual way to run a POX component is using POX.  Put your component file (say, mypox1.py) somewhere POX can find it (e.g., in the Python search path or in POX's ext/ directory).  Then run it via POX.  For example, from the POX directory:
./pox.py mypox1

Hopefully that helps.  If not, further discussion should probably be aimed at the pox-dev mailing list or elsewhere on noxrepo.org.

-- Murphy

On Apr 30, 2014, at 8:17 AM, Shiyao Ma <i at introo.me> wrote:

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

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


More information about the mininet-discuss mailing list