Skip to content

Commit

Permalink
feat: add vm get endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
dariusbakunas committed Aug 8, 2021
1 parent 2f0d245 commit 030726a
Show file tree
Hide file tree
Showing 14 changed files with 2,912 additions and 156 deletions.
6 changes: 6 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ docs/PoolApi.md
docs/Service.md
docs/ServiceApi.md
docs/UpdateDatasetParams.md
docs/VM.md
docs/VMDevices.md
docs/VMStatus.md
docs/VmApi.md
git_push.sh
go.mod
Expand All @@ -36,5 +39,8 @@ model_dataset.go
model_pool.go
model_service.go
model_update_dataset_params.go
model_vm.go
model_vm_devices.go
model_vm_status.go
response.go
utils.go
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ Class | Method | HTTP request | Description
*DatasetApi* | [**UpdateDataset**](docs/DatasetApi.md#updatedataset) | **Put** /pool/dataset/id/{id} |
*PoolApi* | [**ListPools**](docs/PoolApi.md#listpools) | **Get** /pool |
*ServiceApi* | [**GetService**](docs/ServiceApi.md#getservice) | **Get** /service/id/{id} |
*VmApi* | [**GetVM**](docs/VmApi.md#getvm) | **Get** /vm/id/{id} |
*VmApi* | [**ListVMS**](docs/VmApi.md#listvms) | **Get** /vm |


Expand All @@ -103,6 +104,9 @@ Class | Method | HTTP request | Description
- [Pool](docs/Pool.md)
- [Service](docs/Service.md)
- [UpdateDatasetParams](docs/UpdateDatasetParams.md)
- [VM](docs/VM.md)
- [VMDevices](docs/VMDevices.md)
- [VMStatus](docs/VMStatus.md)


## Documentation For Authorization
Expand Down
225 changes: 150 additions & 75 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,59 @@ paths:
- bearerAuth: []
tags:
- vm
/vm/id/{id}:
get:
description: Get VM details
operationId: getVM
parameters:
- explode: true
in: query
name: limit
required: false
schema:
type: integer
style: form
- explode: true
in: query
name: offset
required: false
schema:
type: integer
style: form
- explode: true
in: query
name: count
required: false
schema:
type: boolean
style: form
- explode: true
in: query
name: sort
required: false
schema:
type: string
style: form
- explode: false
in: path
name: id
required: true
schema:
type: integer
style: simple
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/VM'
description: VM details
"401":
description: No authorization for this endpoint
security:
- bearerAuth: []
tags:
- vm
components:
responses:
NotFound:
Expand Down Expand Up @@ -957,83 +1010,70 @@ components:
- id
- service
type: object
VM:
example:
memory: 1
devices:
- vm: 3
dtype: dtype
attributes: '{}'
id: 7
order: 9
- vm: 3
dtype: dtype
attributes: '{}'
id: 7
order: 9
shutdown_timeout: 2
description: description
threads: 5
vcpus: 6
autostart: true
cores: 5
bootloader: bootloader
name: name
id: 0
time: time
status:
domain_state: domain_state
pid: 2
state: state
properties:
id:
type: integer
name:
type: string
description:
type: string
vcpus:
type: integer
memory:
type: integer
autostart:
type: boolean
time:
type: string
bootloader:
type: string
cores:
type: integer
threads:
type: integer
shutdown_timeout:
type: integer
devices:
items:
$ref: '#/components/schemas/VM_devices'
type: array
status:
$ref: '#/components/schemas/VM_status'
required:
- id
- name
type: object
VMSResponse:
items:
properties:
id:
type: integer
name:
type: string
description:
type: string
vcpus:
type: integer
memory:
type: integer
autostart:
type: boolean
time:
type: string
bootloader:
type: string
cores:
type: integer
threads:
type: integer
shutdown_timeout:
type: integer
devices:
items:
properties:
id:
type: integer
dtype:
type: string
order:
type: integer
vm:
type: integer
attributes:
properties:
type:
type: string
mac:
type: string
nic_attach:
type: string
path:
type: string
wait:
type: boolean
vnc_port:
type: integer
vnc_resolution:
type: string
vnc_bind:
type: string
vnc_password:
type: string
vnc_web:
type: boolean
type: object
required:
- dtype
- id
type: object
type: array
status:
properties:
state:
type: string
pid:
type: integer
domain_state:
type: string
type: object
required:
- id
- name
type: object
$ref: '#/components/schemas/VM'
type: array
CreateDatasetParams_encryption_options:
example:
Expand All @@ -1051,6 +1091,41 @@ components:
key:
type: string
type: object
VM_devices:
example:
vm: 3
dtype: dtype
attributes: '{}'
id: 7
order: 9
properties:
id:
type: integer
dtype:
type: string
order:
type: integer
vm:
type: integer
attributes:
type: object
required:
- dtype
- id
type: object
VM_status:
example:
domain_state: domain_state
pid: 2
state: state
properties:
state:
type: string
pid:
type: integer
domain_state:
type: string
type: object
securitySchemes:
bearerAuth:
bearerFormat: APIKey
Expand Down
Loading

0 comments on commit 030726a

Please sign in to comment.