mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-27 19:14:21 +01:00
cloud-hypervisor provides an API server to send commands in a qmp and Firecracker style over an Unix socket. The API is defined via OpenAPI, this commit adds scripts to help to generate a client using: https://github.com/OpenAPITools/openapi-generator This will make easy to update any change related with the API in the future. Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
22 lines
532 B
Makefile
22 lines
532 B
Makefile
#
|
|
# Copyright (c) 2019 Intel Corporation
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
all: | update-yaml generate-client-code
|
|
|
|
generate-client-code: clean-generated-code
|
|
docker run --rm \
|
|
--user $$(id -u):$$(id -g) \
|
|
-v $${PWD}:/local openapitools/openapi-generator-cli generate \
|
|
-i /local/cloud-hypervisor.yaml \
|
|
-g go \
|
|
-o /local/client
|
|
|
|
update-yaml:
|
|
curl -OL https://raw.githubusercontent.com/cloud-hypervisor/cloud-hypervisor/master/vmm/src/api/openapi/cloud-hypervisor.yaml
|
|
|
|
clean-generated-code:
|
|
rm "./client" -rf
|