/
vm.yaml
170 lines (167 loc) · 4.66 KB
/
vm.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
openapi: "3.0.2"
info:
version: 3.2.0
x-date: 17-06-2019
x-status: defined
title: Virtual Machine
description: |-
Vm is used to manage virtual machines.
termsOfService: https://github.com/cloudmesh-community/nist/blob/main/LICENSE.txt
contact:
name: NIST BDRA Interface Subgroup Service
url: https://cloudmesh-community.github.io/nist/spec/
license:
name: Apache 2.0
url: https://github.com/cloudmesh/cloudmesh-nist/blob/main/LICENSE.txt
servers:
- url: /cloudmesh/v3
paths:
/vm/{cloud}:
get:
tags:
- Vm
summary: Returns a list of virtual machines for the cloud
description: Returns a list of all virtual machines
operationId: cloudmesh.vm.list
parameters:
- name: cloud
in: path
required: true
schema:
type: string
description: The name of the cloud
responses:
'200':
description: The list of virtual machines
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Vm'
'400':
description: No Vm found
'401':
description: Not authorized
/vm/{cloud}/{name}:
get:
tags:
- Vm
summary: Returns the named virtual machine
description: Returns a virtual machine by name
operationId: cloudmesh.vm.find_by_name
parameters:
- name: cloud
in: path
description: The name of the cloud
required: true
schema:
type: string
- name: name
in: path
description: The name of the virtual machine
required: true
schema:
type: string
responses:
'200':
description: Returning the information of the virtual machine
content:
application/json:
schema:
$ref: '#/components/schemas/Vm'
'400':
description: Error updating virtual machine
'401':
description: Not authorized
'404':
description: The named virtual machine or cloud could not be found
put:
tags:
- Vm
summary: Add a virtual machine
description: Sets the named virtual machine
operationId: cloudmesh.vm.add
parameters:
- name: cloud
in: path
required: true
schema:
type: string
description: The name of the cloud
requestBody:
description: The virtual machine to add or modify
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Vm'
responses:
'200':
description: Vm updated
'400':
description: Error updating virtual machine
'401':
description: Not authorized
'404':
description: The named virtual machine or cloud could not be found
delete:
tags:
- Vm
summary: Deletes the named virtual machine
description: Deletes a virtual machine by name
operationId: cloudmesh.vm.delete_by_name
parameters:
- name: cloud
description: The name of the cloud
in: path
required: true
schema:
type: string
- name: name
in: path
description: The name of the virtual machine
required: true
schema:
type: string
responses:
'200':
description: Deletion successful
'400':
description: Error updating virtual machine
'401':
description: Not authorized
'404':
description: The named virtual machine or cloud could not be found
components:
schemas:
Vm:
type: object
properties:
provider:
type: string
description: Name of the provider
name:
type: string
description: the unique name of the virtual machine
image:
type: string
description: the image name for the virtual machine
flavor:
type: string
description: the flavor name for the virtual machine
region:
type: string
description: an optional region
state:
type: string
description: The state of the virtual machine
private_ips:
type: string
description: The private IPs
public_ips:
type: string
description: The public IPS
metadata:
type: string
description: The meta data passed along to the virtual machine