Soft Patch Panel
 help / color / Atom feed
* [spp] [PATCH] docs: add API to add or del spp_primary ports
@ 2019-07-30  7:29 yasufum.o
  0 siblings, 0 replies; only message in thread
From: yasufum.o @ 2019-07-30  7:29 UTC (permalink / raw)
  To: spp, ferruh.yigit, yasufum.o

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-30  7:29 [spp] [PATCH] docs: add API to add or del spp_primary ports yasufum.o

Soft Patch Panel

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/spp/0 spp/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 spp spp/ http://inbox.dpdk.org/spp \
		spp@dpdk.org
	public-inbox-index spp


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.spp


AGPL code for this site: git clone https://public-inbox.org/ public-inbox