diff --git a/api/desc/cloud/pcm-cloud.api b/api/desc/cloud/pcm-cloud.api index 48030127..03b0ed52 100644 --- a/api/desc/cloud/pcm-cloud.api +++ b/api/desc/cloud/pcm-cloud.api @@ -27,10 +27,10 @@ type ( MetricsUrl string `json:"metricsUrl"` //监控url } - ListCloudResp{ + ListParticipantResp { Code string `json:"code"` Msg string `json:"msg"` - Data []CloudResp `json:"data"` + Data []ParticipantResp `json:"data"` } ParticipantResp { @@ -49,9 +49,21 @@ type ( Data string `json:"data"` } + TenantInfo { + Id int64 `json:"id"` // id + TenantName string `json:"tenantName"` // 租户名称 + TenantDesc string `json:"tenantDesc"` // 描述信息 + Clusters string `json:"clusters"` // 集群名称,用","分割 + Type int64 `json:"type"` // 租户所属(0数算,1超算,2智算) + DeletedFlag int64 `json:"deletedFlag"` // 是否删除 + CreatedBy int64 `json:"createdBy"` // 创建人 + CreatedTime string `json:"createdTime"` // 创建时间 + UpdatedBy int64 `json:"updatedBy"` // 更新人 + UpdatedTime string `json:"updated_time"` // 更新时间 + } + UpdateTenantReq{ - TenantName string `json:"nsID"` - clusters []string `json:"clusters"` + Tenants [] TenantInfo `json:"tenants"` } ) diff --git a/api/desc/pcm.api b/api/desc/pcm.api index d1646825..7d261511 100644 --- a/api/desc/pcm.api +++ b/api/desc/pcm.api @@ -154,15 +154,15 @@ service pcm { @handler deleteClusterHandler post /cloud/deleteCluster (RegisterClusterReq) returns (CloudResp) - @doc "数算集群查询" + @doc "数算集群信息查询" @handler listCloudClusterHandler - get /cloud/listCluster returns (ListCloudResp) + get /cloud/listCluster returns (ListParticipantResp) @doc "触发租户更新" @handler noticeTenantHandler get /cloud/noticeTenant returns (CloudResp) - @doc "触发租户更新" + @doc "租户更新" @handler updateTenantHandler post /cloud/updateTenant (UpdateTenantReq) returns (CloudResp) } diff --git a/api/internal/logic/cloud/noticetenantlogic.go b/api/internal/logic/cloud/noticetenantlogic.go index e4020c2a..8effbb46 100644 --- a/api/internal/logic/cloud/noticetenantlogic.go +++ b/api/internal/logic/cloud/noticetenantlogic.go @@ -23,7 +23,7 @@ func NewNoticeTenantLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Noti } } -// NoticeTenant 通知租户更新数据 +// NoticeTenant 通知更新租户数据 func (l *NoticeTenantLogic) NoticeTenant() (resp *types.CloudResp, err error) { // todo: add your logic here and delete this line diff --git a/api/internal/types/types.go b/api/internal/types/types.go index 25d7c50b..3b1cb2c5 100644 --- a/api/internal/types/types.go +++ b/api/internal/types/types.go @@ -3345,10 +3345,10 @@ type RegisterClusterReq struct { MetricsUrl string `json:"metricsUrl"` //监控url } -type ListCloudResp struct { - Code string `json:"code"` - Msg string `json:"msg"` - Data []CloudResp `json:"data"` +type ListParticipantResp struct { + Code string `json:"code"` + Msg string `json:"msg"` + Data []ParticipantResp `json:"data"` } type ParticipantResp struct { @@ -3367,9 +3367,21 @@ type CloudResp struct { Data string `json:"data"` } +type TenantInfo struct { + Id int64 `json:"id"` // id + TenantName string `json:"tenantName"` // 租户名称 + TenantDesc string `json:"tenantDesc"` // 描述信息 + Clusters string `json:"clusters"` // 集群名称,用","分割 + Type int64 `json:"type"` // 租户所属(0数算,1超算,2智算) + DeletedFlag int64 `json:"deletedFlag"` // 是否删除 + CreatedBy int64 `json:"createdBy"` // 创建人 + CreatedTime string `json:"createdTime"` // 创建时间 + UpdatedBy int64 `json:"updatedBy"` // 更新人 + UpdatedTime string `json:"updated_time"` // 更新时间 +} + type UpdateTenantReq struct { - TenantName string `json:"nsID"` - Clusters []string `json:"clusters"` + Tenants []TenantInfo `json:"tenants"` } type ControllerMetricsResp struct {