4. spp_nfv¶
4.1. GET /v1/nfvs/{client_id}¶
Get the information of spp_nfv
.
- Normal response codes: 200
- Error response codes: 400, 404
4.1.2. Request example¶
$ curl -X GET -H 'application/json' \
http://127.0.0.1:7777/v1/nfvs/1
4.1.3. Response¶
Name | Type | Description |
---|---|---|
client-id | integer | client id. |
status | string | running or idling . |
ports | array | an array of port ids used by the process. |
patches | array | an array of patches. |
Patch ports.
Name | Type | Description |
---|---|---|
src | string | source port id. |
dst | string | destination port id. |
4.1.4. Response example¶
{
"client-id": 1,
"status": "running",
"ports": [
"phy:0", "phy:1", "vhost:0", "vhost:1", "ring:0", "ring:1"
],
"patches": [
{
"src": "vhost:0", "dst": "ring:0"
},
{
"src": "ring:1", "dst": "vhost:1"
}
]
}
4.1.5. Equivalent CLI command¶
spp > nfv {client_id}; status
4.2. PUT /v1/nfvs/{client_id}/forward¶
Start or Stop forwarding.
- Normal response codes: 204
- Error response codes: 400, 404
4.2.2. Request example¶
$ curl -X PUT -H 'application/json' \
-d '{"action": "start"}' \
http://127.0.0.1:7777/v1/nfvs/1/forward
4.2.4. Response¶
There is no body content for the response of a successful PUT
request.
4.2.5. Equivalent CLI command¶
Action is start
.
spp > nfv {client_id}; forward
Action is stop
.
spp > nfv {client_id}; stop
4.3. PUT /v1/nfvs/{client_id}/ports¶
Add or delete port.
- Normal response codes: 204
- Error response codes: 400, 404
4.3.2. Request (body)¶
Name | Type | Description |
---|---|---|
action | string | add or del . |
port | string | port id. port id is the form {interface_type}:{interface_id}. |
4.3.3. Request example¶
$ curl -X PUT -H 'application/json' \
-d '{"action": "add", "port": "ring:0"}' \
http://127.0.0.1:7777/v1/nfvs/1/ports
4.3.4. Response¶
There is no body content for the response of a successful PUT
request.
4.3.5. Equivalent CLI command¶
spp > nfv {client_id}; {action} {if_type} {if_id}
4.4. PUT /v1/nfvs/{client_id}/patches¶
Add a patch.
- Normal response codes: 204
- Error response codes: 400, 404
4.4.2. Request (body)¶
Name | Type | Description |
---|---|---|
src | string | source port id. |
dst | string | destination port id. |
4.4.3. Request example¶
$ curl -X PUT -H 'application/json' \
-d '{"src": "ring:0", "dst": "ring:1"}' \
http://127.0.0.1:7777/v1/nfvs/1/patches
4.4.4. Response¶
There is no body content for the response of a successful PUT
request.
4.4.5. Equivalent CLI command¶
spp > nfv {client_id}; patch {src} {dst}
4.5. DELETE /v1/nfvs/{client_id}/patches¶
Reset patches.
- Normal response codes: 204
- Error response codes: 400, 404
4.5.2. Request example¶
$ curl -X DELETE -H 'application/json' \
http://127.0.0.1:7777/v1/nfvs/1/patches
4.5.3. Response¶
There is no body content for the response of a successful DELETE
request.
4.5.4. Equivalent CLI command¶
spp > nfv {client_id}; patch reset
4.6. DELETE /v1/nfvs/{client_id}¶
Terminate spp_nfv
.
- Normal response codes: 204
- Error response codes: 400, 404
4.6.2. Request example¶
$ curl -X DELETE -H 'application/json' \
http://127.0.0.1:7777/v1/nfvs/1
4.6.3. Response example¶
There is no body content for the response of a successful DELETE
request.
4.6.4. Equivalent CLI command¶
spp > nfv {client_id}; exit