fix: 修复错误提交

Former-commit-id: cca78dded7684afa7b80b771aa6fc8a7c74b4d94
This commit is contained in:
zhouqunjie 2023-09-05 09:52:19 +08:00
parent d794903f39
commit 9a87a62519
6 changed files with 605 additions and 342 deletions

View File

@ -6,6 +6,7 @@ import (
"ai/pcm-ai.api" "ai/pcm-ai.api"
"storage/pcm-storage.api" "storage/pcm-storage.api"
"vm/pcm-vm.api" "vm/pcm-vm.api"
"cloud/pcm-cloud.api"
) )
info( info(
@ -66,6 +67,15 @@ service pcm {
@handler getComputilityStatisticsHandler @handler getComputilityStatisticsHandler
get /core/getComputilityStatistics () returns (ComputilityStatisticsResp) get /core/getComputilityStatistics () returns (ComputilityStatisticsResp)
@handler nodeAssetsHandler
get /core/assets () returns (NodeAssetsResp)
@handler saveHashcatHandler
post /core/saveHashcat (SaveHashcatReq) returns ()
@handler getHashcatHandler
get /core/getHashcat/:crackTaskId (getHashcatHandlerReq) returns (getHashcatHandlerResp)
} }
//hpc二级接口 //hpc二级接口
@ -79,6 +89,22 @@ service pcm {
@handler listHistoryJobHandler @handler listHistoryJobHandler
get /hpc/listHistoryJob (listHistoryJobReq) returns (listHistoryJobResp) get /hpc/listHistoryJob (listHistoryJobReq) returns (listHistoryJobResp)
@handler queueAssetsHandler
get /queue/assets () returns (QueueAssetsResp)
}
//cloud二级接口
@server(
prefix: pcm/v1
group : cloud
)
service pcm {
@handler cloudListHandler
get /task/list () returns (cloudListResp)
@handler deleteYamlHandler
get /cloud/DeleteYaml (ApplyReq) returns (DeleteResp)
} }
//智算二级接口 //智算二级接口
@ -217,6 +243,10 @@ service pcm {
group : vm group : vm
) )
service pcm { service pcm {
@handler GetComputeLimitsHandler
get /vm/getComputeLimits (GetComputeLimitsReq) returns (GetComputeLimitsResp)
@handler GetVolumeLimitsHandler
get /vm/getVolumeLimits (GetVolumeLimitsReq) returns (GetVolumeLimitsResp)
@handler ListServerHandler @handler ListServerHandler
get /vm/listServer (ListServersReq) returns (ListServersResp) get /vm/listServer (ListServersReq) returns (ListServersResp)
@handler ListServersDetailedHandler @handler ListServersDetailedHandler

View File

@ -7,6 +7,77 @@ info(
email: "1364512070@qq.com" email: "1364512070@qq.com"
) )
type (
Rate {
}
Absolute {
MaxServerMeta int64 `json:"max_server_meta,optional"`
MaxPersonality int64 `json:"max_personality,optional"`
TotalServerGroupsUsed int64 `json:"total_server_groups_used,optional"`
MaxImageMeta int64 `json:"max_image_meta,optional"`
MaxPersonalitySize int64 `json:"max_personality_size,optional"`
MaxTotalKeypairs int64 `json:"max_total_keypairs,optional"`
MaxSecurityGroupRules int64 `json:"max_security_group_rules,optional"`
MaxServerGroups int64 `json:"max_server_groups,optional"`
TotalCoresUsed int64 `json:"total_cores_used,optional"`
TotalRAMUsed int64 `json:"total_ram_used,optional"`
TotalInstancesUsed int64 `json:"total_instances_used,optional"`
MaxSecurityGroups int64 `json:"max_security_groups,optional"`
TotalFloatingIpsUsed int64 `json:"total_floating_ips_used,optional"`
MaxTotalCores int64 `json:"max_total_cores,optional"`
MaxServerGroupMembers int64 `json:"max_server_group_members,optional"`
MaxTotalFloatingIps int64 `json:"max_total_floating_ips,optional"`
TotalSecurityGroupsUsed int64 `json:"total_security_groups_used,optional"`
MaxTotalInstances int64 `json:"max_total_instances,optional"`
MaxTotalRAMSize int64 `json:"max_total_ram_size,optional"`
}
Limits {
rate Rate `json:"rate,optional"`
absolute Absolute `json:"absolute,optional"`
}
GetComputeLimitsReq {
Limit int32 `json:"limit,optional"`
OffSet int32 `json:"offSet,optional"`
}
GetComputeLimitsResp {
limits Limits `json:"limits,optional"`
Code int32 `json:"code,omitempty"`
Msg string `json:"msg,omitempty"`
ErrorMsg string `json:"errorMsg,omitempty"`
}
)
type (
VolumeRate {
}
VolumeAbsolute {
TotalSnapshotsUsed int32 `json:"total_snapshots_used,optional"`
MaxTotalBackups int32 `json:"max_total_backups,optional"`
MaxTotalVolumeGigabytes int32 `json:"max_total_volume_gigabytes,optional"`
MaxTotalSnapshots int32 `json:"max_total_snapshots,optional"`
MaxTotalBackupGigabytes int32 `json:"max_total_backup_gigabytes,optional"`
TotalBackupGigabytesUsed int32 `json:"total_backup_gigabytes_used,optional"`
MaxTotalVolumes int32 `json:"max_total_volumes,optional"`
TotalVolumesUsed int32 `json:"total_volumes_used,optional"`
TotalBackupsUsed int32 `json:"total_backups_used,optional"`
TotalGigabytesUsed int32 `json:"total_gigabytes_used,optional"`
}
VolumeLimits {
rate VolumeRate `json:"rate,optional"`
absolute VolumeAbsolute `json:"absolute,optional"`
}
GetVolumeLimitsReq {
Limit int32 `json:"limit,optional"`
OffSet int32 `json:"offSet,optional"`
}
GetVolumeLimitsResp {
limits VolumeLimits `json:"limits,optional"`
Code int32 `json:"code,omitempty"`
Msg string `json:"msg,omitempty"`
ErrorMsg string `json:"errorMsg,omitempty"`
}
)
/****************** servers start*************************/ /****************** servers start*************************/
type ( type (
ListServersReq { ListServersReq {
@ -33,24 +104,24 @@ type (
Rel string `json:"rel" copier:"Rel"` Rel string `json:"rel" copier:"Rel"`
} }
Servers_links{ Servers_links {
Href string `json:"href " copier:"Href"` Href string `json:"href " copier:"Href"`
Rel string `json:"rel" copier:"Rel"` Rel string `json:"rel" copier:"Rel"`
} }
) )
type( type (
ListServersDetailedReq{ ListServersDetailedReq {
} }
ListServersDetailedResp{ ListServersDetailedResp {
ServersDetailed []ServersDetailed `json:"servers" copier:"ServersDetailed"` ServersDetailed []ServersDetailed `json:"servers" copier:"ServersDetailed"`
Code int32 `json:"code,omitempty"` Code int32 `json:"code,omitempty"`
Msg string `json:"msg,omitempty"` Msg string `json:"msg,omitempty"`
ErrorMsg string `json:"errorMsg,omitempty"` ErrorMsg string `json:"errorMsg,omitempty"`
} }
ServersDetailed{ ServersDetailed {
created string `json:"created" copier:"created"` created string `json:"created" copier:"created"`
id string `json:"id" copier:"id"` id string `json:"id" copier:"id"`
key_name string `json:"key_name" copier:"key_name"` key_name string `json:"key_name" copier:"key_name"`
@ -65,11 +136,11 @@ type(
) )
type ( type (
DeleteServerReq{ DeleteServerReq {
ServerId string `form:"server_id" copier:"ServerId"` ServerId string `form:"server_id" copier:"ServerId"`
} }
DeleteServerResp{ DeleteServerResp {
Code int32 `json:"code,omitempty"` Code int32 `json:"code,omitempty"`
Msg string `json:"msg,omitempty"` Msg string `json:"msg,omitempty"`
ErrorMsg string `json:"errorMsg,omitempty"` ErrorMsg string `json:"errorMsg,omitempty"`
@ -77,10 +148,10 @@ type (
) )
type ( type (
CreateServerReq{ CreateServerReq {
Server Server `json:"server" copier:"Server"` Server Server `json:"server" copier:"Server"`
} }
CreateServerResp{ CreateServerResp {
Server ServerResp `json:"server" copier:"Server"` Server ServerResp `json:"server" copier:"Server"`
Code int32 `json:"code,omitempty"` Code int32 `json:"code,omitempty"`
Msg string `json:"msg,omitempty"` Msg string `json:"msg,omitempty"`
@ -103,7 +174,6 @@ type (
OSDCFDiskConfig string `json:"OS_DCF_diskConfig" copier:"OSDCFDiskConfig"` OSDCFDiskConfig string `json:"OS_DCF_diskConfig" copier:"OSDCFDiskConfig"`
SecurityGroups []Security_groups `json:"security_groups" copier:"SecurityGroups"` SecurityGroups []Security_groups `json:"security_groups" copier:"SecurityGroups"`
AdminPass string `json:"adminPass" copier:"AdminPass"` AdminPass string `json:"adminPass" copier:"AdminPass"`
} }
Security_groups { Security_groups {
Name string `json:"name" copier:"Name"` Name string `json:"name" copier:"Name"`
@ -177,8 +247,8 @@ type (
} }
) )
type( type (
CreateImageReq{ CreateImageReq {
Container_format string `json:"container_format" copier:"Container_format"` Container_format string `json:"container_format" copier:"Container_format"`
Disk_format string `json:"disk_format" copier:"Disk_format"` Disk_format string `json:"disk_format" copier:"Disk_format"`
Min_disk int32 `json:"min_disk" copier:"Min_disk"` Min_disk int32 `json:"min_disk" copier:"Min_disk"`
@ -203,10 +273,9 @@ type(
Msg string `json:"msg,omitempty" copier:"Msg"` Msg string `json:"msg,omitempty" copier:"Msg"`
ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"`
} }
) )
type( type (
UploadOsImageReq{ UploadOsImageReq {
ImageId string `form:"image_id" copier:"ImageId"` ImageId string `form:"image_id" copier:"ImageId"`
} }
UploadOsImageResp { UploadOsImageResp {
@ -216,8 +285,8 @@ type(
} }
) )
type( type (
DeleteImageReq{ DeleteImageReq {
ImageId string `form:"image_id" copier:"ImageId"` ImageId string `form:"image_id" copier:"ImageId"`
} }
DeleteImageResp { DeleteImageResp {
@ -225,16 +294,15 @@ type(
Msg string `json:"msg,omitempty"` Msg string `json:"msg,omitempty"`
ErrorMsg string `json:"errorMsg,omitempty"` ErrorMsg string `json:"errorMsg,omitempty"`
} }
) )
/******************find images end*************************/ /******************find images end*************************/
/******************find Networks end*************************/ /******************find Networks end*************************/
type( type (
ListNetworksReq{ ListNetworksReq {
} }
ListNetworksResp{ ListNetworksResp {
Networks []Network `json:"networks" copier:"Networks"` Networks []Network `json:"networks" copier:"Networks"`
Code int32 `json:"code,omitempty"` Code int32 `json:"code,omitempty"`
Msg string `json:"msg,omitempty"` Msg string `json:"msg,omitempty"`
@ -268,8 +336,8 @@ type(
IsDefault bool `json:"is_default" copier:"IsDefault"` IsDefault bool `json:"is_default" copier:"IsDefault"`
} }
) )
type( type (
DeleteNetworkReq{ DeleteNetworkReq {
NetworkId string `form:"network_id" copier:"NetworkId"` NetworkId string `form:"network_id" copier:"NetworkId"`
} }
DeleteNetworkResp { DeleteNetworkResp {
@ -277,13 +345,12 @@ type(
Msg string `json:"msg,omitempty" copier:"Msg"` Msg string `json:"msg,omitempty" copier:"Msg"`
ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"`
} }
) )
type( type (
CreateNetworkReq{ CreateNetworkReq {
Network CreateNetwork `json:"network" copier:"Network"` Network CreateNetwork `json:"network" copier:"Network"`
} }
CreateNetworkResp{ CreateNetworkResp {
Network Network `json:"network" copier:"Network"` Network Network `json:"network" copier:"Network"`
Code int32 `json:"code,omitempty" copier:"Code"` Code int32 `json:"code,omitempty" copier:"Code"`
Msg string `json:"msg,omitempty" copier:"Msg"` Msg string `json:"msg,omitempty" copier:"Msg"`
@ -297,10 +364,10 @@ type(
) )
type ( type (
CreateSubnetReq{ CreateSubnetReq {
Subnet Subnet `json:"subnet" copier:"Subnet"` Subnet Subnet `json:"subnet" copier:"Subnet"`
} }
CreateSubnetResp{ CreateSubnetResp {
Subnet SubnetResp `json:"subnet" copier:"Subnet"` Subnet SubnetResp `json:"subnet" copier:"Subnet"`
Code int32 `json:"code,omitempty" copier:"Code"` Code int32 `json:"code,omitempty" copier:"Code"`
Msg string `json:"msg,omitempty" copier:"Msg"` Msg string `json:"msg,omitempty" copier:"Msg"`
@ -342,7 +409,7 @@ type (
Tags []string `json:"tags" copier:"Tags"` Tags []string `json:"tags" copier:"Tags"`
Updated_at string `json:"updated_at" copier:"Updated_at"` Updated_at string `json:"updated_at" copier:"Updated_at"`
} }
Allocation_pools{ Allocation_pools {
Start string `json:"start" copier:"Start"` Start string `json:"start" copier:"Start"`
End string `json:"end" copier:"End"` End string `json:"end" copier:"End"`
} }
@ -350,18 +417,18 @@ type (
/******************find Networks end*************************/ /******************find Networks end*************************/
/******************find ListVolumesDetail start*************************/ /******************find ListVolumesDetail start*************************/
type( type (
ListVolumesDetailReq{ ListVolumesDetailReq {
} }
ListVolumesDetailResp{ ListVolumesDetailResp {
VolumeDetail []VolumeDetail `json:"volumes" copier:"VolumeDetail"` VolumeDetail []VolumeDetail `json:"volumes" copier:"VolumeDetail"`
Code int32 `json:"code,omitempty"` Code int32 `json:"code,omitempty"`
Msg string `json:"msg,omitempty"` Msg string `json:"msg,omitempty"`
ErrorMsg string `json:"errorMsg,omitempty"` ErrorMsg string `json:"errorMsg,omitempty"`
} }
VolumeDetail{ VolumeDetail {
created_at string `json:"created_at" copier:"created_at"` created_at string `json:"created_at" copier:"created_at"`
id string `json:"id" copier:"id"` id string `json:"id" copier:"id"`
availability_zone string `json:"availability_zone" copier:"availability_zone"` availability_zone string `json:"availability_zone" copier:"availability_zone"`
@ -382,8 +449,8 @@ type(
} }
) )
type( type (
DeleteVolumeReq{ DeleteVolumeReq {
VolumeId string `form:"volume_id" copier:"VolumeId"` VolumeId string `form:"volume_id" copier:"VolumeId"`
cascade bool `json:"cascade" copier:"cascade"` cascade bool `json:"cascade" copier:"cascade"`
force bool `json:"force" copier:"force"` force bool `json:"force" copier:"force"`
@ -395,8 +462,8 @@ type(
} }
) )
type( type (
CreateVolumeReq{ CreateVolumeReq {
Volume Volume `json:"volume" copier:"Volume"` Volume Volume `json:"volume" copier:"Volume"`
} }
CreateVolumeResp { CreateVolumeResp {
@ -414,7 +481,7 @@ type(
VolumeType string `json:"volume_type" copier:"VolumeType"` VolumeType string `json:"volume_type" copier:"VolumeType"`
} }
VolumeResp{ VolumeResp {
CreatedAt string `json:"created_at" copier:"CreatedAt"` CreatedAt string `json:"created_at" copier:"CreatedAt"`
Id string `json:"id" copier:"Id"` Id string `json:"id" copier:"Id"`
AvailabilityZone string `json:"availability_zone" copier:"AvailabilityZone"` AvailabilityZone string `json:"availability_zone" copier:"AvailabilityZone"`
@ -434,17 +501,17 @@ type(
ConsumesQuota bool `json:"consumes_quota" copier:"ConsumesQuota"` ConsumesQuota bool `json:"consumes_quota" copier:"ConsumesQuota"`
} }
) )
type( type (
ListVolumeTypesReq{ ListVolumeTypesReq {
} }
ListVolumeTypesResp{ ListVolumeTypesResp {
VolumeTypes []Volume_types `json:"volume_types" copier:"VolumeTypes"` VolumeTypes []Volume_types `json:"volume_types" copier:"VolumeTypes"`
Code int32 `json:"code,omitempty" copier:"Code"` Code int32 `json:"code,omitempty" copier:"Code"`
Msg string `json:"msg,omitempty" copier:"Msg"` Msg string `json:"msg,omitempty" copier:"Msg"`
ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"`
} }
Volume_types{ Volume_types {
Description string `json:"description" copier:"Description"` Description string `json:"description" copier:"Description"`
Id string `json:"id" copier:"Id"` Id string `json:"id" copier:"Id"`
IsPublic bool `json:"is_public" copier:"IsPublic"` IsPublic bool `json:"is_public" copier:"IsPublic"`
@ -456,23 +523,22 @@ type(
Extra_specs { Extra_specs {
Capabilities string `json:"capabilities" copier:"Capabilities"` Capabilities string `json:"capabilities" copier:"Capabilities"`
} }
) )
/******************find ListVolumesDetail end*************************/ /******************find ListVolumesDetail end*************************/
type( type (
ListFlavorsDetailReq{ ListFlavorsDetailReq {
} }
ListFlavorsDetailResp{ ListFlavorsDetailResp {
Flavor []Flavors `json:"flavors" copier:"Flavor"` Flavor []Flavors `json:"flavors" copier:"Flavor"`
Code int32 `json:"code,omitempty"` Code int32 `json:"code,omitempty"`
Msg string `json:"msg,omitempty"` Msg string `json:"msg,omitempty"`
ErrorMsg string `json:"errorMsg,omitempty"` ErrorMsg string `json:"errorMsg,omitempty"`
} }
Flavors{ Flavors {
name string `json:"name" copier:"name"` name string `json:"name" copier:"name"`
description string `json:"description" copier:"description"` description string `json:"description" copier:"description"`
id string `json:"id" copier:"id"` id string `json:"id" copier:"id"`
@ -485,6 +551,4 @@ type(
rxtx_factor float32 `json:"rxtx_factor" copier:"rxtx_factor"` rxtx_factor float32 `json:"rxtx_factor" copier:"rxtx_factor"`
os_flavor_access_is_public bool `json:"os_flavor_access_is_public" copier:"os_flavor_access_is_public"` os_flavor_access_is_public bool `json:"os_flavor_access_is_public" copier:"os_flavor_access_is_public"`
} }
) )

View File

@ -5,6 +5,7 @@ import (
"net/http" "net/http"
ai "gitlink.org.cn/jcce-pcm/pcm-coordinator/api/internal/handler/ai" ai "gitlink.org.cn/jcce-pcm/pcm-coordinator/api/internal/handler/ai"
cloud "gitlink.org.cn/jcce-pcm/pcm-coordinator/api/internal/handler/cloud"
core "gitlink.org.cn/jcce-pcm/pcm-coordinator/api/internal/handler/core" core "gitlink.org.cn/jcce-pcm/pcm-coordinator/api/internal/handler/core"
hpc "gitlink.org.cn/jcce-pcm/pcm-coordinator/api/internal/handler/hpc" hpc "gitlink.org.cn/jcce-pcm/pcm-coordinator/api/internal/handler/hpc"
image "gitlink.org.cn/jcce-pcm/pcm-coordinator/api/internal/handler/image" image "gitlink.org.cn/jcce-pcm/pcm-coordinator/api/internal/handler/image"
@ -93,6 +94,21 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
Path: "/core/getComputilityStatistics", Path: "/core/getComputilityStatistics",
Handler: core.GetComputilityStatisticsHandler(serverCtx), Handler: core.GetComputilityStatisticsHandler(serverCtx),
}, },
{
Method: http.MethodGet,
Path: "/core/assets",
Handler: core.NodeAssetsHandler(serverCtx),
},
{
Method: http.MethodPost,
Path: "/core/saveHashcat",
Handler: core.SaveHashcatHandler(serverCtx),
},
{
Method: http.MethodGet,
Path: "/core/getHashcat/:crackTaskId",
Handler: core.GetHashcatHandler(serverCtx),
},
}, },
rest.WithPrefix("/pcm/v1"), rest.WithPrefix("/pcm/v1"),
) )
@ -109,6 +125,27 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
Path: "/hpc/listHistoryJob", Path: "/hpc/listHistoryJob",
Handler: hpc.ListHistoryJobHandler(serverCtx), Handler: hpc.ListHistoryJobHandler(serverCtx),
}, },
{
Method: http.MethodGet,
Path: "/queue/assets",
Handler: hpc.QueueAssetsHandler(serverCtx),
},
},
rest.WithPrefix("/pcm/v1"),
)
server.AddRoutes(
[]rest.Route{
{
Method: http.MethodGet,
Path: "/task/list",
Handler: cloud.CloudListHandler(serverCtx),
},
{
Method: http.MethodGet,
Path: "/cloud/DeleteYaml",
Handler: cloud.DeleteYamlHandler(serverCtx),
},
}, },
rest.WithPrefix("/pcm/v1"), rest.WithPrefix("/pcm/v1"),
) )
@ -318,6 +355,16 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes( server.AddRoutes(
[]rest.Route{ []rest.Route{
{
Method: http.MethodGet,
Path: "/vm/getComputeLimits",
Handler: vm.GetComputeLimitsHandler(serverCtx),
},
{
Method: http.MethodGet,
Path: "/vm/getVolumeLimits",
Handler: vm.GetVolumeLimitsHandler(serverCtx),
},
{ {
Method: http.MethodGet, Method: http.MethodGet,
Path: "/vm/listServer", Path: "/vm/listServer",

View File

@ -2143,6 +2143,81 @@ type CheckResp struct {
Exist bool `json:"exist"` Exist bool `json:"exist"`
} }
type Rate struct {
}
type Absolute struct {
MaxServerMeta int64 `json:"max_server_meta,optional"`
MaxPersonality int64 `json:"max_personality,optional"`
TotalServerGroupsUsed int64 `json:"total_server_groups_used,optional"`
MaxImageMeta int64 `json:"max_image_meta,optional"`
MaxPersonalitySize int64 `json:"max_personality_size,optional"`
MaxTotalKeypairs int64 `json:"max_total_keypairs,optional"`
MaxSecurityGroupRules int64 `json:"max_security_group_rules,optional"`
MaxServerGroups int64 `json:"max_server_groups,optional"`
TotalCoresUsed int64 `json:"total_cores_used,optional"`
TotalRAMUsed int64 `json:"total_ram_used,optional"`
TotalInstancesUsed int64 `json:"total_instances_used,optional"`
MaxSecurityGroups int64 `json:"max_security_groups,optional"`
TotalFloatingIpsUsed int64 `json:"total_floating_ips_used,optional"`
MaxTotalCores int64 `json:"max_total_cores,optional"`
MaxServerGroupMembers int64 `json:"max_server_group_members,optional"`
MaxTotalFloatingIps int64 `json:"max_total_floating_ips,optional"`
TotalSecurityGroupsUsed int64 `json:"total_security_groups_used,optional"`
MaxTotalInstances int64 `json:"max_total_instances,optional"`
MaxTotalRAMSize int64 `json:"max_total_ram_size,optional"`
}
type Limits struct {
Rate Rate `json:"rate,optional"`
Absolute Absolute `json:"absolute,optional"`
}
type GetComputeLimitsReq struct {
Limit int32 `json:"limit,optional"`
OffSet int32 `json:"offSet,optional"`
}
type GetComputeLimitsResp struct {
Limits Limits `json:"limits,optional"`
Code int32 `json:"code,omitempty"`
Msg string `json:"msg,omitempty"`
ErrorMsg string `json:"errorMsg,omitempty"`
}
type VolumeRate struct {
}
type VolumeAbsolute struct {
TotalSnapshotsUsed int32 `json:"total_snapshots_used,optional"`
MaxTotalBackups int32 `json:"max_total_backups,optional"`
MaxTotalVolumeGigabytes int32 `json:"max_total_volume_gigabytes,optional"`
MaxTotalSnapshots int32 `json:"max_total_snapshots,optional"`
MaxTotalBackupGigabytes int32 `json:"max_total_backup_gigabytes,optional"`
TotalBackupGigabytesUsed int32 `json:"total_backup_gigabytes_used,optional"`
MaxTotalVolumes int32 `json:"max_total_volumes,optional"`
TotalVolumesUsed int32 `json:"total_volumes_used,optional"`
TotalBackupsUsed int32 `json:"total_backups_used,optional"`
TotalGigabytesUsed int32 `json:"total_gigabytes_used,optional"`
}
type VolumeLimits struct {
Rate VolumeRate `json:"rate,optional"`
Absolute VolumeAbsolute `json:"absolute,optional"`
}
type GetVolumeLimitsReq struct {
Limit int32 `json:"limit,optional"`
OffSet int32 `json:"offSet,optional"`
}
type GetVolumeLimitsResp struct {
Limits VolumeLimits `json:"limits,optional"`
Code int32 `json:"code,omitempty"`
Msg string `json:"msg,omitempty"`
ErrorMsg string `json:"errorMsg,omitempty"`
}
type ListServersReq struct { type ListServersReq struct {
Limit int32 `form:"limit,optional"` Limit int32 `form:"limit,optional"`
OffSet int32 `form:"offSet,optional"` OffSet int32 `form:"offSet,optional"`
@ -2584,3 +2659,50 @@ type Flavors struct {
Rxtx_factor float32 `json:"rxtx_factor" copier:"rxtx_factor"` Rxtx_factor float32 `json:"rxtx_factor" copier:"rxtx_factor"`
Os_flavor_access_is_public bool `json:"os_flavor_access_is_public" copier:"os_flavor_access_is_public"` Os_flavor_access_is_public bool `json:"os_flavor_access_is_public" copier:"os_flavor_access_is_public"`
} }
type ApplyReq struct {
YamlString string `json:"yamlString" copier:"yamlString"`
}
type DeleteReq struct {
YamlString string `json:"yamlString" copier:"yamlString"`
}
type ApplyResp struct {
Code int32 `json:"code,omitempty"`
Msg string `json:"msg,omitempty"`
DataSet []DataSet `json:"dataSet,omitempty"`
}
type DeleteResp struct {
Code int32 `json:"code,omitempty"`
Msg string `json:"msg,omitempty"`
Data string `json:"data,omitempty"`
}
type DataSet struct {
ApiVersion int32 `json:"apiVersion,omitempty"`
Kind string `json:"kind,omitempty"`
Name string `json:"name,omitempty"`
NameSpace string `json:"nameSpace,omitempty"`
}
type CloudListResp struct {
Clouds []Cloud `json:"clouds"`
}
type Cloud struct {
Id int64 `json:"id"` // id
TaskId int64 `json:"taskId"` // 任务id
ParticipantId int64 `json:"participantId"` // 集群静态信息id
ApiVersion string `json:"apiVersion"`
Name string `json:"name"` // 名称
Namespace string `json:"namespace"` // 命名空间
Kind string `json:"kind"` // 种类
Status string `json:"status"` // 状态
StartTime string `json:"startTime"` // 开始时间
RunningTime int64 `json:"runningTime"` // 运行时长
CreatedBy int64 `json:"createdBy"` // 创建人
CreatedTime string `json:"createdTime"` // 创建时间
Result string `json:"result"`
}

2
go.mod
View File

@ -19,7 +19,7 @@ require (
gitlink.org.cn/jcce-pcm/pcm-participant-ceph v0.0.0-20230817103341-2459e5bfc835 gitlink.org.cn/jcce-pcm/pcm-participant-ceph v0.0.0-20230817103341-2459e5bfc835
gitlink.org.cn/jcce-pcm/pcm-participant-modelarts v0.0.0-20230719015658-08a29549d86a gitlink.org.cn/jcce-pcm/pcm-participant-modelarts v0.0.0-20230719015658-08a29549d86a
gitlink.org.cn/jcce-pcm/pcm-participant-octopus v0.0.0-20230714030856-601935bc30e2 gitlink.org.cn/jcce-pcm/pcm-participant-octopus v0.0.0-20230714030856-601935bc30e2
gitlink.org.cn/jcce-pcm/pcm-participant-openstack v0.0.0-20230904012700-2e8e98c5fd2f gitlink.org.cn/jcce-pcm/pcm-participant-openstack v0.0.0-20230904093908-860f0b2b4eb4
gitlink.org.cn/jcce-pcm/pcm-participant-slurm v0.0.0-20230714030125-a52fa198ddf4 gitlink.org.cn/jcce-pcm/pcm-participant-slurm v0.0.0-20230714030125-a52fa198ddf4
gitlink.org.cn/jcce-pcm/utils v0.0.2 gitlink.org.cn/jcce-pcm/utils v0.0.2
gonum.org/v1/gonum v0.11.0 gonum.org/v1/gonum v0.11.0

4
go.sum
View File

@ -1150,8 +1150,8 @@ gitlink.org.cn/jcce-pcm/pcm-participant-modelarts v0.0.0-20230719015658-08a29549
gitlink.org.cn/jcce-pcm/pcm-participant-modelarts v0.0.0-20230719015658-08a29549d86a/go.mod h1:BhOgwM1LC+BD46DjTaQyYQVZs1CikwI5Pl/6qzKUexc= gitlink.org.cn/jcce-pcm/pcm-participant-modelarts v0.0.0-20230719015658-08a29549d86a/go.mod h1:BhOgwM1LC+BD46DjTaQyYQVZs1CikwI5Pl/6qzKUexc=
gitlink.org.cn/jcce-pcm/pcm-participant-octopus v0.0.0-20230714030856-601935bc30e2 h1:RcGSqhsod6VXLksSLqNjV0q/SCeoUv6CbThKmV9NTZE= gitlink.org.cn/jcce-pcm/pcm-participant-octopus v0.0.0-20230714030856-601935bc30e2 h1:RcGSqhsod6VXLksSLqNjV0q/SCeoUv6CbThKmV9NTZE=
gitlink.org.cn/jcce-pcm/pcm-participant-octopus v0.0.0-20230714030856-601935bc30e2/go.mod h1:uyvpVqG1jHDXX+ubXI0RBwnWXzVykD/mliqGQIDvRoo= gitlink.org.cn/jcce-pcm/pcm-participant-octopus v0.0.0-20230714030856-601935bc30e2/go.mod h1:uyvpVqG1jHDXX+ubXI0RBwnWXzVykD/mliqGQIDvRoo=
gitlink.org.cn/jcce-pcm/pcm-participant-openstack v0.0.0-20230904012700-2e8e98c5fd2f h1:SSmRAO+lCf7/r2sJ35akkCP61+lYTCNhPZXf59LJPa0= gitlink.org.cn/jcce-pcm/pcm-participant-openstack v0.0.0-20230904093908-860f0b2b4eb4 h1:uflRHFdG0fXwqwfHc8LVgs3DG0n4cIKBW+X7F9XgNXE=
gitlink.org.cn/jcce-pcm/pcm-participant-openstack v0.0.0-20230904012700-2e8e98c5fd2f/go.mod h1:JRFx7CjtUDyjJGyLWuInhr4rKfqcNY66Fxi+jq+Y+sc= gitlink.org.cn/jcce-pcm/pcm-participant-openstack v0.0.0-20230904093908-860f0b2b4eb4/go.mod h1:JRFx7CjtUDyjJGyLWuInhr4rKfqcNY66Fxi+jq+Y+sc=
gitlink.org.cn/jcce-pcm/pcm-participant-slurm v0.0.0-20230714030125-a52fa198ddf4 h1:r2hBP5G/bbkPpDTPk3ENnQxD82vkoYMSeNHYhNAVRX4= gitlink.org.cn/jcce-pcm/pcm-participant-slurm v0.0.0-20230714030125-a52fa198ddf4 h1:r2hBP5G/bbkPpDTPk3ENnQxD82vkoYMSeNHYhNAVRX4=
gitlink.org.cn/jcce-pcm/pcm-participant-slurm v0.0.0-20230714030125-a52fa198ddf4/go.mod h1:zRdVJiv4r4jgBli2xpYGmV0n6Gmz8fkZ5pJaNK2MbTU= gitlink.org.cn/jcce-pcm/pcm-participant-slurm v0.0.0-20230714030125-a52fa198ddf4/go.mod h1:zRdVJiv4r4jgBli2xpYGmV0n6Gmz8fkZ5pJaNK2MbTU=
gitlink.org.cn/jcce-pcm/utils v0.0.2 h1:Stif8W9C9TOCS2hw4g+OlOywDrsVYNrkiyKfBrWkT0w= gitlink.org.cn/jcce-pcm/utils v0.0.2 h1:Stif8W9C9TOCS2hw4g+OlOywDrsVYNrkiyKfBrWkT0w=