Skip to content

Commit

Permalink
Align inframodel with cm-model v0.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
cb-github-robot authored Oct 24, 2024
2 parents 774da47 + 79be8bf commit 4e79ecb
Show file tree
Hide file tree
Showing 10 changed files with 515 additions and 468 deletions.
326 changes: 163 additions & 163 deletions api/docs.go

Large diffs are not rendered by default.

326 changes: 163 additions & 163 deletions api/swagger.json

Large diffs are not rendered by default.

268 changes: 134 additions & 134 deletions api/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ definitions:
example: ap-northeast-2
type: string
onpremiseInfraModel:
$ref: '#/definitions/onprem.OnPremInfra'
$ref: '#/definitions/inframodel.OnpremInfra'
required:
- onpremiseInfraModel
type: object
Expand Down Expand Up @@ -165,122 +165,7 @@ definitions:
name:
type: string
type: object
model.MyUser:
properties:
email:
type: string
id:
type: integer
name:
type: string
type: object
model.Response:
properties:
details:
example: Any details
type: string
list:
items: {}
type: array
object:
additionalProperties: true
type: object
success:
example: true
type: boolean
text:
example: Any text
type: string
type: object
model.TbMciDynamicReq:
properties:
description:
example: Made in CB-TB
type: string
installMonAgent:
default: "no"
description: InstallMonAgent Option for CB-Dragonfly agent installation ([yes/no]
default:yes)
enum:
- "yes"
- "no"
example: "no"
type: string
label:
additionalProperties:
type: string
description: Label is for describing the object by keywords
type: object
name:
example: mci01
type: string
systemLabel:
description: SystemLabel is for describing the mci in a keyword (any string
can be used) for special System purpose
example: ""
type: string
vm:
items:
$ref: '#/definitions/model.TbVmDynamicReq'
type: array
required:
- name
- vm
type: object
model.TbVmDynamicReq:
properties:
commonImage:
description: CommonImage is field for id of a image in common namespace
example: ubuntu18.04
type: string
commonSpec:
description: CommonSpec is field for id of a spec in common namespace
example: aws+ap-northeast-2+t2.small
type: string
connectionName:
description: |-
if ConnectionName is given, the VM tries to use associtated credential.
if not, it will use predefined ConnectionName in Spec objects
type: string
description:
example: Description
type: string
label:
additionalProperties:
type: string
description: Label is for describing the object by keywords
type: object
name:
description: VM name or subGroup name if is (not empty) && (> 0). If it is
a group, actual VM name will be generated with -N postfix.
example: g1-1
type: string
rootDiskSize:
default: default
description: '"default", Integer (GB): ["50", ..., "1000"]'
example: default, 30, 42, ...
type: string
rootDiskType:
default: default
description: '"", "default", "TYPE1", AWS: ["standard", "gp2", "gp3"], Azure:
["PremiumSSD", "StandardSSD", "StandardHDD"], GCP: ["pd-standard", "pd-balanced",
"pd-ssd", "pd-extreme"], ALIBABA: ["cloud_efficiency", "cloud", "cloud_essd"],
TENCENT: ["CLOUD_PREMIUM", "CLOUD_SSD"]'
example: default, TYPE1, ...
type: string
subGroupSize:
default: "1"
description: if subGroupSize is (not empty) && (> 0), subGroup will be generated.
VMs will be created accordingly.
example: "3"
type: string
vmUserPassword:
type: string
required:
- commonImage
- commonSpec
type: object
onprem.CpuProperty:
inframodel.CpuProperty:
properties:
architecture:
example: x86_64
Expand Down Expand Up @@ -313,7 +198,7 @@ definitions:
- cpus
- threads
type: object
onprem.DiskProperty:
inframodel.DiskProperty:
properties:
available:
description: Unit GiB
Expand All @@ -336,7 +221,7 @@ definitions:
- totalSize
- type
type: object
onprem.MemoryProperty:
inframodel.MemoryProperty:
properties:
available:
description: Unit GiB
Expand All @@ -355,7 +240,7 @@ definitions:
- totalSize
- type
type: object
onprem.NetworkInterfaceProperty:
inframodel.NetworkInterfaceProperty:
properties:
ipv4CidrBlocks:
description: IPv4 address with prefix length (e.g., 192.168.0.21/24), instead
Expand Down Expand Up @@ -383,7 +268,7 @@ definitions:
required:
- name
type: object
onprem.NetworkProperty:
inframodel.NetworkProperty:
properties:
ipv4Networks:
example:
Expand All @@ -397,18 +282,18 @@ definitions:
type: string
type: array
type: object
onprem.OnPremInfra:
inframodel.OnpremInfra:
properties:
network:
$ref: '#/definitions/onprem.NetworkProperty'
$ref: '#/definitions/inframodel.NetworkProperty'
servers:
items:
$ref: '#/definitions/onprem.ServerProperty'
$ref: '#/definitions/inframodel.ServerProperty'
type: array
required:
- servers
type: object
onprem.OsProperty:
inframodel.OsProperty:
properties:
id:
example: ubuntu
Expand Down Expand Up @@ -436,7 +321,7 @@ definitions:
required:
- prettyName
type: object
onprem.RouteProperty:
inframodel.RouteProperty:
properties:
destination:
description: Destination network, expressed in CIDR format
Expand All @@ -463,31 +348,146 @@ definitions:
description: Optionally stores the source address (used for policy-based routing)
type: string
type: object
onprem.ServerProperty:
inframodel.ServerProperty:
properties:
cpu:
$ref: '#/definitions/onprem.CpuProperty'
$ref: '#/definitions/inframodel.CpuProperty'
dataDisks:
items:
$ref: '#/definitions/onprem.DiskProperty'
$ref: '#/definitions/inframodel.DiskProperty'
type: array
hostname:
type: string
interfaces:
items:
$ref: '#/definitions/onprem.NetworkInterfaceProperty'
$ref: '#/definitions/inframodel.NetworkInterfaceProperty'
type: array
memory:
$ref: '#/definitions/onprem.MemoryProperty'
$ref: '#/definitions/inframodel.MemoryProperty'
os:
$ref: '#/definitions/onprem.OsProperty'
$ref: '#/definitions/inframodel.OsProperty'
rootDisk:
$ref: '#/definitions/onprem.DiskProperty'
$ref: '#/definitions/inframodel.DiskProperty'
routingTable:
items:
$ref: '#/definitions/onprem.RouteProperty'
$ref: '#/definitions/inframodel.RouteProperty'
type: array
type: object
model.MyUser:
properties:
email:
type: string
id:
type: integer
name:
type: string
type: object
model.Response:
properties:
details:
example: Any details
type: string
list:
items: {}
type: array
object:
additionalProperties: true
type: object
success:
example: true
type: boolean
text:
example: Any text
type: string
type: object
model.TbMciDynamicReq:
properties:
description:
example: Made in CB-TB
type: string
installMonAgent:
default: "no"
description: InstallMonAgent Option for CB-Dragonfly agent installation ([yes/no]
default:yes)
enum:
- "yes"
- "no"
example: "no"
type: string
label:
additionalProperties:
type: string
description: Label is for describing the object by keywords
type: object
name:
example: mci01
type: string
systemLabel:
description: SystemLabel is for describing the mci in a keyword (any string
can be used) for special System purpose
example: ""
type: string
vm:
items:
$ref: '#/definitions/model.TbVmDynamicReq'
type: array
required:
- name
- vm
type: object
model.TbVmDynamicReq:
properties:
commonImage:
description: CommonImage is field for id of a image in common namespace
example: ubuntu18.04
type: string
commonSpec:
description: CommonSpec is field for id of a spec in common namespace
example: aws+ap-northeast-2+t2.small
type: string
connectionName:
description: |-
if ConnectionName is given, the VM tries to use associtated credential.
if not, it will use predefined ConnectionName in Spec objects
type: string
description:
example: Description
type: string
label:
additionalProperties:
type: string
description: Label is for describing the object by keywords
type: object
name:
description: VM name or subGroup name if is (not empty) && (> 0). If it is
a group, actual VM name will be generated with -N postfix.
example: g1-1
type: string
rootDiskSize:
default: default
description: '"default", Integer (GB): ["50", ..., "1000"]'
example: default, 30, 42, ...
type: string
rootDiskType:
default: default
description: '"", "default", "TYPE1", AWS: ["standard", "gp2", "gp3"], Azure:
["PremiumSSD", "StandardSSD", "StandardHDD"], GCP: ["pd-standard", "pd-balanced",
"pd-ssd", "pd-extreme"], ALIBABA: ["cloud_efficiency", "cloud", "cloud_essd"],
TENCENT: ["CLOUD_PREMIUM", "CLOUD_SSD"]'
example: default, TYPE1, ...
type: string
subGroupSize:
default: "1"
description: if subGroupSize is (not empty) && (> 0), subGroup will be generated.
VMs will be created accordingly.
example: "3"
type: string
vmUserPassword:
type: string
required:
- commonImage
- commonSpec
type: object
externalDocs:
description: ▶▶▶ CB-Tumblebug REST API (access via Beetle's reverse proxy)
url: http://localhost:8056/tumblebug/api/index.html
Expand Down
1 change: 1 addition & 0 deletions cmd/cm-beetle/db/beetle.db
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ go 1.23.0

require (
github.com/cloud-barista/cb-tumblebug v0.9.16
github.com/cloud-barista/cm-model v0.0.2
github.com/cloud-barista/cm-model v0.0.3
github.com/fsnotify/fsnotify v1.7.0
github.com/go-playground/validator/v10 v10.22.0
github.com/go-resty/resty/v2 v2.13.1
Expand Down
Loading

0 comments on commit 4e79ecb

Please sign in to comment.