[API] add API spec for applying limiters to network interfaces
@@ -165,7 +165,7 @@ paths:
description: "Returns list of guest network interfaces."
operationId: "getGuestNetworkInterfaces"
responses:
- 205:
+ 200:
description: List of guest network interfaces
schema:
type: array
@@ -186,7 +186,7 @@ paths:
required: true
type: string
responses:
- 205:
+ 200:
description: Specified network interface.
schema:
$ref: "#/definitions/NetworkInterface"
@@ -218,6 +218,8 @@ paths:
responses:
201:
description: Network interface created.
+ 204:
+ description: Network interface updated.
400:
description: Network interface cannot be created due to bad input.
schema:
@@ -243,6 +245,58 @@ paths:
description: Internal server error.
schema:
$ref: '#/definitions/Error'
+ /network-interfaces/{iface_id}/limiters:
+ get:
+ summary: Retrieves list of limiters IDs currently applied to the network interface with 'iface_id'.
+ operationId: "getLimitersForGuestNetworkInterface"
+ parameters:
+ - name: "iface_id"
+ in: path
+ description: "The id of the guest network interface to get limiters for."
+ required: true
+ type: string
+ responses:
+ 200:
+ description: List of limiters IDs currently applied to this network interface.
+ schema:
+ type: array
+ items:
+ type: integer
+ format: int32
+ 404:
+ description: Network interface does not exist.
+ schema:
+ $ref: '#/definitions/Error'
+ default:
+ description: Internal server error.
+ schema:
+ $ref: '#/definitions/Error'
+ /network-interfaces/{iface_id}/limiters/{limiter_id}:
+ put:
+ summary: Applies limiter 'limiter_id' to network interface 'iface_id'
+ operationId: applyLimiterToNetworkInterface
+ parameters:
+ - name: "iface_id"
+ in: path
+ description: "The id of the guest network interface to apply limiter 'limiter_id' to."
+ required: true
+ type: string
+ - name: "limiter_id"
+ in: path
+ description: "The id of the limiter to be applied to network interface 'iface_id'."
+ required: true
+ type: string
+ responses:
+ 200:
+ description: Limiter applied.
+ 400:
+ description: Limiter cannot be applied due to bad input.
+ schema:
+ $ref: '#/definitions/Error'
+ default:
+ description: Internal server error.
+ schema:
+ $ref: '#/definitions/Error'
definitions:
DeviceState:
