Skip to content

Commit

Permalink
Code enhancement in vm provision request
Browse files Browse the repository at this point in the history
  • Loading branch information
seokho-son committed Oct 23, 2024
1 parent 1d56aec commit 8640697
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/core/infra/provisioning.go
Original file line number Diff line number Diff line change
Expand Up @@ -1555,7 +1555,7 @@ func CreateVm(wg *sync.WaitGroup, nsId string, mciId string, vmInfoData *model.T
_, err = SetBastionNodes(nsId, mciId, vmInfoData.Id, "")
if err != nil {
// just log error and continue
log.Debug().Err(err).Msg("")
log.Debug().Msg(err.Error())
}

// set initial TargetAction, TargetStatus
Expand Down
21 changes: 17 additions & 4 deletions src/core/model/mci.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,10 +267,10 @@ type CheckVmDynamicReqInfo struct {

//

// SpiderVMReqInfoWrapper is struct from CB-Spider (VMHandler.go) for wrapping SpiderVMInfo
// SpiderVMReqInfoWrapper is struct from CB-Spider (VMHandler.go) for wrapping SpiderVMReqInfo
type SpiderVMReqInfoWrapper struct {
ConnectionName string
ReqInfo SpiderVMInfo
ReqInfo SpiderVMReqInfo
}

type SpiderImageType string
Expand All @@ -281,8 +281,8 @@ const (
)

// Ref: cb-spider/cloud-control-manager/cloud-driver/interfaces/resources/VMHandler.go
// SpiderVMInfo is struct from CB-Spider for VM information
type SpiderVMInfo struct {
// SpiderVMReqInfo is struct from CB-Spider for VM request information
type SpiderVMReqInfo struct {
// Fields for request
Name string
ImageName string
Expand All @@ -300,6 +300,19 @@ type SpiderVMInfo struct {
RootDiskType string // "SSD(gp2)", "Premium SSD", ...
RootDiskSize string // "default", "50", "1000" (GB)
ImageType SpiderImageType
}

// Ref: cb-spider/cloud-control-manager/cloud-driver/interfaces/resources/VMHandler.go
// SpiderVMInfo is struct from CB-Spider for VM information
type SpiderVMInfo struct {

// Fields for both request and response
VMSpecName string // instance type or flavour, etc... ex) t2.micro or f1.micro
VMUserId string // ex) user1
VMUserPasswd string
RootDiskType string // "SSD(gp2)", "Premium SSD", ...
RootDiskSize string // "default", "50", "1000" (GB)
ImageType SpiderImageType

// Fields for response
IId IID // {NameId, SystemId}
Expand Down

0 comments on commit 8640697

Please sign in to comment.