YAMAMOTO Takashi <yamamoto@...> writes:
> 
> i guess you edited a wrong copy of the module.
> please check your python module loading path.
> 
> YAMAMOTO Takashi
> 
> > Hi Yamamoto,
> > 
> > Thank you, yes it works now but when I edited in the original file, I
couldn't see the print statement that I
> have added.
> > 
> > Best,
> > Talal
> > 
> > On Mar 24, 2015, at 1:55 PM, YAMAMOTO Takashi <yamamoto@...> wrote:
> > 
> >>> Dear Ryu Expert, 
> >>> 
> >>> I have tried switch.py module and I have faced the following problem:
> >>> 
> >>> root <at> mininet-vm:~/ryu# ./bin/ryu-manager --verbose
ryu/topology/switches
> >>> loading app ryu/topology/switches
> >>> 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 78, in main
> >>>    app_mgr.load_apps(app_lists)
> >>>  File
"/usr/local/lib/python2.7/dist-packages/ryu/base/app_manager.py", line 385,
in load_apps
> >>>    cls = self.load_app(app_cls_name)
> >>>  File
"/usr/local/lib/python2.7/dist-packages/ryu/base/app_manager.py", line 361,
in load_app
> >>>    mod = utils.import_module(name)
> >>>  File "/usr/local/lib/python2.7/dist-packages/ryu/utils.py", line 91,
in import_module
> >>>    __import__(name)
> >>>  File "/home/mininet/ryu/ryu/topology/switches.py", line 53, in <module>
> >>>    help='link discovery: explicitly drop lldp packet in')
> >>>  File "/usr/lib/python2.7/dist-packages/oslo/config/cfg.py", line
1579, in __inner
> >>>    result = f(self, *args, **kwargs)
> >>>  File "/usr/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/lib/python2.7/dist-packages/oslo/config/cfg.py", line
1583, in __inner
> >>>    return f(self, *args, **kwargs)
> >>>  File "/usr/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
> >>> root <at> mininet-vm:~/ryu# 
> >>> 
> >>> Even I have tried to run the command like: 
> >>> 
> >>> 1- ./bin/ryu-manager --verbose ryu/topology/switches.py
> >> 
> >> try the following instead:
> >>    ./bin/ryu-manager --verbose ryu.topology.switches
> >> 
> >> YAMAMOTO Takashi
> >> 
> >>> 
> >>> But all gave an error, but with other modules, work fine.
> >>> Any suggestion ?
> >>> 
> >>> Thank you!
> >>> Talal
> 
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming The Go Parallel Website, sponsored
> by Intel and developed in partnership with Slashdot Media, is your hub for all
> things parallel software development, from weekly thought leadership blogs to
> news, videos, case studies, tutorials and more. Take a look and join the 
> conversation now. http://goparallel.sourceforge.net/
> 

sudo mn --switch user --controller remote --mac --topo linear,4
When I try $ ryu-manager ryu/topology/switches.py --observe-links
I get the CLI error.

Then, when I try ryu-manager ryu.topology.switches --observe-links  or
ryu-manager ryu.topology.dumper --observe-links
I get:
loading app ryu.topology.dumper
loading app ryu.controller.ofp_handler
instantiating app None of Switches
creating context switches
instantiating app ryu.topology.dumper of DiscoveryEventDumper
instantiating app ryu.controller.ofp_handler of OFPHandler
/usr/local/lib/python2.7/dist-packages/ryu/topology/switches.py:478:
UserWarning: Datapath#ports is kept for compatibility with the previous
openflow versions (< 1.3). This not be updated by EventOFPPortStatus
message. If you want to be updated, you can use 'ryu.controller.dpset' or
'ryu.topology.switches'.
  for port in dp.ports.values():

it seems the message comes from 

    def _get_ports(self):
        if (self.ofproto_parser is not None and
                self.ofproto_parser.ofproto.OFP_VERSION >= 0x04):
            message = (
                'Datapath#ports is kept for compatibility with the previous '
                'openflow versions (< 1.3). '
                'This not be updated by EventOFPPortStatus message. '
                'If you want to be updated, you can use '
                '\'ryu.controller.dpset\' or \'ryu.topology.switches\'.'
            )
            warnings.warn(message, stacklevel=2)
        return self._ports

in https://github.com/osrg/ryu/blob/master/ryu/controller/controller.py

Any suggestion on how to manage it?



------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors 
network devices and physical & virtual servers, alerts via email & sms 
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to