forked from JointCloud/pcm-coordinator
parent
a1d6951493
commit
c2a3b77aff
|
@ -163,19 +163,19 @@ type VmInfo struct {
|
|||
AdapterName string `json:"adapterName,omitempty,optional"`
|
||||
ClusterId int64 `json:"clusterId,omitempty,optional"`
|
||||
ClusterName string `json:"clusterName,omitempty,optional"`
|
||||
FlavorRef string `json:"flavor_ref,omitempty"`
|
||||
ImageRef string `json:"image_ref,omitempty"`
|
||||
FlavorRef string `json:"flavorRef,omitempty"`
|
||||
ImageRef string `json:"imageRef,omitempty"`
|
||||
Status string `json:"status,omitempty"`
|
||||
Platform string `json:"platform,omitempty"`
|
||||
Description string `json:"description,omitempty"` // 描述
|
||||
AvailabilityZone string `json:"availability_zone,omitempty"`
|
||||
MinCount string `json:"min_count,omitempty"`
|
||||
MinCount string `json:"minCount,omitempty"`
|
||||
Uuid string `json:"uuid,omitempty"`
|
||||
StartTime string `json:"startTime,omitempty"`
|
||||
RunningTime string `json:"runningTime,omitempty"`
|
||||
Result string `json:"result,omitempty"`
|
||||
DeletedAt string `json:"deleted_at,omitempty"`
|
||||
VmName string `json:"vm_name,omitempty"`
|
||||
DeletedAt string `json:"deletedAt,omitempty"`
|
||||
VmName string `json:"vmName,omitempty"`
|
||||
Replicas int64 `json:"replicas,omitempty"`
|
||||
ServerId string `json:"serverId,omitempty"`
|
||||
}
|
||||
|
|
|
@ -224,7 +224,7 @@ type (
|
|||
ImageRef int64 `json:"imageRef,optional"`
|
||||
FlavorRef int64 `json:"flavorRef,optional"`
|
||||
Uuid int64 `json:"uuid,optional"`
|
||||
Replicas int32 `json:"replicas,string"`
|
||||
Replicas int64 `json:"replicas,string"`
|
||||
VmName string `json:"vm_name,optional"`
|
||||
}
|
||||
TaskVm {
|
||||
|
|
|
@ -119,7 +119,7 @@ func (l *CommitVmTaskLogic) CommitVmTask(req *types.CommitVmTaskReq) (resp *type
|
|||
logx.Errorf("CommitGeneralTask() => sql execution error: %v", err)
|
||||
//return errors.Errorf("the cluster does not match the drive resources. Check the data"), nil
|
||||
}*/
|
||||
taskVm.Name = req.VmName
|
||||
taskVm.Name = req.Name
|
||||
taskVm.Status = "Saved"
|
||||
taskVm.StartTime = time.Now().String()
|
||||
taskVm.MinCount = req.MinCount
|
||||
|
@ -133,6 +133,8 @@ func (l *CommitVmTaskLogic) CommitVmTask(req *types.CommitVmTaskReq) (resp *type
|
|||
l.svcCtx.DbEngin.Raw("select name from t_cluster where id= ?", r.ClusterId).Scan(&clusterName)
|
||||
taskVm.ClusterName = clusterName
|
||||
taskVm.ClusterId, err = strconv.ParseInt(clusterId, 10, 64)
|
||||
taskVm.VmName = req.VmName
|
||||
taskVm.Replicas = req.Replicas
|
||||
if err != nil {
|
||||
fmt.Println("Error converting string to int64:", err)
|
||||
return
|
||||
|
|
|
@ -202,7 +202,7 @@ type CommitVmTaskReq struct {
|
|||
ImageRef int64 `json:"imageRef,optional"`
|
||||
FlavorRef int64 `json:"flavorRef,optional"`
|
||||
Uuid int64 `json:"uuid,optional"`
|
||||
Replicas int32 `json:"replicas,string"`
|
||||
Replicas int64 `json:"replicas,string"`
|
||||
VmName string `json:"vm_name,optional"`
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue