Re: [Ryu-devel] Instatiating a Ryu App in a regular Python aplication

2017-10-19 Thread Carlos Ferreira
I worked my way using your example as a base for what I wanted. Thank you! On 20 October 2017 at 01:33, Fujimoto Satoshi wrote: > Hi, Carlos > > You can pass any arguments to your application, by adding arguments to CONF. > >> from ryu.cmd import manager >> from ryu import cfg >> >> CONF = cfg.C

Re: [Ryu-devel] Instatiating a Ryu App in a regular Python aplication

2017-10-19 Thread Fujimoto Satoshi
Hi, Carlos You can pass any arguments to your application, by adding arguments to CONF. from ryu.cmd import manager from ryu import cfg CONF = cfg.CONF CONF.register_cli_opts([     cfg.StrOpt('additional-opt', default=None,    help='Additional option'), ]) manager.main(args=['--ad

Re: [Ryu-devel] Instatiating a Ryu App in a regular Python aplication

2017-10-19 Thread Carlos Ferreira
Is there a way to pass initialisation arguments to an application, by just sharing a global variable, for example? When I use the example you have provided, the application module is reloaded, resetting global variables and settings. Using CONF is quite limited to me, since I want to start an app

Re: [Ryu-devel] Instatiating a Ryu App in a regular Python aplication

2017-10-12 Thread Fujimoto Satoshi
Hi, Carlos Yes, you can instantiate app_manager.RyuApp with ryu/cmd/manager.py. You can pass the argument list like the below. In this, you should specify the application by name:     from ryu.cmd import manager     manager.main(args=['--verbose', 'ryu.app.simple_switch_13']) Or, if you have a

[Ryu-devel] Instatiating a Ryu App in a regular Python aplication

2017-10-12 Thread Carlos Ferreira
Hello to all, I have been dwelling through the Ryu code and I wonder, is it possible for me to instantiate a Ryu Application without using the ryu-manager? For example, can I instantiate a app_manager.RyuApp class from a regular Python Application? Thank you! Carlos Ferreira ---