From: ogawa.yasufumi@lab.ntt.co.jp
To: spp@dpdk.org, ferruh.yigit@intel.com, ogawa.yasufumi@lab.ntt.co.jp
Subject: [spp] [PATCH 1/3] controller: correct status update of processes
Date: Wed, 20 Feb 2019 17:55:00 +0900 [thread overview]
Message-ID: <1550652902-2632-2-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> (raw)
In-Reply-To: <1550652902-2632-1-git-send-email-ogawa.yasufumi@lab.ntt.co.jp>
From: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
For getting the latest status of all of primary and secondaries, SPP CLI
calls init_spp_procs() after command run, but hook method is
inappripriate. This update is to change the hook from precmd() to
postcmd() to correct.
Signed-off-by: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
---
src/controller/shell.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/controller/shell.py b/src/controller/shell.py
index 21543d1..e4685c7 100644
--- a/src/controller/shell.py
+++ b/src/controller/shell.py
@@ -70,7 +70,7 @@ class Shell(cmd.Cmd, object):
"""Initialize delegators of SPP processes.
Delegators accept a command and sent it to SPP proesses. This method
- is also called from `precmd()` method to update it to the latest
+ is also called from `postcmd()` method to update it to the latest
status.
"""
@@ -101,6 +101,9 @@ class Shell(cmd.Cmd, object):
# method and SPP CLI is terminated if it is True. It means that only
# `do_bye` and `do_exit` return True.
def postcmd(self, stop, line):
+ if self.use_cache is False:
+ self.init_spp_procs()
+
# TODO(yasufum) do not add to history if command is failed.
if line.strip().split(' ')[0] not in self.HIST_EXCEPT:
readline.write_history_file(self.hist_file)
@@ -217,9 +220,6 @@ class Shell(cmd.Cmd, object):
It is called for checking a contents of command line.
"""
- if self.use_cache is False:
- self.init_spp_procs()
-
if self.recorded_file:
if not (
('playback' in line) or
--
2.17.1
next prev parent reply other threads:[~2019-02-20 8:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-20 8:54 [spp] [PATCH 0/3] Fix updating status in SPP CLI ogawa.yasufumi
2019-02-20 8:55 ` ogawa.yasufumi [this message]
2019-02-20 8:55 ` [spp] [PATCH 2/3] controller: change to wait for launching sec ogawa.yasufumi
2019-02-20 8:55 ` [spp] [PATCH 3/3] controller: change wait for launch configurable ogawa.yasufumi
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=1550652902-2632-2-git-send-email-ogawa.yasufumi@lab.ntt.co.jp \
--to=ogawa.yasufumi@lab.ntt.co.jp \
--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).