From: yasufum.o@gmail.com
To: spp@dpdk.org, ferruh.yigit@intel.com, yasufum.o@gmail.com
Subject: [spp] [PATCH] docs: add API to add or del spp_primary ports
Date: Tue, 30 Jul 2019 16:29:53 +0900 [thread overview]
Message-ID: <20190730072953.9258-1-yasufum.o@gmail.com> (raw)
From: Yasufumi Ogawa <yasufum.o@gmail.com>
This update is to add REST API for spp_primary for adding or deleting
ports.
Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>
---
docs/guides/api_ref/spp_primary.rst | 48 +++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)
diff --git a/docs/guides/api_ref/spp_primary.rst b/docs/guides/api_ref/spp_primary.rst
index 276c7e9..1345a46 100644
--- a/docs/guides/api_ref/spp_primary.rst
+++ b/docs/guides/api_ref/spp_primary.rst
@@ -136,6 +136,54 @@ Response example
}
+PUT /v1/primary/ports
+---------------------
+
+Add or delete port.
+
+* Normal response codes: 204
+* Error response codes: 400, 404
+
+
+Request (body)
+~~~~~~~~~~~~~~
+
+.. _table_spp_ctl_spp_primary_ports_get_body:
+
+.. table:: Request body params of ports of ``spp_primary``.
+
+ +--------+--------+--------------------------------------------------+
+ | Name | Type | Description |
+ | | | |
+ +========+========+==================================================+
+ | action | string | ``add`` or ``del``. |
+ +--------+--------+--------------------------------------------------+
+ | port | string | Resource UID of {port_type}:{port_id}. |
+ +--------+--------+--------------------------------------------------+
+
+
+Request example
+~~~~~~~~~~~~~~~
+
+.. code-block:: console
+
+ $ curl -X PUT -H 'application/json' \
+ -d '{"action": "add", "port": "ring:0"}' \
+ http://127.0.0.1:7777/v1/primary/ports
+
+
+Response
+~~~~~~~~
+
+There is no body content for the response of a successful ``PUT`` request.
+
+
+Equivalent CLI command
+~~~~~~~~~~~~~~~~~~~~~~
+
+Not supported in SPP CLI.
+
+
DELETE /v1/primary/status
-------------------------
--
2.17.1
reply other threads:[~2019-07-30 7:29 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20190730072953.9258-1-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).