From: Yasufumi Ogawa <yasufum.o@gmail.com>
To: spp@dpdk.org, ferruh.yigit@intel.com, yasufum.o@gmail.com
Subject: [spp] [PATCH 7/7] cli: fix parsing forward and stop commands
Date: Thu, 16 Jan 2020 21:02:35 +0900 [thread overview]
Message-ID: <20200116120235.31550-8-yasufum.o@gmail.com> (raw)
In-Reply-To: <20200116120235.31550-1-yasufum.o@gmail.com>
This update is to fix a bug in which _run_forward_or_stop() expects a
str type argument, but passed a list.
Fixes: 17c6d451fa60 ("cli: add filter for running pri commands")
Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>
---
src/cli/commands/pri.py | 6 +++---
src/cli/spp_ctl_client.py | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/cli/commands/pri.py b/src/cli/commands/pri.py
index b39f911..a13137d 100644
--- a/src/cli/commands/pri.py
+++ b/src/cli/commands/pri.py
@@ -105,9 +105,9 @@ class SppPrimary(object):
elif subcmd == 'del':
self._do_if_forwarder_exists(status, self._run_del, params)
- elif subcmd == 'forward' or cmd == 'stop':
+ elif subcmd == 'forward' or subcmd == 'stop':
self._do_if_forwarder_exists(status,
- self._run_forward_or_stop, params)
+ self._run_forward_or_stop, subcmd)
elif subcmd == 'patch':
self._do_if_forwarder_exists(status, self._run_patch, params)
@@ -818,7 +818,7 @@ class SppPrimary(object):
elif cmd == 'stop':
req_params = {'action': 'stop'}
else:
- print('Unknown command. "forward" or "stop"?')
+ print('Unknown command {}. "forward" or "stop"?'.format(cmd))
res = self.spp_ctl_cli.put('primary/forward', req_params)
diff --git a/src/cli/spp_ctl_client.py b/src/cli/spp_ctl_client.py
index 7418353..7b366b2 100644
--- a/src/cli/spp_ctl_client.py
+++ b/src/cli/spp_ctl_client.py
@@ -31,10 +31,10 @@ class SppCtlClient(object):
# for spp.py.
if res.status_code == 400:
logger.info('Syntax or lexical error, or SPP '
- 'returns error for the request.')
+ 'returns error for the request.')
elif res.status_code == 404:
logger.info('URL is not supported, or no SPP '
- 'process of client-id in a URL.')
+ 'process of client-id in a URL.')
elif res.status_code == 500:
logger.info('System error occured in spp-ctl.')
--
2.17.1
prev parent reply other threads:[~2020-01-16 12:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-16 12:02 [spp] [PATCH 0/7] Update for fixing errors for CLI Yasufumi Ogawa
2020-01-16 12:02 ` [spp] [PATCH 1/7] shared: revise vdev prefixs of pcap and nullpmd Yasufumi Ogawa
2020-01-16 12:02 ` [spp] [PATCH 2/7] shared: fix wrong port_type in parsing dev name Yasufumi Ogawa
2020-01-16 12:02 ` [spp] [PATCH 3/7] cli: add filter for running pri commands Yasufumi Ogawa
2020-01-16 12:02 ` [spp] [PATCH 4/7] cli: fix error in asking ports if no pri forwarder Yasufumi Ogawa
2020-01-16 12:02 ` [spp] [PATCH 5/7] cli: fix terminated if spp_primary is not running Yasufumi Ogawa
2020-01-16 12:02 ` [spp] [PATCH 6/7] cli: move logfile to under project log dir Yasufumi Ogawa
2020-01-16 12:02 ` Yasufumi Ogawa [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200116120235.31550-8-yasufum.o@gmail.com \
--to=yasufum.o@gmail.com \
--cc=ferruh.yigit@intel.com \
--cc=spp@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).