Skip to content

Commit 79be8bf

Browse files
committed
Align inframodel with cm-model v0.0.3
1 parent 774da47 commit 79be8bf

File tree

10 files changed

+515
-468
lines changed

10 files changed

+515
-468
lines changed

api/docs.go

Lines changed: 163 additions & 163 deletions
Large diffs are not rendered by default.

api/swagger.json

Lines changed: 163 additions & 163 deletions
Large diffs are not rendered by default.

api/swagger.yaml

Lines changed: 134 additions & 134 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ definitions:
134134
example: ap-northeast-2
135135
type: string
136136
onpremiseInfraModel:
137-
$ref: '#/definitions/onprem.OnPremInfra'
137+
$ref: '#/definitions/inframodel.OnpremInfra'
138138
required:
139139
- onpremiseInfraModel
140140
type: object
@@ -165,122 +165,7 @@ definitions:
165165
name:
166166
type: string
167167
type: object
168-
model.MyUser:
169-
properties:
170-
email:
171-
type: string
172-
id:
173-
type: integer
174-
name:
175-
type: string
176-
type: object
177-
model.Response:
178-
properties:
179-
details:
180-
example: Any details
181-
type: string
182-
list:
183-
items: {}
184-
type: array
185-
object:
186-
additionalProperties: true
187-
type: object
188-
success:
189-
example: true
190-
type: boolean
191-
text:
192-
example: Any text
193-
type: string
194-
type: object
195-
model.TbMciDynamicReq:
196-
properties:
197-
description:
198-
example: Made in CB-TB
199-
type: string
200-
installMonAgent:
201-
default: "no"
202-
description: InstallMonAgent Option for CB-Dragonfly agent installation ([yes/no]
203-
default:yes)
204-
enum:
205-
- "yes"
206-
- "no"
207-
example: "no"
208-
type: string
209-
label:
210-
additionalProperties:
211-
type: string
212-
description: Label is for describing the object by keywords
213-
type: object
214-
name:
215-
example: mci01
216-
type: string
217-
systemLabel:
218-
description: SystemLabel is for describing the mci in a keyword (any string
219-
can be used) for special System purpose
220-
example: ""
221-
type: string
222-
vm:
223-
items:
224-
$ref: '#/definitions/model.TbVmDynamicReq'
225-
type: array
226-
required:
227-
- name
228-
- vm
229-
type: object
230-
model.TbVmDynamicReq:
231-
properties:
232-
commonImage:
233-
description: CommonImage is field for id of a image in common namespace
234-
example: ubuntu18.04
235-
type: string
236-
commonSpec:
237-
description: CommonSpec is field for id of a spec in common namespace
238-
example: aws+ap-northeast-2+t2.small
239-
type: string
240-
connectionName:
241-
description: |-
242-
if ConnectionName is given, the VM tries to use associtated credential.
243-
if not, it will use predefined ConnectionName in Spec objects
244-
type: string
245-
description:
246-
example: Description
247-
type: string
248-
label:
249-
additionalProperties:
250-
type: string
251-
description: Label is for describing the object by keywords
252-
type: object
253-
name:
254-
description: VM name or subGroup name if is (not empty) && (> 0). If it is
255-
a group, actual VM name will be generated with -N postfix.
256-
example: g1-1
257-
type: string
258-
rootDiskSize:
259-
default: default
260-
description: '"default", Integer (GB): ["50", ..., "1000"]'
261-
example: default, 30, 42, ...
262-
type: string
263-
rootDiskType:
264-
default: default
265-
description: '"", "default", "TYPE1", AWS: ["standard", "gp2", "gp3"], Azure:
266-
["PremiumSSD", "StandardSSD", "StandardHDD"], GCP: ["pd-standard", "pd-balanced",
267-
"pd-ssd", "pd-extreme"], ALIBABA: ["cloud_efficiency", "cloud", "cloud_essd"],
268-
TENCENT: ["CLOUD_PREMIUM", "CLOUD_SSD"]'
269-
example: default, TYPE1, ...
270-
type: string
271-
subGroupSize:
272-
default: "1"
273-
description: if subGroupSize is (not empty) && (> 0), subGroup will be generated.
274-
VMs will be created accordingly.
275-
example: "3"
276-
type: string
277-
vmUserPassword:
278-
type: string
279-
required:
280-
- commonImage
281-
- commonSpec
282-
type: object
283-
onprem.CpuProperty:
168+
inframodel.CpuProperty:
284169
properties:
285170
architecture:
286171
example: x86_64
@@ -313,7 +198,7 @@ definitions:
313198
- cpus
314199
- threads
315200
type: object
316-
onprem.DiskProperty:
201+
inframodel.DiskProperty:
317202
properties:
318203
available:
319204
description: Unit GiB
@@ -336,7 +221,7 @@ definitions:
336221
- totalSize
337222
- type
338223
type: object
339-
onprem.MemoryProperty:
224+
inframodel.MemoryProperty:
340225
properties:
341226
available:
342227
description: Unit GiB
@@ -355,7 +240,7 @@ definitions:
355240
- totalSize
356241
- type
357242
type: object
358-
onprem.NetworkInterfaceProperty:
243+
inframodel.NetworkInterfaceProperty:
359244
properties:
360245
ipv4CidrBlocks:
361246
description: IPv4 address with prefix length (e.g., 192.168.0.21/24), instead
@@ -383,7 +268,7 @@ definitions:
383268
required:
384269
- name
385270
type: object
386-
onprem.NetworkProperty:
271+
inframodel.NetworkProperty:
387272
properties:
388273
ipv4Networks:
389274
example:
@@ -397,18 +282,18 @@ definitions:
397282
type: string
398283
type: array
399284
type: object
400-
onprem.OnPremInfra:
285+
inframodel.OnpremInfra:
401286
properties:
402287
network:
403-
$ref: '#/definitions/onprem.NetworkProperty'
288+
$ref: '#/definitions/inframodel.NetworkProperty'
404289
servers:
405290
items:
406-
$ref: '#/definitions/onprem.ServerProperty'
291+
$ref: '#/definitions/inframodel.ServerProperty'
407292
type: array
408293
required:
409294
- servers
410295
type: object
411-
onprem.OsProperty:
296+
inframodel.OsProperty:
412297
properties:
413298
id:
414299
example: ubuntu
@@ -436,7 +321,7 @@ definitions:
436321
required:
437322
- prettyName
438323
type: object
439-
onprem.RouteProperty:
324+
inframodel.RouteProperty:
440325
properties:
441326
destination:
442327
description: Destination network, expressed in CIDR format
@@ -463,31 +348,146 @@ definitions:
463348
description: Optionally stores the source address (used for policy-based routing)
464349
type: string
465350
type: object
466-
onprem.ServerProperty:
351+
inframodel.ServerProperty:
467352
properties:
468353
cpu:
469-
$ref: '#/definitions/onprem.CpuProperty'
354+
$ref: '#/definitions/inframodel.CpuProperty'
470355
dataDisks:
471356
items:
472-
$ref: '#/definitions/onprem.DiskProperty'
357+
$ref: '#/definitions/inframodel.DiskProperty'
473358
type: array
474359
hostname:
475360
type: string
476361
interfaces:
477362
items:
478-
$ref: '#/definitions/onprem.NetworkInterfaceProperty'
363+
$ref: '#/definitions/inframodel.NetworkInterfaceProperty'
479364
type: array
480365
memory:
481-
$ref: '#/definitions/onprem.MemoryProperty'
366+
$ref: '#/definitions/inframodel.MemoryProperty'
482367
os:
483-
$ref: '#/definitions/onprem.OsProperty'
368+
$ref: '#/definitions/inframodel.OsProperty'
484369
rootDisk:
485-
$ref: '#/definitions/onprem.DiskProperty'
370+
$ref: '#/definitions/inframodel.DiskProperty'
486371
routingTable:
487372
items:
488-
$ref: '#/definitions/onprem.RouteProperty'
373+
$ref: '#/definitions/inframodel.RouteProperty'
489374
type: array
490375
type: object
376+
model.MyUser:
377+
properties:
378+
email:
379+
type: string
380+
id:
381+
type: integer
382+
name:
383+
type: string
384+
type: object
385+
model.Response:
386+
properties:
387+
details:
388+
example: Any details
389+
type: string
390+
list:
391+
items: {}
392+
type: array
393+
object:
394+
additionalProperties: true
395+
type: object
396+
success:
397+
example: true
398+
type: boolean
399+
text:
400+
example: Any text
401+
type: string
402+
type: object
403+
model.TbMciDynamicReq:
404+
properties:
405+
description:
406+
example: Made in CB-TB
407+
type: string
408+
installMonAgent:
409+
default: "no"
410+
description: InstallMonAgent Option for CB-Dragonfly agent installation ([yes/no]
411+
default:yes)
412+
enum:
413+
- "yes"
414+
- "no"
415+
example: "no"
416+
type: string
417+
label:
418+
additionalProperties:
419+
type: string
420+
description: Label is for describing the object by keywords
421+
type: object
422+
name:
423+
example: mci01
424+
type: string
425+
systemLabel:
426+
description: SystemLabel is for describing the mci in a keyword (any string
427+
can be used) for special System purpose
428+
example: ""
429+
type: string
430+
vm:
431+
items:
432+
$ref: '#/definitions/model.TbVmDynamicReq'
433+
type: array
434+
required:
435+
- name
436+
- vm
437+
type: object
438+
model.TbVmDynamicReq:
439+
properties:
440+
commonImage:
441+
description: CommonImage is field for id of a image in common namespace
442+
example: ubuntu18.04
443+
type: string
444+
commonSpec:
445+
description: CommonSpec is field for id of a spec in common namespace
446+
example: aws+ap-northeast-2+t2.small
447+
type: string
448+
connectionName:
449+
description: |-
450+
if ConnectionName is given, the VM tries to use associtated credential.
451+
if not, it will use predefined ConnectionName in Spec objects
452+
type: string
453+
description:
454+
example: Description
455+
type: string
456+
label:
457+
additionalProperties:
458+
type: string
459+
description: Label is for describing the object by keywords
460+
type: object
461+
name:
462+
description: VM name or subGroup name if is (not empty) && (> 0). If it is
463+
a group, actual VM name will be generated with -N postfix.
464+
example: g1-1
465+
type: string
466+
rootDiskSize:
467+
default: default
468+
description: '"default", Integer (GB): ["50", ..., "1000"]'
469+
example: default, 30, 42, ...
470+
type: string
471+
rootDiskType:
472+
default: default
473+
description: '"", "default", "TYPE1", AWS: ["standard", "gp2", "gp3"], Azure:
474+
["PremiumSSD", "StandardSSD", "StandardHDD"], GCP: ["pd-standard", "pd-balanced",
475+
"pd-ssd", "pd-extreme"], ALIBABA: ["cloud_efficiency", "cloud", "cloud_essd"],
476+
TENCENT: ["CLOUD_PREMIUM", "CLOUD_SSD"]'
477+
example: default, TYPE1, ...
478+
type: string
479+
subGroupSize:
480+
default: "1"
481+
description: if subGroupSize is (not empty) && (> 0), subGroup will be generated.
482+
VMs will be created accordingly.
483+
example: "3"
484+
type: string
485+
vmUserPassword:
486+
type: string
487+
required:
488+
- commonImage
489+
- commonSpec
490+
type: object
491491
externalDocs:
492492
description: ▶▶▶ CB-Tumblebug REST API (access via Beetle's reverse proxy)
493493
url: http://localhost:8056/tumblebug/api/index.html

cmd/cm-beetle/db/beetle.db

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ go 1.23.0
77

88
require (
99
github.com/cloud-barista/cb-tumblebug v0.9.16
10-
github.com/cloud-barista/cm-model v0.0.2
10+
github.com/cloud-barista/cm-model v0.0.3
1111
github.com/fsnotify/fsnotify v1.7.0
1212
github.com/go-playground/validator/v10 v10.22.0
1313
github.com/go-resty/resty/v2 v2.13.1

0 commit comments

Comments
 (0)