I need to be able to read in a path file from my simple_switch.py
application.I have added the following code to my simple_switch.py in
python.

          LOG = logging.getLogger(__name__)
     CONF = cfg.CONF
     CONF.register_cli_opts([
                 cfg.StrOpt('path-file', default='test.txt',
                                                  help='path-file')
         ])

I attempt to start the application as follows.

      bin/ryu-manager --observe-links --path-file test.txt
ryu/app/simple_switch.py

However I get the following error.

usage: ryu-manager [-h] [--app-lists APP_LISTS] [--ca-certs CA_CERTS]
                   [--config-dir DIR] [--config-file PATH]
                   [--ctl-cert CTL_CERT] [--ctl-privkey CTL_PRIVKEY]
                   [--default-log-level DEFAULT_LOG_LEVEL] [--explicit-drop]
                   [--install-lldp-flow] [--log-config-file LOG_CONFIG_FILE]
                   [--log-dir LOG_DIR] [--log-file LOG_FILE]
                   [--log-file-mode LOG_FILE_MODE]
                   [--neutron-admin-auth-url NEUTRON_ADMIN_AUTH_URL]
                   [--neutron-admin-password NEUTRON_ADMIN_PASSWORD]
                   [--neutron-admin-tenant-name NEUTRON_ADMIN_TENANT_NAME]
                   [--neutron-admin-username NEUTRON_ADMIN_USERNAME]
                   [--neutron-auth-strategy NEUTRON_AUTH_STRATEGY]
                   [--neutron-controller-addr NEUTRON_CONTROLLER_ADDR]
                   [--neutron-url NEUTRON_URL]
                   [--neutron-url-timeout NEUTRON_URL_TIMEOUT]
                   [--noexplicit-drop] [--noinstall-lldp-flow]
                   [--noobserve-links] [--nouse-stderr] [--nouse-syslog]
                   [--noverbose] [--observe-links]
                   [--ofp-listen-host OFP_LISTEN_HOST]
                   [--ofp-ssl-listen-port OFP_SSL_LISTEN_PORT]
                   [--ofp-tcp-listen-port OFP_TCP_LISTEN_PORT]
[--use-stderr]
                   [--use-syslog] [--verbose] [--version]
                   [--wsapi-host WSAPI_HOST] [--wsapi-port WSAPI_PORT]
                   [--test-switch-dir TEST-SWITCH_DIR]
                   [--test-switch-target TEST-SWITCH_TARGET]
                   [--test-switch-tester TEST-SWITCH_TESTER]
                   [app [app ...]]
ryu-manager: error: unrecognized arguments: --path-file

It does look like I need to register a new command line option somewhere
before I can use it.Can some-one point out to me how to do that? Also can
someone explain how to access the file(text.txt) inside the program?

Regards,
Karthik.
------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to