Soft Patch Panel
 help / color / mirror / Atom feed
From: Yasufumi Ogawa <yasufum.o@gmail.com>
To: spp@dpdk.org, ferruh.yigit@intel.com, yasufum.o@gmail.com
Subject: [spp] [PATCH 2/5] tools/sppc: check mandatory params for suricata
Date: Thu, 13 Feb 2020 21:10:26 +0900	[thread overview]
Message-ID: <20200213121029.27702-3-yasufum.o@gmail.com> (raw)
In-Reply-To: <20200213121029.27702-1-yasufum.o@gmail.com>

Suricata container app is failed if no dev ID is given because of
accessing None object. This update is to add checking this parameter.

Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>
---
 tools/sppc/app/suricata.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/sppc/app/suricata.py b/tools/sppc/app/suricata.py
index f206036..ad4e053 100755
--- a/tools/sppc/app/suricata.py
+++ b/tools/sppc/app/suricata.py
@@ -29,6 +29,10 @@ def parse_args():
 def main():
     args = parse_args()
 
+    # Check for other mandatory opitons.
+    if args.dev_ids is None:
+        common.error_exit('--dev-ids')
+
     # Setup for vhost devices with given device IDs.
     dev_ids_list = app_helper.dev_ids_to_list(args.dev_ids)
     sock_files = app_helper.sock_files(dev_ids_list)
-- 
2.17.1


  parent reply	other threads:[~2020-02-13 12:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-13 12:10 [spp] [PATCH 0/5] Update SPP Container tools Yasufumi Ogawa
2020-02-13 12:10 ` [spp] [PATCH 1/5] tools/sppc: python3 support for sppc apps Yasufumi Ogawa
2020-02-13 12:10 ` Yasufumi Ogawa [this message]
2020-02-13 12:10 ` [spp] [PATCH 3/5] tools/sppc: refactor container image names Yasufumi Ogawa
2020-02-13 12:10 ` [spp] [PATCH 4/5] tools/sppc: remove duplicated options Yasufumi Ogawa
2020-02-13 12:10 ` [spp] [PATCH 5/5] docs: update list of app container launchers Yasufumi Ogawa

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=20200213121029.27702-3-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).