Soft Patch Panel
 help / color / mirror / Atom feed
From: ogawa.yasufumi@lab.ntt.co.jp
To: ferruh.yigit@intel.com, spp@dpdk.org, ogawa.yasufumi@lab.ntt.co.jp
Subject: [spp] [PATCH 3/4] docs: refactor spp_nfv REST API reference
Date: Thu, 31 Jan 2019 20:03:08 +0900	[thread overview]
Message-ID: <1548932589-21099-4-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> (raw)
In-Reply-To: <1548932589-21099-1-git-send-email-ogawa.yasufumi@lab.ntt.co.jp>

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

There are several invalid lines over the maximum 80 chars. This update
is to reduce the length of lines.

Signed-off-by: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
---
 docs/guides/api_ref/spp_vf.rst | 187 +++++++++++++++++++++--------------------
 1 file changed, 96 insertions(+), 91 deletions(-)

diff --git a/docs/guides/api_ref/spp_vf.rst b/docs/guides/api_ref/spp_vf.rst
index a600773..c406938 100644
--- a/docs/guides/api_ref/spp_vf.rst
+++ b/docs/guides/api_ref/spp_vf.rst
@@ -47,18 +47,18 @@ Response
 
 .. table:: Response params of getting spp_vf.
 
-    +------------------+---------+-----------------------------------------------+
-    | Name             | Type    | Description                                   |
-    |                  |         |                                               |
-    +==================+=========+===============================================+
-    | client-id        | integer | client id.                                    |
-    +------------------+---------+-----------------------------------------------+
-    | ports            | array   | an array of port ids used by the process.     |
-    +------------------+---------+-----------------------------------------------+
-    | components       | array   | an array of component objects in the process. |
-    +------------------+---------+-----------------------------------------------+
-    | classifier_table | array   | an array of classifier tables in the process. |
-    +------------------+---------+-----------------------------------------------+
+    +------------------+---------+--------------------------------------------+
+    | Name             | Type    | Description                                |
+    |                  |         |                                            |
+    +==================+=========+============================================+
+    | client-id        | integer | Client id.                                 |
+    +------------------+---------+--------------------------------------------+
+    | ports            | array   | Array of port ids used by the process.     |
+    +------------------+---------+--------------------------------------------+
+    | components       | array   | Array of component objects in the process. |
+    +------------------+---------+--------------------------------------------+
+    | classifier_table | array   | Array of classifier tables in the process. |
+    +------------------+---------+--------------------------------------------+
 
 Component objects:
 
@@ -66,20 +66,20 @@ Component objects:
 
 .. table:: Component objects of getting spp_vf.
 
-    +---------+---------+---------------------------------------------------------------------+
-    | Name    | Type    | Description                                                         |
-    |         |         |                                                                     |
-    +=========+=========+=====================================================================+
-    | core    | integer | core id running on the component                                    |
-    +---------+---------+---------------------------------------------------------------------+
-    | name    | string  | an array of port ids used by the process.                           |
-    +---------+---------+---------------------------------------------------------------------+
-    | type    | string  | an array of component objects in the process.                       |
-    +---------+---------+---------------------------------------------------------------------+
-    | rx_port | array   | an array of port objects connected to the rx side of the component. |
-    +---------+---------+---------------------------------------------------------------------+
-    | tx_port | array   | an array of port objects connected to the tx side of the component. |
-    +---------+---------+---------------------------------------------------------------------+
+    +---------+---------+--------------------------------------------------+
+    | Name    | Type    | Description                                      |
+    |         |         |                                                  |
+    +=========+=========+==================================================+
+    | core    | integer | Core id running on the component                 |
+    +---------+---------+--------------------------------------------------+
+    | name    | string  | Array of port ids used by the process.           |
+    +---------+---------+--------------------------------------------------+
+    | type    | string  | Array of component objects in the process.       |
+    +---------+---------+--------------------------------------------------+
+    | rx_port | array   | Array of port objs connected to rx of component. |
+    +---------+---------+--------------------------------------------------+
+    | tx_port | array   | Array of port objs connected to tx of component. |
+    +---------+---------+--------------------------------------------------+
 
 Port objects:
 
@@ -87,14 +87,14 @@ Port objects:
 
 .. table:: Port objects of getting spp_vf.
 
-    +---------+---------+---------------------------------------------------------------+
-    | Name    | Type    | Description                                                   |
-    |         |         |                                                               |
-    +=========+=========+===============================================================+
-    | port    | string  | port id. port id is the form {interface_type}:{interface_id}. |
-    +---------+---------+---------------------------------------------------------------+
-    | vlan    | object  | vlan operation which is applied to the port.                  |
-    +---------+---------+---------------------------------------------------------------+
+    +---------+---------+----------------------------------------------+
+    | Name    | Type    | Description                                  |
+    |         |         |                                              |
+    +=========+=========+==============================================+
+    | port    | string  | port id of {interface_type}:{interface_id}.  |
+    +---------+---------+----------------------------------------------+
+    | vlan    | object  | vlan operation which is applied to the port. |
+    +---------+---------+----------------------------------------------+
 
 Vlan objects:
 
@@ -119,16 +119,16 @@ Classifier table:
 
 .. table:: Vlan objects of getting spp_vf.
 
-    +-----------+--------+------------------------------------------------------------+
-    | Name      | Type   | Description                                                |
-    |           |        |                                                            |
-    +===========+========+============================================================+
-    | type      | string | ``mac`` or ``vlan``.                                       |
-    +-----------+--------+------------------------------------------------------------+
-    | value     | string | mac_address for ``mac``, vlan_id/mac_address for ``vlan``. |
-    +-----------+--------+------------------------------------------------------------+
-    | port      | string | port id applied to classify.                               |
-    +-----------+--------+------------------------------------------------------------+
+    +-----------+--------+-------------------------------------+
+    | Name      | Type   | Description                         |
+    |           |        |                                     |
+    +===========+========+=====================================+
+    | type      | string | ``mac`` or ``vlan``.                |
+    +-----------+--------+-------------------------------------+
+    | value     | string | mac_address or vlan_id/mac_address. |
+    +-----------+--------+-------------------------------------+
+    | port      | string | port id applied to classify.        |
+    +-----------+--------+-------------------------------------+
 
 
 Response example
@@ -273,20 +273,22 @@ Request (path)
 Request (body)
 ~~~~~~~~~~~~~~
 
+``type`` param is oen of ``forward``, ``merge`` or ``classifier_mac``.
+
 .. _table_spp_ctl_spp_vf_components_res:
 
 .. table:: Response params of components of spp_vf.
 
-    +-----------+---------+----------------------------------------------------------------------+
-    | Name      | Type    | Description                                                          |
-    |           |         |                                                                      |
-    +===========+=========+======================================================================+
-    | name      | string  | component name. must be unique in the process.                       |
-    +-----------+---------+----------------------------------------------------------------------+
-    | core      | integer | core id.                                                             |
-    +-----------+---------+----------------------------------------------------------------------+
-    | type      | string  | component type. one of ``forward``, ``merge`` or ``classifier_mac``. |
-    +-----------+---------+----------------------------------------------------------------------+
+    +-----------+---------+--------------------------------------------------+
+    | Name      | Type    | Description                                      |
+    |           |         |                                                  |
+    +===========+=========+==================================================+
+    | name      | string  | component name should be unique among processes. |
+    +-----------+---------+--------------------------------------------------+
+    | core      | integer | core id.                                         |
+    +-----------+---------+--------------------------------------------------+
+    | type      | string  | component type.                                  |
+    +-----------+---------+--------------------------------------------------+
 
 Request example
 ~~~~~~~~~~~~~~~
@@ -394,18 +396,18 @@ Request (body)
 
 .. table:: Request body params for ports of component of spp_vf.
 
-    +---------+---------+-----------------------------------------------------------------+
-    | Name    | Type    | Description                                                     |
-    |         |         |                                                                 |
-    +=========+=========+=================================================================+
-    | action  | string  | ``attach`` or ``detach``.                                       |
-    +---------+---------+-----------------------------------------------------------------+
-    | port    | string  | port id. port id is the form {interface_type}:{interface_id}.   |
-    +---------+---------+-----------------------------------------------------------------+
-    | dir     | string  | ``rx`` or ``tx``.                                               |
-    +---------+---------+-----------------------------------------------------------------+
-    | vlan    | object  | vlan operation which is applied to the port. it can be omitted. |
-    +---------+---------+-----------------------------------------------------------------+
+    +---------+---------+----------------------------------------------------+
+    | Name    | Type    | Description                                        |
+    |         |         |                                                    |
+    +=========+=========+====================================================+
+    | action  | string  | ``attach`` or ``detach``.                          |
+    +---------+---------+----------------------------------------------------+
+    | port    | string  | port id of {interface_type}:{interface_id}.        |
+    +---------+---------+----------------------------------------------------+
+    | dir     | string  | ``rx`` or ``tx``.                                  |
+    +---------+---------+----------------------------------------------------+
+    | vlan    | object  | vlan operation applied to port. it can be omitted. |
+    +---------+---------+----------------------------------------------------+
 
 Vlan object:
 
@@ -413,16 +415,16 @@ Vlan object:
 
 .. table:: Request body params for vlan ports of component of spp_vf.
 
-    +-----------+---------+----------------------------------------------------------+
-    | Name      | Type    | Description                                              |
-    |           |         |                                                          |
-    +===========+=========+==========================================================+
-    | operation | string  | ``add``, ``del`` or ``none``.                            |
-    +-----------+---------+----------------------------------------------------------+
-    | id        | integer | vlan id. ignored when operation is ``del`` or ``none``.  |
-    +-----------+---------+----------------------------------------------------------+
-    | pcp       | integer | vlan pcp. ignored when operation is ``del`` or ``none``. |
-    +-----------+---------+----------------------------------------------------------+
+    +-----------+---------+---------------------------------------------------+
+    | Name      | Type    | Description                                       |
+    |           |         |                                                   |
+    +===========+=========+===================================================+
+    | operation | string  | ``add``, ``del`` or ``none``.                     |
+    +-----------+---------+---------------------------------------------------+
+    | id        | integer | vid. ignored if operation is ``del`` or ``none``. |
+    +-----------+---------+---------------------------------------------------+
+    | pcp       | integer | pcp. ignored if operation is ``del`` or ``none``. |
+    +-----------+---------+---------------------------------------------------+
 
 
 Request example
@@ -500,24 +502,26 @@ Request (path)
 Request (body)
 ~~~~~~~~~~~~~~
 
+For ``vlan`` param, it can be omitted if it is for ``mac``.
+
 .. _table_spp_ctl_spp_vf_cls_table_body:
 
 .. table:: Request body params for classifier_table of spp_vf.
 
-    +-------------+-----------------+----------------------------------------------------+
-    | Name        | Type            | Description                                        |
-    |             |                 |                                                    |
-    +=============+=================+====================================================+
-    | action      | string          | ``add`` or ``del``.                                |
-    +-------------+-----------------+----------------------------------------------------+
-    | type        | string          | ``mac`` or ``vlan``.                               |
-    +-------------+-----------------+----------------------------------------------------+
-    | vlan        | integer or null | vlan id for ``vlan``. null or omitted for ``mac``. |
-    +-------------+-----------------+----------------------------------------------------+
-    | mac_address | string          | mac address.                                       |
-    +-------------+-----------------+----------------------------------------------------+
-    | port        | string          | port id.                                           |
-    +-------------+-----------------+----------------------------------------------------+
+    +-------------+-----------------+-----------------------------------------+
+    | Name        | Type            | Description                             |
+    |             |                 |                                         |
+    +=============+=================+=========================================+
+    | action      | string          | ``add`` or ``del``.                     |
+    +-------------+-----------------+-----------------------------------------+
+    | type        | string          | ``mac`` or ``vlan``.                    |
+    +-------------+-----------------+-----------------------------------------+
+    | vlan        | integer or null | vlan id for ``vlan``. null for ``mac``. |
+    +-------------+-----------------+-----------------------------------------+
+    | mac_address | string          | mac address.                            |
+    +-------------+-----------------+-----------------------------------------+
+    | port        | string          | port id.                                |
+    +-------------+-----------------+-----------------------------------------+
 
 
 Request example
@@ -529,7 +533,8 @@ the table.
 .. code-block:: console
 
     $ curl -X PUT -H 'application/json' \
-      -d '{"action": "add", "type": "mac", "mac_address": "FA:16:3E:7D:CC:35", \
+      -d '{"action": "add", "type": "mac", \
+         "mac_address": "FA:16:3E:7D:CC:35", \
          "port": "ring:0"}' \
       http://127.0.0.1:7777/v1/vfs/1/classifier_table
 
-- 
2.7.4

  parent reply	other threads:[~2019-01-31 11:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-31 11:03 [spp] [PATCH 0/4] Update REST API reference and usecases ogawa.yasufumi
2019-01-31 11:03 ` [spp] [PATCH 1/4] docs: add lcores in pri status in REST API ogawa.yasufumi
2019-01-31 11:03 ` [spp] [PATCH 2/4] docs: add launch of primary to REST API reference ogawa.yasufumi
2019-01-31 11:03 ` ogawa.yasufumi [this message]
2019-01-31 11:03 ` [spp] [PATCH 4/4] docs: add usage of server add command in usecase 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=1548932589-21099-4-git-send-email-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).