diff --git a/ryu/cmd/manager.py b/ryu/cmd/manager.py index b1180f7b..4710547b 100755 --- a/ryu/cmd/manager.py +++ b/ryu/cmd/manager.py @@ -52,12 +52,14 @@ CONF.register_cli_opts([ ]) -def main(): +def main(args=None, prog=None): try: - CONF(project='ryu', version='ryu-manager %s' % version, + CONF(args=args, prog=prog, + project='ryu', version='ryu-manager %s' % version, default_config_files=['/usr/local/etc/ryu/ryu.conf']) except cfg.ConfigFilesNotFoundError: - CONF(project='ryu', version='ryu-manager %s' % version) + CONF(args=args, prog=prog, + project='ryu', version='ryu-manager %s' % version) log.init_log() diff --git a/ryu/cmd/of_config_cli.py b/ryu/cmd/of_config_cli.py index 0f4c2cf4..61de4e45 100755 --- a/ryu/cmd/of_config_cli.py +++ b/ryu/cmd/of_config_cli.py @@ -545,8 +545,9 @@ lost-connection-behavior failStandaloneMode self._in_onecmd = False -def main(): - CONF(project='of-config-cli', version='of-config-cli') +def main(args=None, prog=None): + CONF(args=args, prog=prog, + project='of-config-cli', version='of-config-cli') for p_str in CONF.peers: name, addr = p_str.split('=') diff --git a/ryu/cmd/rpc_cli.py b/ryu/cmd/rpc_cli.py index a297000b..691f9a2d 100755 --- a/ryu/cmd/rpc_cli.py +++ b/ryu/cmd/rpc_cli.py @@ -222,8 +222,8 @@ class Cmd(cmd.Cmd): signal.alarm(self._notification_check_interval) -def main(): - CONF(project='rpc-cli', version='rpc-cli') +def main(args=None, prog=None): + CONF(args=args, prog=prog, project='rpc-cli', version='rpc-cli') for p_str in CONF.peers: name, addr = p_str.split('=')