Skip to content

Commit

Permalink
feat(api_server): add put api for vhost-user drives
Browse files Browse the repository at this point in the history
This addes vhost-user optional object in the Drive object
to provide vhost-user-specific configuration.

Signed-off-by: Nikita Kalyazin <[email protected]>
  • Loading branch information
kalyazin committed Aug 27, 2023
1 parent 154d48d commit 78bb4df
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/api_server/swagger/firecracker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -905,7 +905,10 @@ definitions:
This parameter has been deprecated since v1.6.0.
Use parameters in `file` instead.
$ref: "#/definitions/RateLimiter"

vhost_user:
description:
Configuration for the vhost-user-backed device.
$ref: "#/definitions/VhostUserConfig"
Error:
type: object
properties:
Expand Down Expand Up @@ -1302,6 +1305,15 @@ definitions:
description: The total number of tokens this bucket can hold.
minimum: 0

VhostUserConfig:
type: object
required:
- socket
properties:
socket:
type: string
description: Socket path for vhost-user backend.

Vm:
type: object
description:
Expand Down
3 changes: 3 additions & 0 deletions tests/integration_tests/functional/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,7 @@ def _drive_patch(test_microvm):
"rate_limiter": None,
"io_engine": "Sync",
},
"vhost_user": None,
},
{
"drive_id": "scratch",
Expand All @@ -871,6 +872,7 @@ def _drive_patch(test_microvm):
},
"io_engine": "Async" if is_io_uring_supported() else "Sync",
},
"vhost_user": None,
},
]

Expand Down Expand Up @@ -1186,6 +1188,7 @@ def test_get_full_config(test_microvm_with_api):
"rate_limiter": None,
"io_engine": "Sync",
},
"vhost_user": None,
}
]

Expand Down

0 comments on commit 78bb4df

Please sign in to comment.