Soft Patch Panel
 help / color / mirror / 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, other threads:[~2019-07-30  7:29 UTC | newest]

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

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).