diff options
author | Yaroslav Brustinov <ybrustin@cisco.com> | 2017-01-02 11:53:31 +0200 |
---|---|---|
committer | Yaroslav Brustinov <ybrustin@cisco.com> | 2017-01-02 11:53:31 +0200 |
commit | a681613fd3fc06b0ecb4159b95d55619603c1519 (patch) | |
tree | 667a421ac07173bb5ee98b75695e44eb16b9b16f /scripts | |
parent | 8e73c6bc8c715c655bad86cdd0eaa3d8a1e11ae8 (diff) |
Creating config script: by default dump config to screen, note on -o flag to save to file.
Change-Id: I899943d0005d91f27dafd0395c5cdb5da964df11
Signed-off-by: Yaroslav Brustinov <ybrustin@cisco.com>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/dpdk_setup_ports.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/scripts/dpdk_setup_ports.py b/scripts/dpdk_setup_ports.py index fd2361eb..66af699f 100755 --- a/scripts/dpdk_setup_ports.py +++ b/scripts/dpdk_setup_ports.py @@ -234,7 +234,7 @@ class ConfigCreator(object): return config_str with open(filename, 'w') as f: f.write(config_str) - print('Saved.') + print('Saved to %s.' % filename) return config_str @@ -719,7 +719,11 @@ Other network devices config = ConfigCreator(self._get_cpu_topology(), wanted_interfaces, include_lcores = map_driver.args.create_include, exclude_lcores = map_driver.args.create_exclude, only_first_thread = map_driver.args.no_ht, ignore_numa = map_driver.args.ignore_numa, prefix = map_driver.args.prefix, zmq_rpc_port = map_driver.args.zmq_rpc_port, zmq_pub_port = map_driver.args.zmq_pub_port) - config.create_config(filename = map_driver.args.o, print_config = map_driver.args.dump) + if map_driver.args.output_config: + config.create_config(filename = map_driver.args.output_config) + else: + print('### Dumping config to screen, use -o flag to save to file') + config.create_config(print_config = True) def do_interactive_create(self): ignore_numa = False @@ -922,10 +926,6 @@ To see more detailed info on interfaces (table): help="""Black list of cores to exclude. Make sure there will be enough for each NUMA.""", ) - parser.add_argument("--dump", default=False, action='store_true', - help="""Dump created config to screen.""", - ) - parser.add_argument("--no-ht", default=False, dest='no_ht', action='store_true', help="""Use only one thread of each Core in created config yaml (No Hyper-Threading).""", ) @@ -946,7 +946,7 @@ To see more detailed info on interfaces (table): help="""Default gateways to be used in created yaml file. Without them, will assume loopback (0<->1, 2<->3 etc.)""", ) - parser.add_argument("-o", default=None, action='store', metavar='PATH', + parser.add_argument("-o", default=None, action='store', metavar='PATH', dest = 'output_config', help="""Output the config to this file.""", ) |