Soft Patch Panel
 help / color / mirror / Atom feed
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/4] controller: add POST method for spp-ctl
Date: Thu, 18 Oct 2018 20:28:46 +0900	[thread overview]
Message-ID: <20181018112849.77691-2-ogawa.yasufumi@lab.ntt.co.jp> (raw)
In-Reply-To: <20181018112849.77691-1-ogawa.yasufumi@lab.ntt.co.jp>

From: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>

To send a request of POST, add post() method to SppCtlClient class.

Signed-off-by: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
---
 src/controller/spp_ctl_client.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/controller/spp_ctl_client.py b/src/controller/spp_ctl_client.py
index 0f8687a..3713326 100644
--- a/src/controller/spp_ctl_client.py
+++ b/src/controller/spp_ctl_client.py
@@ -53,6 +53,11 @@ class SppCtlClient(object):
         return requests.put(url, json=params)
 
     @request_handler
+    def post(self, req, params):
+        url = '%s/%s' % (self.base_url, req)
+        return requests.post(url, json=params)
+
+    @request_handler
     def delete(self, req):
         url = '%s/%s' % (self.base_url, req)
         return requests.delete(url)
-- 
2.13.1

  reply	other threads:[~2018-10-18 11:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-18 11:28 [spp] [PATCH 0/4] Add commands of spp_vf to SPP controller ogawa.yasufumi
2018-10-18 11:28 ` ogawa.yasufumi [this message]
2018-10-18 11:28 ` [spp] [PATCH 2/4] controller: add SppVf class ogawa.yasufumi
2018-10-18 11:28 ` [spp] [PATCH 3/4] controller: add vf command to SPP controller ogawa.yasufumi
2018-10-18 11:28 ` [spp] [PATCH 4/4] spp_vf: remove spp_vf controller 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=20181018112849.77691-2-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).