From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from tama500.ecl.ntt.co.jp (tama500.ecl.ntt.co.jp [129.60.39.148]) by dpdk.org (Postfix) with ESMTP id A4DA03798 for ; Tue, 2 Oct 2018 06:12:45 +0200 (CEST) Received: from vc2.ecl.ntt.co.jp (vc2.ecl.ntt.co.jp [129.60.86.154]) by tama500.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id w924Cicp016866; Tue, 2 Oct 2018 13:12:44 +0900 Received: from vc2.ecl.ntt.co.jp (localhost [127.0.0.1]) by vc2.ecl.ntt.co.jp (Postfix) with ESMTP id 825FC63878C; Tue, 2 Oct 2018 13:12:44 +0900 (JST) Received: from jcms-pop21.ecl.ntt.co.jp (jcms-pop21.ecl.ntt.co.jp [129.60.87.134]) by vc2.ecl.ntt.co.jp (Postfix) with ESMTP id 76A58637EA6; Tue, 2 Oct 2018 13:12:44 +0900 (JST) Received: from [IPv6:::1] (watercress.nslab.ecl.ntt.co.jp [129.60.13.73]) by jcms-pop21.ecl.ntt.co.jp (Postfix) with ESMTPSA id 6957E400A6E; Tue, 2 Oct 2018 13:12:44 +0900 (JST) From: Yasufumi Ogawa References: <20180923112233.2D71.277DD91C@valinux.co.jp> <20180923112822.2D79.277DD91C@valinux.co.jp> <0e434c24-a503-92d5-99e0-5c2a1fa5cd37@lab.ntt.co.jp> Message-ID: <688c41aa-de24-2c91-97d7-691a5f9e626b@lab.ntt.co.jp> Date: Tue, 2 Oct 2018 13:10:34 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <0e434c24-a503-92d5-99e0-5c2a1fa5cd37@lab.ntt.co.jp> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-CC-Mail-RelayStamp: 1 To: Itsuro ODA , spp@dpdk.org X-TM-AS-MML: disable Subject: Re: [spp] [PATCH v2 2/9] docs: api reference X-BeenThere: spp@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Soft Patch Panel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2018 04:12:47 -0000 On 2018/10/02 12:42, Yasufumi Ogawa wrote: > On 2018/09/23 11:28, Itsuro ODA wrote: >> From: Itsuro Oda >> > This API reference is well defined. However, some of descriptions are not applied with our documentation guidelines. > > * Some of section headers are different from the guideline [1]. > > * All of tables should have a label and a caption, and the format of table is not correct [2]. > > * It is better to add examples of request with curl command. Hi, I have forgotten one thing. Could you change the order of SPP processes in the reference? In SPP documentation, it is explained as primary, spp_nfv, spp_vm and then spp_vf basically and I would like to keep the order also in the API reference. Thanks > > You also need to add license and copyright holder at the top of the file. > > [1] https://doc.dpdk.org/guides/contributing/documentation.html#section-headers > [2] https://doc.dpdk.org/guides/contributing/documentation.html#tables > > Thanks, >> Signed-off-by: Itsuro Oda >> --- >>   docs/guides/spp-ctl/api-reference.rst | 790 ++++++++++++++++++++++++++ >>   1 file changed, 790 insertions(+) >>   create mode 100644 docs/guides/spp-ctl/api-reference.rst >> >> diff --git a/docs/guides/spp-ctl/api-reference.rst b/docs/guides/spp-ctl/api-reference.rst >> new file mode 100644 >> index 0000000..b8bf488 >> --- /dev/null >> +++ b/docs/guides/spp-ctl/api-reference.rst >> @@ -0,0 +1,790 @@ >> +============= >> +API Reference >> +============= >> + >> +Overview >> +======== >> + >> +Spp-ctl provides simple REST like API. It supports http only, not https. >> + >> +Request and Response >> +-------------------- >> + >> +Request body is json format. It is accepted both "text/plain" and "application/json" for the content-type header. >> + >> +Response of GET is json format and the content-type is "application/json" if the request success. >> + >> +If a request fails, the response is a text which shows error reason and the content-type is "text/plain". >> + >> +Error code >> +---------- >> + >> +Spp-ctl does basic syntax and lexical check of a request. >> + >> ++-------+------------------------------------------------------------------------------+ >> +| Error | Description                                                                  | >> ++=======+==============================================================================+ >> +| 400   | Syntax or lexical error of a request.                                        | >> +|       | Or an SPP process returns error for the command correspondings to a request. | >> ++-------+------------------------------------------------------------------------------+ >> +| 404   | URL is not supported for spp-ctl.                                            | >> +|       | Or there is no SPP process of client-id in a URL.                            | >> ++-------+------------------------------------------------------------------------------+ >> +| 500   | A system error occurs in the spp-ctl.                                        | >> +|       | ex. communication error between an SPP processes.                            | >> ++-------+------------------------------------------------------------------------------+ >> + >> + >> +API independent of the process type >> +=================================== >> + >> +GET /v1/processes >> +----------------- >> + >> +Show the SPP processes connected to the spp-ctl. >> + >> +Normarl response codes: 200 >> + >> +Response >> +^^^^^^^^ >> + >> +An array of process objects. >> + >> +process object: >> + >> ++-----------+---------+-------------------------------------------------------------+ >> +| Name      | Type    | Description                                                 | >> ++===========+=========+=============================================================+ >> +| type      | string  | process type. one of "primary", "vf" or "nfv".              | >> ++-----------+---------+-------------------------------------------------------------+ >> +| client-id | integer | client id. if type is "primary" this member does not exist. | >> ++-----------+---------+-------------------------------------------------------------+ >> + >> +Response example >> +^^^^^^^^^^^^^^^^ >> + >> +:: >> + >> +[{"type": "primary"}, {"type": "vf", "client-id": 1}, {"type": "nfv", "client-id": 2}] >> + >> + >> +API for spp_vf >> +============== >> + >> +GET /v1/vfs/{client_id} >> +----------------------- >> + >> +Get the information of the spp_vf process. >> + >> +Normal response codes: 200 >> + >> +Error response codes: 400, 404 >> + >> +Request(path) >> +^^^^^^^^^^^^^ >> + >> ++-----------+---------+-------------------------------------------------------------+ >> +| Name      | Type    | Description                                                 | >> ++===========+=========+=============================================================+ >> +| client_id | integer | client id.                                                  | >> ++-----------+---------+-------------------------------------------------------------+ >> + >> +Response >> +^^^^^^^^ >> + >> ++------------------+---------+-------------------------------------------------------------+ >> +| 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.               | >> ++------------------+---------+-------------------------------------------------------------+ >> + >> +component object: >> + >> ++---------+---------+---------------------------------------------------------------------+ >> +| 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. | >> ++---------+---------+---------------------------------------------------------------------+ >> + >> +port object: >> + >> ++---------+---------+---------------------------------------------------------------------+ >> +| 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.                        | >> ++---------+---------+---------------------------------------------------------------------+ >> + >> +vlan object: >> + >> ++-----------+---------+-------------------------------------------------------------------+ >> +| Name      | Type    | Description                                                       | >> ++===========+=========+===================================================================+ >> +| operation | string  | "add", "del" or "none".                                           | >> ++-----------+---------+-------------------------------------------------------------------+ >> +| id        | integer | vlan id.                                                          | >> ++-----------+---------+-------------------------------------------------------------------+ >> +| pcp       | integer | vlan pcp.                                                         | >> ++-----------+---------+-------------------------------------------------------------------+ >> + >> +classifier table: >> + >> ++-----------+---------+----------------------------------------------------------------------+ >> +| Name      | Type    | Description                                                          | >> ++===========+=========+======================================================================+ >> +| type      | string  | "mac" or "vlan".                                                     | >> ++-----------+---------+----------------------------------------------------------------------+ >> +| value     | string  | "mac address" for "mac" type. "vlan id/mac address" for "vlan" type. | >> ++-----------+---------+----------------------------------------------------------------------+ >> +| port      | string  | port id applied to classify.                                         | >> ++-----------+---------+----------------------------------------------------------------------+ >> + >> +Response example >> +^^^^^^^^^^^^^^^^ >> + >> +:: >> + >> +{ >> +"client-id": 1, >> +"ports": ["phy:0", "phy:1", "vhost:0", "vhost:1", "ring:0", "ring:1", "ring:2", "ring:3"], >> +"components": [ >> +{ >> +"core": 2, >> +"name": "forward_0_tx", >> +"type": "forward", >> +"rx_port": [ >> +{ >> +"port": "ring:0", >> +"vlan": { "operation": "none", "id": 0, "pcp": 0 } >> +} >> +], >> +"tx_port": [ >> +{ >> +"port": "vhost:0", >> +"vlan": { "operation": "none", "id": 0, "pcp": 0 } >> +} >> +] >> +}, >> +{ >> +"core": 3, >> +"type": "unuse" >> +}, >> +{ >> +"core": 4, >> +"type": "unuse" >> +}, >> +{ >> +"core": 5, >> +"name": "forward_1_rx", >> +"type": "forward", >> +"rx_port": [ >> +{ >> +"port": "vhost:1", >> +"vlan": { "operation": "none", "id": 0, "pcp": 0 } >> +} >> +], >> +"tx_port": [ >> +{ >> +"port": "ring:3", >> +"vlan": { "operation": "none", "id": 0, "pcp": 0 } >> +} >> +] >> +}, >> +{ >> +"core": 6, >> +"name": "classifier", >> +"type": "classifier_mac", >> +"rx_port": [ >> +{ >> +"port": "phy:0", >> +"vlan": { "operation": "none", "id": 0, "pcp": 0 } >> +} >> +], >> +"tx_port": [ >> +{ >> +"port": "ring:0", >> +"vlan": { "operation": "none", "id": 0, "pcp": 0 } >> +}, >> +{ >> +"port": "ring:2", >> +"vlan": { "operation": "none", "id": 0, "pcp": 0 } >> +} >> +] >> +}, >> +{ >> +"core": 7, >> +"name": "merger", >> +"type": "merge", >> +"rx_port": [ >> +{ >> +"port": "ring:1", >> +"vlan": { "operation": "none", "id": 0, "pcp": 0 } >> +}, >> +{ >> +"port": "ring:3", >> +"vlan": { "operation": "none", "id": 0, "pcp": 0 } >> +} >> +], >> +"tx_port": [ >> +{ >> +"port": "phy:0", >> +"vlan": { "operation": "none", "id": 0, "pcp": 0 } >> +} >> +] >> +} >> +}, >> +"classifier_table": [ >> +{ >> +"type": "mac", >> +"value": "FA:16:3E:7D:CC:35", >> +"port": "ring:0" >> +} >> +] >> +} >> + >> +Note: The component which type is "unused" is to indicate unused core. >> + >> +Equivalent CLI command >> +^^^^^^^^^^^^^^^^^^^^^^ >> + >> +:: >> + >> +sec {client_id};status >> + >> + >> +POST /v1/vfs/{client_id}/components >> +----------------------------------- >> + >> +Start the component. >> + >> +Normal response codes: 204 >> + >> +Error response codes: 400, 404 >> + >> +Request(path) >> +^^^^^^^^^^^^^ >> + >> ++-----------+---------+-------------------------------------------------------------+ >> +| Name      | Type    | Description                                                 | >> ++===========+=========+=============================================================+ >> +| client_id | integer | client id.                                                  | >> ++-----------+---------+-------------------------------------------------------------+ >> + >> + >> +Request(body) >> +^^^^^^^^^^^^^ >> + >> ++-----------+---------+----------------------------------------------------------------+ >> +| 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". | >> ++-----------+---------+----------------------------------------------------------------+ >> + >> +Request example >> +^^^^^^^^^^^^^^^ >> +:: >> + >> +{"name": "forwarder1", "core": 12, "type": "forward"} >> + >> +Response >> +^^^^^^^^ >> + >> +There is no body content for the response of a successful POST request. >> + >> +Equivalent CLI command >> +^^^^^^^^^^^^^^^^^^^^^^ >> + >> +:: >> + >> +sec {client_id};component start {name} {core} {type} >> + >> + >> +DELETE /v1/vfs/{sec id}/components/{name} >> +----------------------------------------- >> + >> +Stop the component. >> + >> +Normal response codes: 204 >> + >> +Error response codes: 400, 404 >> + >> +Request(path) >> +^^^^^^^^^^^^^ >> + >> ++-----------+---------+-------------------------------------------------------------+ >> +| Name      | Type    | Description                                                 | >> ++===========+=========+=============================================================+ >> +| client_id | integer | client id.                                                  | >> ++-----------+---------+-------------------------------------------------------------+ >> +| name      | string  | component name.                                             | >> ++-----------+---------+-------------------------------------------------------------+ >> + >> +Response >> +^^^^^^^^ >> + >> +There is no body content for the response of a successful POST request. >> + >> +Equivalent CLI command >> +^^^^^^^^^^^^^^^^^^^^^^ >> + >> +:: >> + >> +sec {client_id};component stop {name} >> + >> + >> +PUT /v1/vfs/{client_id}/components/{name}/ports >> +----------------------------------------------- >> + >> +Add or Delete port to the component. >> + >> +Normal response codes: 204 >> + >> +Error response codes: 400, 404 >> + >> +Request(path) >> +^^^^^^^^^^^^^ >> + >> ++-----------+---------+-------------------------------------------------------------+ >> +| Name      | Type    | Description                                                 | >> ++===========+=========+=============================================================+ >> +| client_id | integer | client id.                                                  | >> ++-----------+---------+-------------------------------------------------------------+ >> +| name      | string  | component name.                                             | >> ++-----------+---------+-------------------------------------------------------------+ >> + >> +Request(body) >> +^^^^^^^^^^^^^ >> + >> ++---------+---------+---------------------------------------------------------------------+ >> +| 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.     | >> ++---------+---------+---------------------------------------------------------------------+ >> + >> +vlan object: >> + >> ++-----------+---------+-------------------------------------------------------------------+ >> +| 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".              | >> ++-----------+---------+-------------------------------------------------------------------+ >> + >> +Request example >> +^^^^^^^^^^^^^^^ >> + >> +:: >> + >> +{"action": "attach", "port": "vhost:1", "dir": "rx", >> +"vlan": {"operation": "add", "id": 677, "pcp": 0} >> +} >> + >> +:: >> + >> +{"action": "detach", "port": "vhost:0", "dir": "tx"} >> + >> + >> +Response >> +^^^^^^^^ >> + >> +There is no body content for the response of a successful PUT request. >> + >> + >> +Equivalent CLI command >> +^^^^^^^^^^^^^^^^^^^^^^ >> +action is "attach" >> + >> +:: >> + >> +sec {client_id};port add {port} {dir} {name} [add_vlantag {id} {pcp} | del_vlantag] >> + >> +action is "detach" >> + >> +:: >> + >> +sec {client_id};port del {port} {dir} {name} >> + >> + >> +PUT /v1/vfs/{sec id}/classifier_table >> +------------------------------------- >> + >> +Set or Unset classifier table. >> + >> +Normal response codes: 204 >> + >> +Error response codes: 400, 404 >> + >> +Request(path) >> +^^^^^^^^^^^^^ >> + >> ++-----------+---------+-------------------------------------------------------------+ >> +| Name      | Type    | Description                                                 | >> ++===========+=========+=============================================================+ >> +| client_id | integer | client id.                                                  | >> ++-----------+---------+-------------------------------------------------------------+ >> + >> +Request(body) >> +^^^^^^^^^^^^^ >> + >> ++-------------+-----------------+-------------------------------------------------------------------+ >> +| Name        | Type            | Description                                                       | >> ++=============+=================+===================================================================+ >> +| action      | string          | "add" or "del".                                                   | >> ++-------------+-----------------+-------------------------------------------------------------------+ >> +| type        | string          | "mac" or "vlan".                                                  | >> ++-------------+-----------------+-------------------------------------------------------------------+ >> +| vlan        | integer or null | vlan id when type is "vlan. null or omitted when type is "mac".   | >> ++-------------+-----------------+-------------------------------------------------------------------+ >> +| mac_address | string          | mac address.                                                      | >> ++-------------+-----------------+-------------------------------------------------------------------+ >> +| port        | string          | port id.                                                          | >> ++-------------+-----------------+-------------------------------------------------------------------+ >> + >> +Request example >> +^^^^^^^^^^^^^^^ >> + >> +:: >> + >> +{"action": "add", "type": "mac", >> +"mac_address": "FA:16:3E:7D:CC:35", "port": "ring:0" >> +} >> + >> +:: >> + >> +{"action": "del", "type": "vlan", "vlan": 475, >> +"mac_address": "FA:16:3E:7D:CC:35", "port": "ring:0" >> +} >> + >> + >> +Response >> +^^^^^^^^ >> + >> +There is no body content for the response of a successful PUT request. >> + >> +Equivalent CLI command >> +^^^^^^^^^^^^^^^^^^^^^^ >> + >> +type is "mac" >> + >> +:: >> + >> +classifier_table {action} mac {mac_address} {port} >> + >> +type is "vlan" >> + >> +:: >> + >> +classifier_table {action} vlan {vlan} {mac_address} {port} >> + >> + >> +API for spp_nfv/spp_vm >> +====================== >> + >> +GET /v1/nfvs/{client_id} >> +------------------------ >> + >> +Get the information of the spp_nfv/spp_vm process. >> + >> +Normal response codes: 200 >> + >> +Error response codes: 400, 404 >> + >> +Request(path) >> +^^^^^^^^^^^^^ >> + >> ++-----------+---------+-------------------------------------------------------------+ >> +| Name      | Type    | Description                                                 | >> ++===========+=========+=============================================================+ >> +| client_id | integer | client id.                                                  | >> ++-----------+---------+-------------------------------------------------------------+ >> + >> +Response >> +^^^^^^^^ >> + >> ++------------------+---------+-------------------------------------------------------------+ >> +| Name             | Type    | Description                                                 | >> ++==================+=========+=============================================================+ >> +| client-id        | integer | client id.                                                  | >> ++------------------+---------+-------------------------------------------------------------+ >> +| status           | string  | "Running" or "Idle".                                        | >> ++------------------+---------+-------------------------------------------------------------+ >> +| ports            | array   | an array of port ids used by the process.                   | >> ++------------------+---------+-------------------------------------------------------------+ >> +| patches          | array   | an array of patches.                                        | >> ++------------------+---------+-------------------------------------------------------------+ >> + >> +patch objest >> + >> ++----------+---------+-------------------------------------------------------------+ >> +| Name     | Type    | Description                                                 | >> ++==========+=========+=============================================================+ >> +| src      | string  | source port id.                                             | >> ++----------+---------+-------------------------------------------------------------+ >> +| dst      | string  | destination port id.                                        | >> ++----------+---------+-------------------------------------------------------------+ >> + >> +Response example >> +^^^^^^^^^^^^^^^^ >> + >> +:: >> + >> +{ >> +"client-id": 1, >> +"status": "Running", >> +"ports": ["phy:0", "phy:1", "vhost:0", "vhost:1", "ring:0", "ring:1", "ring:2", "ring:3"], >> +"patches": [ >> +{"src": "vhost:0", "dst": "ring:0"}, >> +{"src": "ring:1", "dst": "vhost:1"} >> +] >> +} >> + >> +Equivalent CLI command >> +^^^^^^^^^^^^^^^^^^^^^^ >> + >> +:: >> + >> +sec {client_id};status >> + >> + >> +PUT /v1/nfvs/{client_id}/forward >> +-------------------------------- >> + >> +Start or Stop forwarding. >> + >> +Normal response codes: 204 >> + >> +Error response codes: 400, 404 >> + >> +Request(path) >> +^^^^^^^^^^^^^ >> + >> ++-----------+---------+-------------------------------------------------------------+ >> +| Name      | Type    | Description                                                 | >> ++===========+=========+=============================================================+ >> +| client_id | integer | client id.                                                  | >> ++-----------+---------+-------------------------------------------------------------+ >> + >> +Request(body) >> +^^^^^^^^^^^^^ >> + >> ++-----------+---------+-------------------------------------------------------------+ >> +| Name      | Type    | Description                                                 | >> ++===========+=========+=============================================================+ >> +| action    | string  | "start" or "stop".                                          | >> ++-----------+---------+-------------------------------------------------------------+ >> + >> +Request example >> +^^^^^^^^^^^^^^^ >> + >> +:: >> + >> +{"action": "start"} >> + >> +Response >> +^^^^^^^^ >> + >> +There is no body content for the response of a successful PUT request. >> + >> +Equivalent CLI command >> +^^^^^^^^^^^^^^^^^^^^^^ >> + >> +action is "start" >> + >> +:: >> + >> +sec {client_id};forward >> + >> +action is "stop" >> + >> +:: >> + >> +sec {client_id};stop >> + >> + >> +PUT /v1/nfvs/{client_id}/ports >> +------------------------------ >> + >> +Add or Delete port. >> + >> +Normal response codes: 204 >> + >> +Error response codes: 400, 404 >> + >> +Request(path) >> +^^^^^^^^^^^^^ >> + >> ++-----------+---------+-------------------------------------------------------------+ >> +| Name      | Type    | Description                                                 | >> ++===========+=========+=============================================================+ >> +| client_id | integer | client id.                                                  | >> ++-----------+---------+-------------------------------------------------------------+ >> + >> +Request(body) >> +^^^^^^^^^^^^^ >> + >> ++-----------+---------+---------------------------------------------------------------+ >> +| Name      | Type    | Description                                                   | >> ++===========+=========+===============================================================+ >> +| action    | string  | "add" or "del".                                               | >> ++-----------+---------+---------------------------------------------------------------+ >> +| port      | string  | port id. port id is the form {interface_type}:{interface_id}. | >> ++-----------+---------+---------------------------------------------------------------+ >> + >> +Request example >> +^^^^^^^^^^^^^^^ >> + >> +:: >> + >> +{"action": "add", "port": "vhost:0"} >> + >> + >> +Response >> +^^^^^^^^ >> + >> +There is no body content for the response of a successful PUT request. >> + >> +Equivalent CLI command >> +^^^^^^^^^^^^^^^^^^^^^^ >> + >> +:: >> + >> +sec {client_id};{action} {interface_type} {interface_id} >> + >> + >> +PUT /v1/nfvs/{client_id}/patches >> +-------------------------------- >> + >> +Add a patch. >> + >> +Normal response codes: 204 >> + >> +Error response codes: 400, 404 >> + >> +Request(path) >> +^^^^^^^^^^^^^ >> + >> ++-----------+---------+-------------------------------------------------------------+ >> +| Name      | Type    | Description                                                 | >> ++===========+=========+=============================================================+ >> +| client_id | integer | client id.                                                  | >> ++-----------+---------+-------------------------------------------------------------+ >> + >> +Request(body) >> +^^^^^^^^^^^^^ >> + >> ++----------+---------+-------------------------------------------------------------+ >> +| Name     | Type    | Description                                                 | >> ++==========+=========+=============================================================+ >> +| src      | string  | source port id.                                             | >> ++----------+---------+-------------------------------------------------------------+ >> +| dst      | string  | destination port id.                                        | >> ++----------+---------+-------------------------------------------------------------+ >> + >> +Request example >> +^^^^^^^^^^^^^^^ >> + >> +:: >> + >> +{"src": "vhost:0", "dst": "ring:0"} >> + >> +Response >> +^^^^^^^^ >> + >> +There is no body content for the response of a successful PUT request. >> + >> +Equivalent CLI command >> +^^^^^^^^^^^^^^^^^^^^^^ >> + >> +:: >> + >> +sec {client_id};patch {src} {dst} >> + >> + >> +DELETE /v1/nfvs/{client_id}/patches >> +----------------------------------- >> + >> +Reset patches. >> + >> +Normal response codes: 204 >> + >> +Error response codes: 400, 404 >> + >> +Request(path) >> +^^^^^^^^^^^^^ >> + >> ++-----------+---------+-------------------------------------------------------------+ >> +| Name      | Type    | Description                                                 | >> ++===========+=========+=============================================================+ >> +| client_id | integer | client id.                                                  | >> ++-----------+---------+-------------------------------------------------------------+ >> + >> +Response >> +^^^^^^^^ >> + >> +There is no body content for the response of a successful DELETE request. >> + >> +Equivalent CLI command >> +^^^^^^^^^^^^^^^^^^^^^^ >> + >> +:: >> + >> +sec {client_id};patch reset >> + >> + >> +API for spp_primary >> +=================== >> + >> +GET /v1/primary/status >> +---------------------- >> + >> +Show statistical information. >> + >> +Normal response codes: 200 >> + >> +Response >> +^^^^^^^^ >> + >> +There is no data at the moment. The statistical information will be returned when spp_primary >> +implements it. >> + >> + >> +DELETE /v1/primary/status >> +------------------------- >> + >> +Clear statistical information. >> + >> +Normal response codes: 204 >> + >> +Response >> +^^^^^^^^ >> + >> +There is no body content for the response of a successful PUT request. >> + >> > > -- Yasufumi Ogawa NTT Network Service Systems Labs