From deea8629e0df332665fd7c290b35b1781e8b3a70 Mon Sep 17 00:00:00 2001 From: Wang Defa <1+wangdefa@noreply.gitea.bcde.io> Date: Fri, 17 Jul 2026 16:52:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E4=BE=8B=E8=A7=84=E6=A0=BC=E9=80=8F?= =?UTF-8?q?=E4=BC=A0=20quotaNames,=E9=87=8D=E6=96=B0=E7=94=9F=E6=88=90=20s?= =?UTF-8?q?wagger?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/docs.go | 7 +++++++ docs/swagger.json | 7 +++++++ docs/swagger.yaml | 7 +++++++ internal/oci/shape.go | 4 ++++ 4 files changed, 25 insertions(+) diff --git a/docs/docs.go b/docs/docs.go index 5e77fa3..1d9ab62 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -8654,6 +8654,13 @@ const docTemplate = `{ }, "processorDescription": { "type": "string" + }, + "quotaNames": { + "description": "QuotaNames 是该 shape 对应的配额名(与 Limits 服务 compute limit name 同名),\n前端据此结合 limits 行判定配额与 AD 可用性。", + "type": "array", + "items": { + "type": "string" + } } } }, diff --git a/docs/swagger.json b/docs/swagger.json index 142bc88..9bddd13 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -8647,6 +8647,13 @@ }, "processorDescription": { "type": "string" + }, + "quotaNames": { + "description": "QuotaNames 是该 shape 对应的配额名(与 Limits 服务 compute limit name 同名),\n前端据此结合 limits 行判定配额与 AD 可用性。", + "type": "array", + "items": { + "type": "string" + } } } }, diff --git a/docs/swagger.yaml b/docs/swagger.yaml index dcbdb53..886853a 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -1754,6 +1754,13 @@ definitions: type: number processorDescription: type: string + quotaNames: + description: |- + QuotaNames 是该 shape 对应的配额名(与 Limits 服务 compute limit name 同名), + 前端据此结合 limits 行判定配额与 AD 可用性。 + items: + type: string + type: array type: object oci-portal_internal_oci.ConsoleConnection: properties: diff --git a/internal/oci/shape.go b/internal/oci/shape.go index 3578f32..a61e5b9 100644 --- a/internal/oci/shape.go +++ b/internal/oci/shape.go @@ -26,6 +26,9 @@ type ComputeShape struct { MemoryMaxGBs float32 `json:"memoryMaxGBs,omitempty"` Gpus int `json:"gpus,omitempty"` ProcessorDescription string `json:"processorDescription,omitempty"` + // QuotaNames 是该 shape 对应的配额名(与 Limits 服务 compute limit name 同名), + // 前端据此结合 limits 行判定配额与 AD 可用性。 + QuotaNames []string `json:"quotaNames,omitempty"` } // shapeCacheEntry 是一份 shape 清单的缓存条目。 @@ -92,6 +95,7 @@ func toComputeShape(s core.Shape) ComputeShape { BillingType: string(s.BillingType), IsFlexible: s.OcpuOptions != nil, ProcessorDescription: deref(s.ProcessorDescription), + QuotaNames: s.QuotaNames, } out.Ocpus, out.MemoryInGBs = deref32(s.Ocpus), deref32(s.MemoryInGBs) if s.Gpus != nil {