Hi all,
I am experimenting with Ryu 3.2 package and having some problem running
ryu/topology/switches.py. I don't know if I miss anything so I hope you guys
can pin point some directions.
I ran :
./bin/ryu-manager --verbose --observe-links ./ryu/app/simple_switch_13.py
./ryu/app/client_13.py ./ryu/app/rest_topology.py ./ryu/app/ofctl_rest.py
./ryu/topology/switches.py
loading app ./ryu/app/simple_switch_13.py
loading app ./ryu/app/client_13.py
loading app ./ryu/app/rest_topology.py
loading app ./ryu/app/ofctl_rest.py
loading app ./ryu/topology/switches.py
Traceback (most recent call last):
File "./bin/ryu-manager", line 19, in <module>
main()
File "/usr/local/lib/python2.7/dist-packages/ryu/cmd/manager.py", line 68, in
main
app_mgr.load_apps(app_lists)
File "/usr/local/lib/python2.7/dist-packages/ryu/base/app_manager.py", line
175, in load_apps
cls = self.load_app(app_cls_name)
File "/usr/local/lib/python2.7/dist-packages/ryu/base/app_manager.py", line
157, in load_app
mod = utils.import_module(name)
File "/usr/local/lib/python2.7/dist-packages/ryu/utils.py", line 86, in
import_module
__import__(name)
File "/home/fmadmin/dev/ryu/ryu/topology/switches.py", line 52, in <module>
help='link discovery: explicitly drop lldp packet in')
File "/usr/local/lib/python2.7/dist-packages/oslo/config/cfg.py", line 1579,
in __inner
result = f(self, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/oslo/config/cfg.py", line 1739,
in register_cli_opts
self.register_cli_opt(opt, group, clear_cache=False)
File "/usr/local/lib/python2.7/dist-packages/oslo/config/cfg.py", line 1583,
in __inner
return f(self, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/oslo/config/cfg.py", line 1731,
in register_cli_opt
raise ArgsAlreadyParsedError("cannot register CLI option")
oslo.config.cfg.ArgsAlreadyParsedError: arguments already parsed: cannot
register CLI option
So I went in utils.py and added:
name = name[:-3]
+ try:
+ LOG.debug('Reimport mod %s' %name)
+ __import__(name)
+ except cfg.ArgsAlreadyParsedError:
+ for key in sys.modules.keys():
+ if key.endswith(name):
+ sys.path = opath
+ return sys.modules[key]
sys.path = opath
That by passed the ArgsAlreadyParsedError, but then I got into the "no such
option: install_lldp_flow"
./bin/ryu-manager --verbose --observe-links ./ryu/app/simple_switch_13.py
./ryu/app/client_13.py ./ryu/app/rest_topology.py ./ryu/app/ofctl_rest.py
./ryu/topology/switches.py
loading app ./ryu/app/simple_switch_13.py
loading app ./ryu/app/client_13.py
loading app ./ryu/app/rest_topology.py
loading app ./ryu/app/ofctl_rest.py
loading app ./ryu/topology/switches.py
loading app ryu.controller.ofp_handler
creating context dpset
creating context wsgi
instantiating app ./ryu/app/simple_switch_13.py
instantiating app ./ryu/topology/switches.py
Traceback (most recent call last):
File "./bin/ryu-manager", line 19, in <module>
main()
File "/usr/local/lib/python2.7/dist-packages/ryu/cmd/manager.py", line 70, in
main
app_mgr.instantiate_apps(**contexts)
File "/usr/local/lib/python2.7/dist-packages/ryu/base/app_manager.py", line
212, in instantiate_apps
app = cls(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/ryu/topology/switches.py", line
454, in __init__
self.install_flow = CONF.install_lldp_flow
File "/usr/local/lib/python2.7/dist-packages/oslo/config/cfg.py", line 1648,
in __getattr__
raise NoSuchOptError(name)
oslo.config.cfg.NoSuchOptError: no such option: install_lldp_flow
Tried adding --install-lldp-flow to the command line with no success.
Thanks
Phuc Ly------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel