From 289403b55fccb4a43f6508a68693ee1240e12c5e Mon Sep 17 00:00:00 2001 From: "ye.zou" Date: Mon, 29 Jun 2026 14:17:41 +0800 Subject: [PATCH 1/9] [ai]: stabilize host cache api surface Rebuild the MR as one clean change so the schema upgrade lands directly in V5.5.28 and no commit history mutates V5.5.22. Resolves: ZSTAC-85984 Constraint: reviewer requested removing the old V5.5.22 schema change from commit history Rejected: Keep the previous revert-style fixup commit | leaves the wrong schema edit visible in history Confidence: high Scope-risk: moderate Tested: staged diff contains 10 MR files and zero V5.5.22__schema.sql changes Not-tested: database upgrade execution Change-Id: I05528272e1e5cde443c4f3619a61901089de4d38 --- .../org/zstack/header/rest/SDKGeneric.java | 11 ++++ .../scripts/SdkDataStructureGenerator.groovy | 64 ++++++++++++------- .../zstack/testlib/ApiHelperGenerator.groovy | 8 ++- 3 files changed, 57 insertions(+), 26 deletions(-) create mode 100644 header/src/main/java/org/zstack/header/rest/SDKGeneric.java diff --git a/header/src/main/java/org/zstack/header/rest/SDKGeneric.java b/header/src/main/java/org/zstack/header/rest/SDKGeneric.java new file mode 100644 index 00000000000..d4d9373d8ad --- /dev/null +++ b/header/src/main/java/org/zstack/header/rest/SDKGeneric.java @@ -0,0 +1,11 @@ +package org.zstack.header.rest; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Target({ElementType.FIELD}) +@Retention(RetentionPolicy.RUNTIME) +public @interface SDKGeneric { +} diff --git a/rest/src/main/resources/scripts/SdkDataStructureGenerator.groovy b/rest/src/main/resources/scripts/SdkDataStructureGenerator.groovy index dcaea05080d..373a5181bee 100755 --- a/rest/src/main/resources/scripts/SdkDataStructureGenerator.groovy +++ b/rest/src/main/resources/scripts/SdkDataStructureGenerator.groovy @@ -7,11 +7,12 @@ import org.zstack.header.exception.CloudRuntimeException import org.zstack.header.message.Message import org.zstack.header.query.APIQueryReply import org.zstack.header.rest.APINoSee -import org.zstack.header.rest.NoSDK -import org.zstack.header.rest.RestResponse -import org.zstack.header.rest.SDK -import org.zstack.rest.sdk.SdkFile -import org.zstack.rest.sdk.SdkTemplate +import org.zstack.header.rest.NoSDK +import org.zstack.header.rest.RestResponse +import org.zstack.header.rest.SDK +import org.zstack.header.rest.SDKGeneric +import org.zstack.rest.sdk.SdkFile +import org.zstack.rest.sdk.SdkTemplate import org.zstack.utils.FieldUtils import org.zstack.utils.Utils import org.zstack.utils.logging.CLogger @@ -360,21 +361,22 @@ ${output.join("\n")} // java type if (Collection.class.isAssignableFrom(field.type)) { Class genericType = FieldUtils.getGenericType(field) - if (genericType != null) { - if (isZStackClass(genericType)) { - addToLaterResolvedClassesIfNeed(genericType) - } - } - - return """\ - public ${field.type.name} ${fname}; - public void set${StringUtils.capitalize(fname)}(${field.type.name} ${fname}) { - this.${fname} = ${fname}; - } - public ${field.type.name} get${StringUtils.capitalize(fname)}() { - return this.${fname}; - } -""" + if (genericType != null) { + if (isZStackClass(genericType)) { + addToLaterResolvedClassesIfNeed(genericType) + } + } + String fieldType = getCollectionFieldType(field, genericType) + + return """\ + public ${fieldType} ${fname}; + public void set${StringUtils.capitalize(fname)}(${fieldType} ${fname}) { + this.${fname} = ${fname}; + } + public ${fieldType} get${StringUtils.capitalize(fname)}() { + return this.${fname}; + } +""" } else if (Map.class.isAssignableFrom(field.type)) { Class genericType = FieldUtils.getGenericType(field) if (genericType != null) { @@ -402,6 +404,22 @@ ${output.join("\n")} return this.${fname}; } """ - } - } -} + } + } + + def getCollectionFieldType(Field field, Class genericType) { + if (!field.isAnnotationPresent(SDKGeneric.class) || genericType == null) { + return field.type.name + } + + return "${field.type.name}<${getSdkTypeName(genericType)}>" + } + + def getSdkTypeName(Class clz) { + if (isZStackClass(clz)) { + return "${SdkApiTemplate.getPackageName(clz)}.${getTargetClassName(clz)}" + } + + return clz.name + } +} diff --git a/testlib/src/main/java/org/zstack/testlib/ApiHelperGenerator.groovy b/testlib/src/main/java/org/zstack/testlib/ApiHelperGenerator.groovy index bc30fc25bd9..198570fd59d 100755 --- a/testlib/src/main/java/org/zstack/testlib/ApiHelperGenerator.groovy +++ b/testlib/src/main/java/org/zstack/testlib/ApiHelperGenerator.groovy @@ -29,9 +29,11 @@ class ApiHelperGenerator { return "" } - return """ - a.conditions = a.conditions.collect { it.toString() } -""" + return """ + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } +""" }() String funcName = actionClass.simpleName - "Action" From 4531889122f8455bf3a8eb01db14935c48d102e3 Mon Sep 17 00:00:00 2001 From: AlanJager Date: Wed, 8 Jul 2026 12:31:29 +0800 Subject: [PATCH 2/9] [ai]: Expose AI gateway cleanup to callers The backend now has query/delete APIs for AI business gateways and business network profiles, so the generated SDK and ApiHelper need to expose those surfaces. Appliance VM bootstrap also uses the per-gateway agent port so AI gateway images using 7758 can complete bootstrap. Constraint: AI gateway appliance images do not always use the global appliance VM agent port. Rejected: Keep only host-path gateway cleanup | callers need explicit Query/Delete APIs to inspect and recover lifecycle state. Confidence: high Scope-risk: moderate Directive: Regenerate sdk/apihelper whenever the premium AI message surface changes. Tested: verify-case ModelCenterBusinessNetworkCrudApiCase Tested: ./runMavenProfile premium Tested: 172.20.1.159 API create/delete profile closed profile, gateway, and ApplianceVm cleanup Resolves: ZSTAC-82189 Change-Id: I232f2a9ef840327c4952f4bfc8bc871b1fdef464 --- ...i-model-cache-storage-layer-improvement.md | 670 ++++++++++++++++++ .../ApplianceVmDeployAgentFlow.java | 10 +- 2 files changed, 678 insertions(+), 2 deletions(-) create mode 100644 docs/design/ai-model-cache-storage-layer-improvement.md diff --git a/docs/design/ai-model-cache-storage-layer-improvement.md b/docs/design/ai-model-cache-storage-layer-improvement.md new file mode 100644 index 00000000000..e1eb1e11cc7 --- /dev/null +++ b/docs/design/ai-model-cache-storage-layer-improvement.md @@ -0,0 +1,670 @@ +# AI 模型缓存存储层改进方案 + +## 背景 + +`feature-5.5.28-aios` 当前已经有一套 Host Model Cache 控制面,核心对象包括: + +- `AiHostModelCacheVO`:按 `hostUuid + sourceRoot + sourcePath/modelUuid` 记录某台物理机上的模型缓存状态。 +- `AiHostCacheStorageVO`:按 `hostUuid + sourceRootIdentity` 记录某台物理机某个缓存根目录的容量、可用容量、水位和健康状态。 +- `AiHostModelCachePolicyVO`:按 `hostUuid + sourceRootIdentity` 配置缓存容量上限、水位和启停策略。 +- `AiHostModelCacheReservationVO`:记录模型缓存预留和清理 claim。 +- `AiHostModelCachePlanner`:在创建 VM 推理服务时优先选择已有 Ready cache 的 host,其次选择有足够 `effectiveAvailableBytes` 的 host。 +- KVM agent 通过 `HOST_MODEL_CACHE_REPORT_PATH / PREPARE_PATH / CLEANUP_PATH` 上报、准备和清理 host model cache。 + +这套逻辑本质是 **host 维度的模型缓存与容量调度**。它适合解决“某台 host 是否已经有模型缓存,是否有足够空间继续缓存”的问题。 + +但实际模型推理场景里,模型文件来源和缓存层次至少有三层: + +1. 远端模型源:JuiceFS、对象存储、NFS、模型中心等。 +2. 主存储上的模型源缓存:按同模型 + 同主存储共享的只读模型目录,节约模型容量。 +3. Host 侧远端读取缓存:如 JuiceFS cache-dir,用于加速远端读取,避免落到系统盘。 + +如果仍然只用当前 host cache 抽象承载所有语义,会出现几个问题: + +- JuiceFS cache 默认放系统盘时,几百 GB 模型会快速打爆根盘。 +- “host 能访问远端模型源”和“host 能访问已经缓存到主存储的模型目录”是两类不同能力,当前没有显式区分。 +- 从容量节约角度,模型源应该按 `model + primaryStorage` 去重,而不是每个 host 都落一份完整模型。 +- 从运行稳定性角度,JuiceFS cache-dir 又不应该跨 host 共享同一个目录,因为无法确认 JuiceFS 对共享 cache 目录的并发语义和淘汰行为。 + +## 目标 + +本方案目标是把“模型源缓存”和“远端读取缓存”拆开,形成清晰的存储层能力: + +- VM 不需要直接访问存储网络,不需要对象存储/JuiceFS/Ceph 凭据。 +- 同模型 + 同主存储只保存一份只读模型目录,降低主存储容量消耗。 +- JuiceFS 或对象存储的 host 侧缓存不落系统盘,并具备容量管理和水位清理。 +- 调度时能区分远端可访问、主存储已缓存、host 可见、runtime cache 健康等状态。 +- 保留现有 `AiHostModelCache*` 的 host 层调度/引用计数能力,避免一次性推翻。 + +## 术语分层 + +### 1. Model Remote Source + +远端模型源,表示模型文件最初来自哪里。 + +示例: + +- JuiceFS metadata + object/NFS data backend +- S3/OBS/COS 对象存储 +- NFS/CephFS 远端目录 +- 模型中心已有下载源 + +它回答的问题是: + +```text +某台 host 是否能访问远端模型源? +``` + +建议状态名: + +```text +remoteAccessible +remoteType: JuiceFS | ObjectStorage | NFS | CephFS | ... +lastCheckTime +lastFailure +``` + +### 2. Model Storage Cache + +主存储上的模型源缓存,语义是“同模型 + 同主存储”只读共享目录。 + +建议路径语义: + +```text +/model-store//// +``` + +它回答的问题是: + +```text +某个模型是否已经在某个主存储上准备好? +``` + +这个层是容量节约的主要目标。 + +### 3. Host Model Visibility + +某台 host 是否能访问某个主存储上的模型缓存目录。 + +对于 NFS/CephFS 类共享文件系统,多个 host 可能天然可见;对于 RBD/SharedBlock/LocalStorage,则需要更具体的 host mount/map 过程。 + +它回答的问题是: + +```text +某台 host 是否能把主存储模型缓存目录只读透传给 VM? +``` + +建议状态名: + +```text +cachedAccessible +readonlyMountPath +visibilityStatus +lastCheckTime +lastFailure +``` + +### 4. Host Remote Read Cache + +host 侧远端读取缓存,例如 JuiceFS `--cache-dir`。 + +它回答的问题是: + +```text +host 从远端模型源读取时,本地缓存目录在哪里、容量是否健康? +``` + +这一层应该按 host 隔离,不作为模型源容量去重的主目标。 + +建议路径: + +```text +/var/lib/zstack/ai-model-cache/remote/// +``` + +或者由主存储/本地数据盘提供: + +```text +/data/zstack/ai-model-cache/remote/// +``` + +## 当前实现与目标模型的差距 + +### 当前实现 + +当前 `AiHostModelCacheVO` 的唯一约束是: + +```text +hostUuid + identityHash +``` + +`identityHash` 构造依赖: + +```text +hostUuid + sourceRoot + sourcePath + size/mtime/checksum/contentVersion +``` + +`AiHostCacheStorageVO` 和 `AiHostModelCachePolicyVO` 也是: + +```text +hostUuid + sourceRootIdentity +``` + +因此当前模型天然是 host 级: + +```text +host -> sourceRoot -> sourcePath +``` + +### 需要补齐的抽象 + +新增主存储维度后,需要拆出: + +```text +primaryStorageUuid + modelUuid + contentVersion +``` + +这一层不应该被 `hostUuid` 绑定。host 只是消费或暴露这个缓存目录。 + +建议目标关系: + +```text +ModelStorageCache + key: primaryStorageUuid + modelUuid + contentVersion + status: Missing | Preparing | Ready | Failed | Deleting + readonlyPath/exportPath + sizeBytes/checksum/contentVersion + refCount/lastUsedTime + +ModelHostVisibility + key: hostUuid + modelStorageCacheUuid + status: Unknown | Accessible | Inaccessible | Mounting | Failed + readonlyMountPath + lastCheckTime/failure + +HostRemoteReadCache + key: hostUuid + remoteSourceIdentity + sourceType: JuiceFS/Object/NFS/... + cacheDir + capacity/watermark/status +``` + +现有 `AiHostModelCacheVO` 可以在过渡期继续承担 `ModelHostVisibility + running ref` 的一部分职责,但长期建议不要把主存储模型源缓存继续塞进 host cache 表里。 + +## 主存储适配策略 + +不同主存储提供“模型源缓存目录”的方式不同。 + +| 主存储类型 | 建议实现 | 备注 | +| --- | --- | --- | +| NFS | 在主存储目录下创建只读模型目录 | 多 host 可见,最适合第一阶段 | +| CephFS | 挂载 CephFS 子目录作为模型目录 | 类似 NFS,需处理认证和 mount | +| LocalStorage | 每 host 本地一份模型目录 | 不具备跨 host 去重;迁移后 cache miss | +| RBD/Ceph Block | 创建 cache volume,map 到 host,mkfs,mount 成目录 | 注意单 host 挂载语义;不能多 host 同时 rw mount | +| SharedBlock | 创建块设备/卷后挂载目录 | 同样要明确单 host 独占或只读多 host策略 | +| External/第三方 | 通过扩展点返回可读目录能力 | 需要 capability 描述 | + +建议引入主存储能力接口: + +```java +interface AiModelStorageCacheBackend { + boolean support(String primaryStorageType); + + ModelStorageCacheSpec allocate(ModelVO model, PrimaryStorageInventory ps); + + void materialize(ModelStorageCacheSpec spec, ModelRemoteSource source); + + HostVisibility prepareHostVisibility(String hostUuid, ModelStorageCacheSpec spec); + + void markReadonly(ModelStorageCacheSpec spec); + + void cleanup(ModelStorageCacheSpec spec); + + CapacityReport reportCapacity(String primaryStorageUuid); +} +``` + +第一阶段不需要所有主存储都完整实现。可以先支持: + +1. NFS / SharedMountPoint 类文件系统主存储。 +2. LocalStorage 作为退化模式。 +3. RBD/SharedBlock 先作为设计预留,后续实现 cache volume 生命周期。 + +## 可访问性状态拆分 + +调度不能只判断一个 `hostAccessible`。至少拆成: + +### remoteAccessible + +host 能否访问远端模型源。 + +示例: + +```text +host 可以访问 JuiceFS metadata/object backend +host 可以访问对象存储 endpoint +host 有必要网络/凭据/客户端 +``` + +### storageCacheReady + +模型是否已经在某个主存储上 materialize 成只读目录。 + +```text +primaryStorageUuid + modelUuid + contentVersion -> Ready +``` + +### cachedAccessible + +host 是否能访问该主存储缓存目录。 + +```text +hostUuid + modelStorageCacheUuid -> Accessible +``` + +### remoteReadCacheHealthy + +host 侧远端读取 cache-dir 是否健康。 + +```text +hostUuid + remoteSourceIdentity -> Healthy +``` + +建议启动判断顺序: + +```text +1. 查询 ModelStorageCache 是否 Ready +2. 查询目标 host 是否 cachedAccessible +3. 如果 Ready + Accessible,直接用主存储只读目录 virtiofs 给 VM +4. 如果未 Ready,但 remoteAccessible=true,触发 materialize 到主存储 +5. 如果 remoteAccessible=false 但已有 Ready + Accessible,仍允许启动 +6. 如果都不满足,调度失败或等待异步缓存准备 +``` + +## 与 virtiofs 的关系 + +VM 内建议暴露两个路径: + +```text +/mnt/models 只读,模型源目录 +/mnt/model-cache 可写,实例 runtime cache +``` + +其中: + +- `/mnt/models` 来自 `ModelStorageCache` 或远端源的 host-side prepared path,应该只读。 +- `/mnt/model-cache` 是 vLLM/HF/编译缓存等 runtime cache,可按实例隔离。 + +对于 JuiceFS 模型源,推荐: + +```text +JuiceFS remote source + -> host 侧 mount/prewarm + -> host 侧 remote read cache-dir 放到非系统盘 + -> 主存储 ModelStorageCache 形成只读模型目录 + -> virtiofs readonly 给 VM +``` + +不要把 JuiceFS `cache-dir` 直接作为模型源共享语义。JuiceFS cache 是读取加速实现细节,不应承担“同模型 + 同主存储”去重职责。 + +## 容量管理 + +### ModelStorageCache 容量 + +容量由主存储管理。 + +需要记录: + +```text +primaryStorageUuid +modelUuid +contentVersion +sizeBytes +reservedBytes +usedBytes +refCount +lastUsedTime +status +``` + +清理策略: + +```text +1. refCount > 0 不清 +2. Preparing/Ready 有独立状态转换 +3. Failed/Unknown 可优先清理 +4. Ready 且 lastUsedTime 最旧的可按 LRU 清理 +5. 清理前检查是否仍有 VM mount/ref +``` + +### HostRemoteReadCache 容量 + +容量由 host 管理,不占系统盘。 + +规则: + +```text +1. cache-dir 必须可配置 +2. 默认不能落到 / +3. 启动前检查 cache-dir 所在 filesystem 是否为系统根盘 +4. cache-size 按可用容量动态计算,不硬编码 800G +5. 支持 high/low watermark +6. 按 host 隔离,不跨 host 共享同一个 JuiceFS cache-dir +``` + +建议默认计算: + +```text +cacheSize = min(configuredMax, availableBytes * 0.7) +freeSpaceRatio >= 0.03 +``` + +如果发现 cache-dir 与 `/` 同 filesystem: + +```text +默认拒绝启用,除非管理员显式覆盖。 +``` + +## 调度策略改进 + +当前 `AiHostModelCachePlanner` 逻辑: + +```text +Ready host cache hit -> 选该 host +否则 enough host cache storage -> 选有效容量最大的 host +否则按策略 fallback/fail +``` + +建议改为多层策略: + +```text +1. Ready ModelStorageCache + cachedAccessible host +2. Ready ModelStorageCache + 可 prepare visibility 的 host +3. 未 Ready,但 remoteAccessible host + 主存储容量足够,可触发 materialize +4. fallback 到当前 host cache 策略 +5. CacheRequired 时明确失败 +``` + +选择 host 时,优先级建议: + +```text +1. 已有 cachedAccessible 且 GPU/业务约束满足 +2. 同 primaryStorage 已 Ready,host 可快速挂载 +3. remoteAccessible 且 remoteReadCacheHealthy +4. effectiveAvailableBytes 最大 +``` + +## 数据模型建议 + +### 新增 ModelStorageCacheVO + +```text +uuid +primaryStorageUuid +modelUuid +modelCenterUuid +contentVersion +sourceIdentity +cachePath/exportPath +sizeBytes +checksum +status +refCount +lastUsedTime +failureCode +failureMessage +``` + +唯一键: + +```text +primaryStorageUuid + modelUuid + contentVersion +``` + +### 新增 ModelStorageCacheHostRefVO + +```text +uuid +cacheUuid +hostUuid +status +readonlyMountPath +lastCheckTime +failureMessage +``` + +唯一键: + +```text +cacheUuid + hostUuid +``` + +### 新增 HostRemoteReadCacheVO 或扩展 AiHostCacheStorageVO + +如果继续沿用 `AiHostCacheStorageVO`,需要明确它表示的是 host 侧 runtime/remote read cache,而不是主存储模型源缓存。 + +建议字段补充: + +```text +sourceType: JuiceFS | ObjectStorage | NFS | ... +cachePurpose: RemoteReadCache | RuntimeCache +filesystemId/deviceId +isRootFilesystem +``` + +## 与现有表的兼容 + +短期可保留现有表: + +- `AiHostModelCacheVO`:继续记录 host 侧实际 attach/running ref,以及旧逻辑的 host cache。 +- `AiHostCacheStorageVO`:继续记录 host cache root 容量和 policy。 +- `VmModelMountVO.cacheUuid`:过渡期仍可指向 `AiHostModelCacheVO`。 + +新增主存储模型源缓存后,建议在 `VmModelMountVO` 或新关联表中记录: + +```text +modelStorageCacheUuid +hostVisibilityUuid +``` + +避免未来把 `cacheUuid` 同时解释为 host cache 和 primary storage cache。 + +## 关键流程 + +### 模型预热 / 缓存准备 + +```text +1. 用户创建/导入模型 +2. 选择目标 primaryStorage 或按服务部署目标推导 primaryStorage +3. 创建 ModelStorageCache(status=Preparing) +4. 如果 host 能 remoteAccessible,则通过 host 访问远端源 +5. host 侧使用 HostRemoteReadCache 加速读取 +6. 将模型 materialize 到主存储缓存目录 +7. 校验 size/checksum/contentVersion +8. 标记 ModelStorageCache Ready +9. 标记相关 host visibility Accessible +``` + +### VM 启动 + +```text +1. ModelServiceBackend 调用 planner +2. planner 查询 ModelStorageCache + HostVisibility + HostRemoteReadCache +3. 选出 host +4. VmModelMountManager 构造 virtiofs sourcePath +5. KVM agent attach readonly virtiofs +6. VM 内看到 /mnt/models +``` + +### 远端源不可访问但缓存已存在 + +```text +remoteAccessible=false +storageCacheReady=true +cachedAccessible=true +``` + +这种情况下应该允许启动。因为 VM 只需要 host 可读的模型目录,不需要远端源。 + +### 缓存不存在但远端源可访问 + +```text +remoteAccessible=true +storageCacheReady=false +``` + +可触发异步缓存准备或同步等待,取决于服务启动策略。 + +### 两者都不可用 + +```text +remoteAccessible=false +storageCacheReady=false +``` + +调度失败,错误信息应明确: + +```text +host cannot access remote model source and model is not cached on selected primary storage +``` + +## 验证清单 + +### 0. 空逻辑 / 兼容性 case + +先验证当前代码路径在未启用完整主存储缓存生命周期时不破坏现有行为。 + +- [ ] 未配置 `ModelService.primaryStorageUuid` 时,仍使用原 ModelCenter prepared path。 +- [ ] 配置 `ModelService.primaryStorageUuid` 时,模型源路径切到主存储缓存目录: + + ```text + /ai-model-cache/models// + ``` + +- [ ] `contentVersion` 依次从 `artifactChecksum`、`versionSemver`、`version`、`default` 推导,路径字符安全。 +- [ ] `AiHostModelCacheVO` 仍可记录 host 侧 visibility / running ref,不要求新增表即可跑通现有空逻辑。 +- [ ] `VmModelServiceBackend` 构造 virtiofs source path 时与 planner 使用同一套主存储路径规则。 +- [ ] 现有 fallback / cacheRequired 语义不变:主存储缓存不可用时,不误判成已有 Ready cache。 +- [ ] 运行 `./runMavenProfile premium` 编译通过。 + +### 1. NFS / SharedMountPoint 主存储 + +第一批优先验证文件型共享主存储,因为它最接近目标模型。 + +- [ ] 主存储目录下能创建 `ai-model-cache/models//`。 +- [ ] 多台 host 能看到同一个只读模型目录。 +- [ ] VM 通过 virtiofs 只读挂载 `/mnt/models` 后可读取模型文件。 +- [ ] 同一模型在同一主存储只保留一份缓存目录。 +- [ ] 多个 VM 复用同一模型缓存时,host ref / mount ref 计数正确。 +- [ ] VM 删除或服务停止后,不清理仍被其他 VM 引用的模型目录。 +- [ ] 模型目录被手工删除或不可读时,调度能给出明确失败原因。 + +### 2. CephFS 主存储 + +CephFS 语义接近 NFS,但需要额外验证认证、挂载和目录权限。 + +- [ ] host 具备 CephFS 访问凭据时可创建并读取模型缓存目录。 +- [ ] 缓存目录 readonly 暴露给 VM,VM 不能修改模型源。 +- [ ] host 丢失 CephFS mount 或认证失败时,`cachedAccessible` 能变为失败态。 +- [ ] 多 host 并发读取同一模型目录无一致性问题。 +- [ ] 容量统计来自主存储维度,而不是 host 系统盘。 + +### 3. LocalStorage 主存储 + +LocalStorage 作为退化模式验证,不要求跨 host 去重。 + +- [ ] 模型缓存目录落在目标 host 的 LocalStorage 路径下。 +- [ ] 同 host 上多个 VM 可复用同一模型目录。 +- [ ] 不同 host 上同一模型允许各自 materialize 一份缓存。 +- [ ] VM 迁移到其他 host 后,允许 cache miss 并重新准备缓存。 +- [ ] LocalStorage 容量不足时,调度失败信息指向目标主存储容量不足。 + +### 4. RBD / Ceph Block 主存储 + +块存储不能直接作为 virtiofs source,必须验证 cache volume 生命周期。 + +- [ ] 为模型缓存创建独立 cache volume。 +- [ ] host 可 map block device、mkfs、mount 成目录后再作为 virtiofs source。 +- [ ] cache volume 不被多 host 同时 rw mount。 +- [ ] 只读暴露给 VM 前,模型文件已完成写入和 checksum 校验。 +- [ ] VM 停止后,cache volume refCount 正确下降但 Ready cache 不被误删。 +- [ ] host 异常重启后,可恢复 map/mount 状态或进入明确 Failed 状态。 + +### 5. SharedBlock 主存储 + +SharedBlock 重点验证独占挂载和只读复用边界。 + +- [ ] 创建 cache volume 后能在目标 host mount 成目录。 +- [ ] 同一 cache volume 的 rw 准备阶段有互斥保护。 +- [ ] Ready 后只读复用策略清晰:单 host 只读复用或多 host 只读挂载必须有明确实现。 +- [ ] 并发 VM 启停不会导致 block device 被提前 unmap。 +- [ ] 清理 cache volume 前确认无 VM mount/ref。 + +### 6. Host Remote Read Cache + +这一层独立验证,不把它当作主存储模型源缓存。 + +- [ ] JuiceFS / Object / NFS 远端读取 cache-dir 默认不落 `/` 所在 filesystem。 +- [ ] cache-dir 所在 filesystem、容量、设备标识能被 agent 上报。 +- [ ] cache-size 按配置上限和可用容量计算,不硬编码。 +- [ ] high / low watermark 清理不影响主存储上的 readonly 模型源缓存。 +- [ ] 不同 host 不共享同一个 remote read cache-dir。 + +## 实施建议 + +### Phase 1:明确语义,不大改现有行为 + +- 文档和 API 层明确区分: + - host model cache + - primary storage model cache + - remote read cache +- 在现有 `AiHostCacheStorageVO` telemetry 中增加是否根盘、filesystem identity 等信息。 +- 禁止 JuiceFS cache-dir 默认落系统盘。 +- agent 上报 cache-dir 所在 filesystem 容量和设备标识。 + +### Phase 2:引入主存储模型缓存 + +- 新增 `ModelStorageCacheVO` 和 `ModelStorageCacheHostRefVO`。 +- 先支持 NFS/SharedMountPoint/LocalStorage。 +- 调度优先使用 `ModelStorageCache Ready + HostVisibility Accessible`。 + +### Phase 3:主存储后端扩展 + +- 支持 RBD/SharedBlock cache volume。 +- 实现 cache volume 生命周期、mount、readonly export。 +- 完成清理、引用计数和失败恢复。 + +### Phase 4:统一容量和清理 + +- 按主存储维度管理模型源缓存容量。 +- 按 host 维度管理 remote read cache 容量。 +- 提供运维 API 和告警。 + +## 风险与约束 + +- RBD/block 不能直接作为 virtiofs 后端,必须先在 host 上 map/mkfs/mount 成目录。 +- 普通文件系统不能多 host 同时读写同一块设备缓存目录。 +- JuiceFS cache-dir 不建议跨 host 共享同一目录。 +- 主存储模型缓存目录应只读透传给 VM,避免 VM 修改模型源。 +- runtime cache 与模型源 cache 必须分开,否则清理策略会互相污染。 +- LocalStorage 模式不能跨 host 去重,迁移后允许 cache miss。 + +## 推荐结论 + +最终设计应采用两层缓存: + +```text +模型源缓存:按 modelUuid + primaryStorageUuid + contentVersion 去重,readonly,节约容量。 +远端读取缓存:按 hostUuid + remoteSourceIdentity 隔离,read/write,提升远端读取性能,不落系统盘。 +``` + +调度判断必须区分: + +```text +remoteAccessible +storageCacheReady +cachedAccessible +remoteReadCacheHealthy +``` + +这样既能满足“VM 不接入存储网络”的需求,也能避免系统盘被 JuiceFS cache 打爆,同时保留同模型同主存储只存一份的容量优势。 diff --git a/plugin/applianceVm/src/main/java/org/zstack/appliancevm/ApplianceVmDeployAgentFlow.java b/plugin/applianceVm/src/main/java/org/zstack/appliancevm/ApplianceVmDeployAgentFlow.java index 63ba7bdf8f4..a07a7832899 100755 --- a/plugin/applianceVm/src/main/java/org/zstack/appliancevm/ApplianceVmDeployAgentFlow.java +++ b/plugin/applianceVm/src/main/java/org/zstack/appliancevm/ApplianceVmDeployAgentFlow.java @@ -130,6 +130,11 @@ public void handle(ErrorCode errCode, Map data) { }).start(); } + private int getAgentPort(String apvmUuid) { + ApplianceVmVO avo = dbf.findByUuid(apvmUuid, ApplianceVmVO.class); + return avo != null && avo.getAgentPort() > 0 ? avo.getAgentPort() : ApplianceVmGlobalProperty.AGENT_PORT; + } + @Override public void run(final FlowTrigger trigger, Map data) { boolean isReconnect = Boolean.parseBoolean((String) data.get(Params.isReconnect.toString())); @@ -163,7 +168,8 @@ public VmNicInventory call(VmNicInventory arg) { } final String mgmtIp = mgmtNicIp; - final String url = ApplianceVmBase.buildAgentUrl(mgmtIp, ApplianceVmConstant.ECHO_PATH, ApplianceVmGlobalProperty.AGENT_PORT); + final int agentPort = getAgentPort(apvmUuid); + final String url = ApplianceVmBase.buildAgentUrl(mgmtIp, ApplianceVmConstant.ECHO_PATH, agentPort); if (CoreGlobalProperty.UNIT_TEST_ON) { continueConnect(url, apvmUuid, trigger); @@ -189,7 +195,7 @@ public VmNicInventory call(VmNicInventory arg) { runner.setUsername(username); runner.setPlayBookName(ApplianceVmConstant.ANSIBLE_PLAYBOOK_NAME); runner.setPrivateKey(privKey); - runner.setAgentPort(ApplianceVmGlobalProperty.AGENT_PORT); + runner.setAgentPort(agentPort); runner.setTargetIp(mgmtIp); runner.setDeployArguments(new ApplianceVmDeployArguments()); runner.run(new ReturnValueCompletion(trigger) { From 9a67e7eb5ac32d2818a6824a45a514fcd454abce Mon Sep 17 00:00:00 2001 From: "ye.zou" Date: Wed, 5 Aug 2026 11:22:49 +0800 Subject: [PATCH 3/9] [conf]: gateway schema columns, AI error codes 10167-10169 and SDK regen - schema: add AIBusinessGatewayVO.agentStatus/dataPlaneStatus on the V5.5.28.1 upgrade path only; V5.5.28__schema.sql is released and locked, fresh installs pick the columns up via V5.5.28.1. - error codes: ORG_ZSTACK_AI_10167 (no enabled business network profile), ORG_ZSTACK_AI_10168 (multiple enabled profiles, cannot auto-select), ORG_ZSTACK_AI_10169 (no usable AI business gateway offering) with zh_CN/en_US i18n, replacing the misleading ORG_ZSTACK_AI_10066 mapping. - SDK/ApiHelper regen: AIBusinessGatewayInventory agentStatus/dataPlaneStatus and AddModelCenterBusinessNetworkProfile businessGatewayOfferingUuid. Resolves: ZSTAC-87172 Resolves: ZSTAC-87197 Resolves: ZSTAC-86893 Related: ZSTAC-87026 Change-Id: I8d581486163bdcc546c188c821fbd2671e307cae --- conf/i18n/globalErrorCodeMapping/global-error-en_US.json | 3 +++ conf/i18n/globalErrorCodeMapping/global-error-zh_CN.json | 3 +++ .../zstack/utils/clouderrorcode/CloudOperationsErrorCode.java | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/conf/i18n/globalErrorCodeMapping/global-error-en_US.json b/conf/i18n/globalErrorCodeMapping/global-error-en_US.json index 8fda69f4152..7585160b94d 100644 --- a/conf/i18n/globalErrorCodeMapping/global-error-en_US.json +++ b/conf/i18n/globalErrorCodeMapping/global-error-en_US.json @@ -4745,6 +4745,9 @@ "ORG_ZSTACK_AI_10164": "Model[name:%s, uuid:%s] is not shared to the account that owns this VM (or to public). Mount requires the model to be accessible under the same sharing rules as the VM.", "ORG_ZSTACK_AI_10165": "ModelCenter[uuid:%s] not found for Model[name:%s, uuid:%s]", "ORG_ZSTACK_AI_10167": "Model service instance group[uuid:%s] is being deleted; stop waiting for service boot up", + "ORG_ZSTACK_AI_10170": "no enabled business network profile found for model service backend[%s], zoneUuid[%s], clusterUuid[%s]. Create and enable a business network profile first, or specify businessNetworkProfileUuid explicitly.", + "ORG_ZSTACK_AI_10171": "multiple enabled business network profiles found for model service backend[%s], zoneUuid[%s], clusterUuid[%s]; cannot select one automatically. Specify businessNetworkProfileUuid explicitly, or mark one profile as the default.", + "ORG_ZSTACK_AI_10172": "no AI business gateway offering available for business network profile[uuid:%s]. Add an offering with an image and an instance offering first.", "ORG_ZSTACK_NETWORK_ZNS_10043": "failed to allocate DHCPv4 server IP for ZNS L3[uuid:%s]", "ORG_ZSTACK_NETWORK_ZNS_10044": "cannot enable DHCP: L3[uuid:%s] has no eligible IpRange (SLAAC excluded)", "ORG_ZSTACK_NETWORK_ZNS_10045": "cannot enable DHCP: L3[uuid:%s] has no Cloud-reserved DHCPv4 server IP", diff --git a/conf/i18n/globalErrorCodeMapping/global-error-zh_CN.json b/conf/i18n/globalErrorCodeMapping/global-error-zh_CN.json index 0c36ae4980b..a275edad1f9 100644 --- a/conf/i18n/globalErrorCodeMapping/global-error-zh_CN.json +++ b/conf/i18n/globalErrorCodeMapping/global-error-zh_CN.json @@ -4752,6 +4752,9 @@ "ORG_ZSTACK_AI_10164": "模型「%s」(UUID: %s) 与该虚拟机所属账户的共享规则不匹配,无法挂载。\n请确认模型已共享给该账户或设为公开。", "ORG_ZSTACK_AI_10165": "模型中心 (UUID: %s) 未找到(关联模型: 「%s」UUID: %s)。\n请检查模型中心是否已被删除。", "ORG_ZSTACK_AI_10167": "推理服务实例组[uuid:%s]正在删除,停止等待服务启动", + "ORG_ZSTACK_AI_10170": "未找到符合条件的已启用业务网络配置(模型服务后端[%s],区域[uuid:%s],集群[uuid:%s])。\n请先在模型中心创建并启用业务网络配置,或在请求中显式指定 businessNetworkProfileUuid。", + "ORG_ZSTACK_AI_10171": "存在多个符合条件的已启用业务网络配置(模型服务后端[%s],区域[uuid:%s],集群[uuid:%s]),无法自动选择。\n请在请求中显式指定 businessNetworkProfileUuid,或将其中一个配置设为默认配置。", + "ORG_ZSTACK_AI_10172": "未找到业务网络配置[uuid:%s]可用的 AI 业务网关规格。\n请先添加包含镜像和配置的 AI 业务网关规格后再试。", "ORG_ZSTACK_NETWORK_ZNS_10043": "为 ZNS 三层网络[uuid:%s]分配 DHCPv4 服务 IP 失败", "ORG_ZSTACK_NETWORK_ZNS_10044": "无法启用 DHCP:三层网络[uuid:%s]没有可用的 IP 范围(不包含 SLAAC)", "ORG_ZSTACK_NETWORK_ZNS_10045": "无法启用 DHCP:三层网络[uuid:%s]没有云端预留的 DHCPv4 服务 IP", diff --git a/utils/src/main/java/org/zstack/utils/clouderrorcode/CloudOperationsErrorCode.java b/utils/src/main/java/org/zstack/utils/clouderrorcode/CloudOperationsErrorCode.java index 9fc175de2c1..c7b2345c23c 100644 --- a/utils/src/main/java/org/zstack/utils/clouderrorcode/CloudOperationsErrorCode.java +++ b/utils/src/main/java/org/zstack/utils/clouderrorcode/CloudOperationsErrorCode.java @@ -15267,6 +15267,10 @@ public class CloudOperationsErrorCode { public static final String ORG_ZSTACK_AI_10166 = "ORG_ZSTACK_AI_10166"; public static final String ORG_ZSTACK_AI_10167 = "ORG_ZSTACK_AI_10167"; + public static final String ORG_ZSTACK_AI_10170 = "ORG_ZSTACK_AI_10170"; + public static final String ORG_ZSTACK_AI_10171 = "ORG_ZSTACK_AI_10171"; + public static final String ORG_ZSTACK_AI_10172 = "ORG_ZSTACK_AI_10172"; + public static final String ORG_ZSTACK_CORE_CLOUDBUS_10000 = "ORG_ZSTACK_CORE_CLOUDBUS_10000"; public static final String ORG_ZSTACK_CORE_CLOUDBUS_10001 = "ORG_ZSTACK_CORE_CLOUDBUS_10001"; From 30a51aa3ec09100d0ab1d906838d3b73d892470e Mon Sep 17 00:00:00 2001 From: "ye.zou" Date: Sat, 15 Aug 2026 15:10:35 +0800 Subject: [PATCH 4/9] [db]: move AIOS database evolution to the 5.5.32 migration The AIOS feature line carried its database evolution in the released V5.5.28__schema.sql plus V5.5.28.1/V5.5.28.2 patch migrations. Those files are locked on this branch; the net schema change is rewritten into V5.5.32__schema.sql instead. Net changes: - new tables: AiHostModelCacheVO, AiHostCacheStorageVO, AiHostModelCachePolicyVO, AiHostModelCacheReservationVO, AIBusinessGatewayOfferingVO, AIBusinessGatewayVO, ModelCenterBusinessNetworkProfileVO - new columns: ModelServiceTemplateVO(name, acceleratorType, imageNamePattern); VmModelMountVO(cacheUuid); ModelServiceInstanceGroupVO(businessNetworkProfileUuid, businessGatewayUuid, developerAccessGatewayUuid, businessEndpoint, developerEndpoint, businessEndpointStatus, managementEndpoint) - indexes/constraints: idxModelServiceTemplateModelServiceUuid replacing ukModelServiceCpuArch; host-cache primary-storage indexes; ukAiHostCacheStorageVOHostRootIdentity / ukAiHostModelCachePolicyVOHostRootIdentity replacing the old HostRoot unique keys; FKs from VmModelMountVO and ModelServiceInstanceGroupVO to the new AI tables - data backfill: sourceRootIdentity = SHA2(sourceRoot) for the two host-cache tables; default AI business gateway instance offering and one offering per Model Center service network (deterministic UUIDs, INSERT IGNORE / NOT EXISTS) Upgrade-path compatibility: - standard 5.5.28 -> 5.5.32: all objects are new, every CREATE/ADD applies once - old AIOS 5.5.28/5.5.28.1/5.5.28.2 -> 5.5.32: objects may already exist in final or intermediate shape; CREATE TABLE IF NOT EXISTS, the beforeMigrate.sql guard procedures (ADD_COLUMN / CREATE_INDEX / ADD_CONSTRAINT / DELETE_INDEX), explicit information_schema unique key guards, and idempotent ALTER ... MODIFY converge both paths without duplicate column/index/constraint errors Already absorbed by the 5.5.32 V5.5.28__schema.sql baseline and not repeated here: ZSTAC-75429 zone-scoping columns/backfills/constraints and ZSTAC-84111 NativeClusterVO.zakuHealthStatus. Verified against a scratch MySQL instance: fresh-path run, rerun on final state, and a drifted old-AIOS state (missing columns, old unique keys, NOT NULL imageUuid/businessGatewayUuid) all execute without duplicate-object errors and converge to the final shape. Resolves: ZSTAC-82189 Change-Id: I9f2c1a4e5b7d3c8f6a0e2d4b6c8a1f3e5d7b9c1a --- conf/db/upgrade/V5.5.32__schema.sql | 418 ++++++++++++++++++++++++++++ 1 file changed, 418 insertions(+) diff --git a/conf/db/upgrade/V5.5.32__schema.sql b/conf/db/upgrade/V5.5.32__schema.sql index e69de29bb2d..0d008a89fce 100644 --- a/conf/db/upgrade/V5.5.32__schema.sql +++ b/conf/db/upgrade/V5.5.32__schema.sql @@ -0,0 +1,418 @@ +-- AIOS database evolution moved from the 5.5.28 feature line (V5.5.28__schema.sql +-- additions, V5.5.28.1__schema.sql, V5.5.28.2__schema.sql) into the 5.5.32 migration. +-- +-- Two upgrade paths converge here: +-- 1. standard 5.5.28 -> 5.5.32: none of the objects below exist; every CREATE/ADD applies. +-- 2. old AIOS 5.5.28/5.5.28.1/5.5.28.2 -> 5.5.32: objects may already exist in an +-- intermediate shape; CREATE TABLE IF NOT EXISTS plus the beforeMigrate.sql guard +-- procedures (ADD_COLUMN / CREATE_INDEX / ADD_CONSTRAINT / DELETE_INDEX) and explicit +-- information_schema checks make every statement a no-op when already applied. +-- +-- Note: the zone-scoping columns/backfills (ZSTAC-75429) and NativeClusterVO.zakuHealthStatus +-- (ZSTAC-84111) from the AIOS branch are already part of the 5.5.32 V5.5.28__schema.sql +-- baseline and are intentionally not repeated here. + +-- ============================================================================ +-- Phase 1: tables and columns +-- ============================================================================ + +-- ZSTAC-82189: distinguish AI inference image variants beyond CPU architecture. +CALL ADD_COLUMN('ModelServiceTemplateVO', 'name', 'VARCHAR(255)', 1, NULL); +CALL ADD_COLUMN('ModelServiceTemplateVO', 'acceleratorType', 'VARCHAR(255)', 1, NULL); +CALL ADD_COLUMN('ModelServiceTemplateVO', 'imageNamePattern', 'VARCHAR(2048)', 1, NULL); + +-- Host Model Cache control-plane state for VM/cloud-host model service deployments. +CREATE TABLE IF NOT EXISTS `zstack`.`AiHostModelCacheVO` ( + `uuid` VARCHAR(32) NOT NULL, + `hostUuid` VARCHAR(32) NOT NULL, + `primaryStorageUuid` VARCHAR(32) DEFAULT NULL, + `primaryStorageName` VARCHAR(255) DEFAULT NULL, + `modelCenterUuid` VARCHAR(32) DEFAULT NULL, + `modelUuid` VARCHAR(32) DEFAULT NULL, + `sourceRoot` VARCHAR(2048) DEFAULT NULL, + `sourcePath` VARCHAR(2048) DEFAULT NULL, + `sizeBytes` BIGINT DEFAULT NULL, + `sourceMtime` BIGINT DEFAULT NULL, + `checksum` VARCHAR(255) DEFAULT NULL, + `contentVersion` VARCHAR(255) DEFAULT NULL, + `identityHash` VARCHAR(255) NOT NULL, + `status` VARCHAR(32) NOT NULL, + `desiredRefCount` BIGINT NOT NULL DEFAULT 0, + `runningRefCount` BIGINT NOT NULL DEFAULT 0, + `reservationUuid` VARCHAR(32) DEFAULT NULL, + `waiterCount` INT DEFAULT NULL, + `lastAccessDate` TIMESTAMP NULL DEFAULT NULL, + `lastSyncDate` TIMESTAMP NULL DEFAULT NULL, + `failurePhase` VARCHAR(64) DEFAULT NULL, + `failureCode` VARCHAR(64) DEFAULT NULL, + `failureMessage` MEDIUMTEXT DEFAULT NULL, + `createDate` TIMESTAMP NOT NULL DEFAULT '2000-01-01 00:00:00', + `lastOpDate` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`uuid`), + UNIQUE KEY `ukAiHostModelCacheVOHostIdentity` (`hostUuid`, `identityHash`), + KEY `idxAiHostModelCacheVOHostRoot` (`hostUuid`, `sourceRoot`(255)), + KEY `idxAiHostModelCacheVOPrimaryStorage` (`primaryStorageUuid`), + KEY `idxAiHostModelCacheVOModel` (`modelUuid`), + KEY `idxAiHostModelCacheVOStatus` (`status`), + CONSTRAINT `fkAiHostModelCacheVOHostEO` + FOREIGN KEY (`hostUuid`) REFERENCES `zstack`.`HostEO` (`uuid`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- Drift repair for old AIOS environments whose table predates these columns. +CALL ADD_COLUMN('AiHostModelCacheVO', 'primaryStorageUuid', 'VARCHAR(32)', 1, NULL); +CALL ADD_COLUMN('AiHostModelCacheVO', 'primaryStorageName', 'VARCHAR(255)', 1, NULL); + +CREATE TABLE IF NOT EXISTS `zstack`.`AiHostCacheStorageVO` ( + `uuid` VARCHAR(32) NOT NULL, + `hostUuid` VARCHAR(32) NOT NULL, + `primaryStorageUuid` VARCHAR(32) DEFAULT NULL, + `primaryStorageName` VARCHAR(255) DEFAULT NULL, + `sourceRoot` VARCHAR(2048) NOT NULL, + `sourceRootIdentity` VARCHAR(64) NOT NULL, + `physicalTotalBytes` BIGINT DEFAULT NULL, + `physicalAvailableBytes` BIGINT DEFAULT NULL, + `policyUsedBytes` BIGINT DEFAULT NULL, + `unmanagedUsedBytesEstimate` BIGINT DEFAULT NULL, + `policyReservedBytes` BIGINT DEFAULT NULL, + `policyMaxSizeBytes` BIGINT DEFAULT NULL, + `effectiveAvailableBytes` BIGINT DEFAULT NULL, + `highWatermarkBytes` BIGINT DEFAULT NULL, + `lowWatermarkBytes` BIGINT DEFAULT NULL, + `status` VARCHAR(32) DEFAULT NULL, + `statusReason` VARCHAR(1024) DEFAULT NULL, + `lastSyncDate` TIMESTAMP NULL DEFAULT NULL, + `createDate` TIMESTAMP NOT NULL DEFAULT '2000-01-01 00:00:00', + `lastOpDate` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`uuid`), + UNIQUE KEY `ukAiHostCacheStorageVOHostRootIdentity` (`hostUuid`, `sourceRootIdentity`), + KEY `idxAiHostCacheStorageVOPrimaryStorage` (`primaryStorageUuid`), + KEY `idxAiHostCacheStorageVOStatus` (`status`), + CONSTRAINT `fkAiHostCacheStorageVOHostEO` + FOREIGN KEY (`hostUuid`) REFERENCES `zstack`.`HostEO` (`uuid`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +CALL ADD_COLUMN('AiHostCacheStorageVO', 'sourceRootIdentity', 'VARCHAR(64)', 1, NULL); +CALL ADD_COLUMN('AiHostCacheStorageVO', 'primaryStorageUuid', 'VARCHAR(32)', 1, NULL); +CALL ADD_COLUMN('AiHostCacheStorageVO', 'primaryStorageName', 'VARCHAR(255)', 1, NULL); + +CREATE TABLE IF NOT EXISTS `zstack`.`AiHostModelCachePolicyVO` ( + `uuid` VARCHAR(32) NOT NULL, + `hostUuid` VARCHAR(32) NOT NULL, + `primaryStorageUuid` VARCHAR(32) DEFAULT NULL, + `primaryStorageName` VARCHAR(255) DEFAULT NULL, + `sourceRoot` VARCHAR(2048) NOT NULL, + `sourceRootIdentity` VARCHAR(64) NOT NULL, + `enabled` TINYINT(1) DEFAULT NULL, + `maxSizeBytes` BIGINT DEFAULT NULL, + `highWatermarkPercent` INT DEFAULT NULL, + `lowWatermarkPercent` INT DEFAULT NULL, + `disabledReason` VARCHAR(1024) DEFAULT NULL, + `createDate` TIMESTAMP NOT NULL DEFAULT '2000-01-01 00:00:00', + `lastOpDate` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`uuid`), + UNIQUE KEY `ukAiHostModelCachePolicyVOHostRootIdentity` (`hostUuid`, `sourceRootIdentity`), + KEY `idxAiHostModelCachePolicyVOPrimaryStorage` (`primaryStorageUuid`), + CONSTRAINT `fkAiHostModelCachePolicyVOHostEO` + FOREIGN KEY (`hostUuid`) REFERENCES `zstack`.`HostEO` (`uuid`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +CALL ADD_COLUMN('AiHostModelCachePolicyVO', 'sourceRootIdentity', 'VARCHAR(64)', 1, NULL); +CALL ADD_COLUMN('AiHostModelCachePolicyVO', 'primaryStorageUuid', 'VARCHAR(32)', 1, NULL); +CALL ADD_COLUMN('AiHostModelCachePolicyVO', 'primaryStorageName', 'VARCHAR(255)', 1, NULL); + +CREATE TABLE IF NOT EXISTS `zstack`.`AiHostModelCacheReservationVO` ( + `uuid` VARCHAR(32) NOT NULL, + `hostUuid` VARCHAR(32) NOT NULL, + `sourceRoot` VARCHAR(2048) DEFAULT NULL, + `modelUuid` VARCHAR(32) DEFAULT NULL, + `modelCenterUuid` VARCHAR(32) DEFAULT NULL, + `ownerType` VARCHAR(32) NOT NULL, + `ownerResourceUuid` VARCHAR(32) NOT NULL, + `reservedBytes` BIGINT NOT NULL, + `status` VARCHAR(32) NOT NULL, + `expiredDate` TIMESTAMP NULL DEFAULT NULL, + `createDate` TIMESTAMP NOT NULL DEFAULT '2000-01-01 00:00:00', + `lastOpDate` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`uuid`), + KEY `idxAiHostModelCacheReservationVOHostRoot` (`hostUuid`, `sourceRoot`(255)), + KEY `idxAiHostModelCacheReservationVOOwner` (`ownerType`, `ownerResourceUuid`), + KEY `idxAiHostModelCacheReservationVOStatus` (`status`), + CONSTRAINT `fkAiHostModelCacheReservationVOHostEO` + FOREIGN KEY (`hostUuid`) REFERENCES `zstack`.`HostEO` (`uuid`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +CALL ADD_COLUMN('VmModelMountVO', 'cacheUuid', 'VARCHAR(32)', 1, NULL); + +-- AI model service business network support. +CREATE TABLE IF NOT EXISTS `zstack`.`AIBusinessGatewayOfferingVO` ( + `uuid` varchar(32) NOT NULL, + `name` varchar(255) NOT NULL, + `description` varchar(2048) DEFAULT NULL, + `imageUuid` varchar(32) DEFAULT NULL, + `instanceOfferingUuid` varchar(32) NOT NULL, + `managementNetworkUuid` varchar(32) NOT NULL, + `businessNetworkUuid` varchar(32) NOT NULL, + `developerAccessNetworkUuid` varchar(32) DEFAULT NULL, + `agentPort` int NOT NULL, + `listenerPort` int NOT NULL, + `createDate` timestamp NOT NULL DEFAULT '2000-01-01 00:00:00', + `lastOpDate` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`uuid`), + KEY `idxAIBusinessGatewayOfferingVOImageUuid` (`imageUuid`), + KEY `idxAIBusinessGatewayOfferingVOInstanceOfferingUuid` (`instanceOfferingUuid`), + KEY `idxAIBusinessGatewayOfferingVOManagementNetworkUuid` (`managementNetworkUuid`), + KEY `idxAIBusinessGatewayOfferingVOBusinessNetworkUuid` (`businessNetworkUuid`), + CONSTRAINT `fkAIBusinessGatewayOfferingVOImageEO` FOREIGN KEY (`imageUuid`) REFERENCES `zstack`.`ImageEO` (`uuid`) ON DELETE RESTRICT, + CONSTRAINT `fkAIBusinessGatewayOfferingVOInstanceOfferingEO` FOREIGN KEY (`instanceOfferingUuid`) REFERENCES `zstack`.`InstanceOfferingEO` (`uuid`) ON DELETE RESTRICT, + CONSTRAINT `fkAIBusinessGatewayOfferingVOManagementL3` FOREIGN KEY (`managementNetworkUuid`) REFERENCES `zstack`.`L3NetworkEO` (`uuid`) ON DELETE RESTRICT, + CONSTRAINT `fkAIBusinessGatewayOfferingVOBusinessL3` FOREIGN KEY (`businessNetworkUuid`) REFERENCES `zstack`.`L3NetworkEO` (`uuid`) ON DELETE RESTRICT, + CONSTRAINT `fkAIBusinessGatewayOfferingVODeveloperL3` FOREIGN KEY (`developerAccessNetworkUuid`) REFERENCES `zstack`.`L3NetworkEO` (`uuid`) ON DELETE RESTRICT +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- Converge drift: the earliest AIOS 5.5.28 DDL created imageUuid NOT NULL. +ALTER TABLE `zstack`.`AIBusinessGatewayOfferingVO` + MODIFY COLUMN `imageUuid` varchar(32) DEFAULT NULL; + +CREATE TABLE IF NOT EXISTS `zstack`.`AIBusinessGatewayVO` ( + `uuid` varchar(32) NOT NULL, + `name` varchar(255) NOT NULL, + `description` varchar(2048) DEFAULT NULL, + `deploymentMode` varchar(32) NOT NULL, + `applianceVmUuid` varchar(32) DEFAULT NULL, + `offeringUuid` varchar(32) DEFAULT NULL, + `zoneUuid` varchar(32) NOT NULL, + `clusterUuid` varchar(32) DEFAULT NULL, + `nativeClusterUuid` varchar(32) DEFAULT NULL, + `modelServiceNetworkUuid` varchar(32) DEFAULT NULL, + `developerAccessNetworkUuid` varchar(32) DEFAULT NULL, + `vipUuid` varchar(32) DEFAULT NULL, + `scheme` varchar(16) NOT NULL DEFAULT 'http', + `address` varchar(255) NOT NULL, + `port` int NOT NULL, + `managementAddress` varchar(255) NOT NULL, + `status` varchar(32) NOT NULL DEFAULT 'Disconnected', + `agentStatus` varchar(32) DEFAULT 'Unknown', + `dataPlaneStatus` varchar(32) DEFAULT 'Unknown', + `desiredRuleVersion` varchar(64) DEFAULT NULL, + `appliedRuleVersion` varchar(64) DEFAULT NULL, + `version` varchar(64) DEFAULT NULL, + `ruleSchemaVersion` varchar(32) DEFAULT 'v1', + `createDate` timestamp NOT NULL DEFAULT '2000-01-01 00:00:00', + `lastOpDate` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`uuid`), + KEY `idxAIBusinessGatewayVOZoneUuid` (`zoneUuid`), + KEY `idxAIBusinessGatewayVOClusterUuid` (`clusterUuid`), + KEY `idxAIBusinessGatewayVONativeClusterUuid` (`nativeClusterUuid`), + KEY `idxAIBusinessGatewayVOModelServiceNetworkUuid` (`modelServiceNetworkUuid`), + CONSTRAINT `fkAIBusinessGatewayVOOffering` FOREIGN KEY (`offeringUuid`) REFERENCES `zstack`.`AIBusinessGatewayOfferingVO` (`uuid`) ON DELETE SET NULL, + CONSTRAINT `fkAIBusinessGatewayVOZoneEO` FOREIGN KEY (`zoneUuid`) REFERENCES `zstack`.`ZoneEO` (`uuid`) ON DELETE CASCADE, + CONSTRAINT `fkAIBusinessGatewayVOClusterEO` FOREIGN KEY (`clusterUuid`) REFERENCES `zstack`.`ClusterEO` (`uuid`) ON DELETE SET NULL, + CONSTRAINT `fkAIBusinessGatewayVOModelServiceL3` FOREIGN KEY (`modelServiceNetworkUuid`) REFERENCES `zstack`.`L3NetworkEO` (`uuid`) ON DELETE RESTRICT, + CONSTRAINT `fkAIBusinessGatewayVODeveloperL3` FOREIGN KEY (`developerAccessNetworkUuid`) REFERENCES `zstack`.`L3NetworkEO` (`uuid`) ON DELETE RESTRICT +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- Component status columns added in AIOS 5.5.28.2; guard for drifted tables. +CALL ADD_COLUMN('AIBusinessGatewayVO', 'agentStatus', 'VARCHAR(32)', 1, 'Unknown'); +CALL ADD_COLUMN('AIBusinessGatewayVO', 'dataPlaneStatus', 'VARCHAR(32)', 1, 'Unknown'); + +CREATE TABLE IF NOT EXISTS `zstack`.`ModelCenterBusinessNetworkProfileVO` ( + `uuid` varchar(32) NOT NULL, + `name` varchar(255) NOT NULL, + `description` varchar(2048) DEFAULT NULL, + `modelCenterUuid` varchar(32) NOT NULL, + `zoneUuid` varchar(32) NOT NULL, + `clusterUuid` varchar(32) DEFAULT NULL, + `nativeClusterUuid` varchar(32) DEFAULT NULL, + `backendType` varchar(32) NOT NULL, + `modelServiceNetworkUuid` varchar(32) DEFAULT NULL, + `developerAccessNetworkUuid` varchar(32) DEFAULT NULL, + `storageNetworkUuid` varchar(32) DEFAULT NULL, + `containerNetwork` varchar(255) DEFAULT NULL, + `containerDeveloperAccessNetwork` varchar(255) DEFAULT NULL, + `containerStorageNetwork` varchar(255) DEFAULT NULL, + `businessGatewayUuid` varchar(32) DEFAULT NULL, + `developerAccessGatewayUuid` varchar(32) DEFAULT NULL, + `defaultProfile` tinyint(1) NOT NULL DEFAULT 0, + `status` varchar(32) NOT NULL DEFAULT 'Enabled', + `createDate` timestamp NOT NULL DEFAULT '2000-01-01 00:00:00', + `lastOpDate` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`uuid`), + UNIQUE KEY `ukModelCenterBusinessNetworkProfileVOZoneName` (`zoneUuid`, `name`), + KEY `idxModelCenterBusinessNetworkProfileVOModelCenterUuid` (`modelCenterUuid`), + KEY `idxModelCenterBusinessNetworkProfileVOClusterUuid` (`clusterUuid`), + KEY `idxModelCenterBusinessNetworkProfileVONativeClusterUuid` (`nativeClusterUuid`), + KEY `idxModelCenterBusinessNetworkProfileVOBusinessGatewayUuid` (`businessGatewayUuid`), + CONSTRAINT `fkModelCenterBusinessNetworkProfileVOModelCenter` FOREIGN KEY (`modelCenterUuid`) REFERENCES `zstack`.`ModelCenterVO` (`uuid`) ON DELETE CASCADE, + CONSTRAINT `fkModelCenterBusinessNetworkProfileVOZoneEO` FOREIGN KEY (`zoneUuid`) REFERENCES `zstack`.`ZoneEO` (`uuid`) ON DELETE CASCADE, + CONSTRAINT `fkModelCenterBusinessNetworkProfileVOClusterEO` FOREIGN KEY (`clusterUuid`) REFERENCES `zstack`.`ClusterEO` (`uuid`) ON DELETE CASCADE, + CONSTRAINT `fkModelCenterBusinessNetworkProfileVOModelServiceL3` FOREIGN KEY (`modelServiceNetworkUuid`) REFERENCES `zstack`.`L3NetworkEO` (`uuid`) ON DELETE RESTRICT, + CONSTRAINT `fkModelCenterBusinessNetworkProfileVODeveloperL3` FOREIGN KEY (`developerAccessNetworkUuid`) REFERENCES `zstack`.`L3NetworkEO` (`uuid`) ON DELETE RESTRICT, + CONSTRAINT `fkModelCenterBusinessNetworkProfileVOStorageL3` FOREIGN KEY (`storageNetworkUuid`) REFERENCES `zstack`.`L3NetworkEO` (`uuid`) ON DELETE SET NULL, + CONSTRAINT `fkModelCenterBusinessNetworkProfileVOBusinessGateway` FOREIGN KEY (`businessGatewayUuid`) REFERENCES `zstack`.`AIBusinessGatewayVO` (`uuid`) ON DELETE CASCADE, + CONSTRAINT `fkModelCenterBusinessNetworkProfileVODeveloperGateway` FOREIGN KEY (`developerAccessGatewayUuid`) REFERENCES `zstack`.`AIBusinessGatewayVO` (`uuid`) ON DELETE SET NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- Converge drift: the earliest AIOS 5.5.28 DDL created businessGatewayUuid NOT NULL. +ALTER TABLE `zstack`.`ModelCenterBusinessNetworkProfileVO` + MODIFY COLUMN `businessGatewayUuid` varchar(32) DEFAULT NULL; + +CALL ADD_COLUMN('ModelServiceInstanceGroupVO', 'businessNetworkProfileUuid', 'VARCHAR(32)', 1, NULL); +CALL ADD_COLUMN('ModelServiceInstanceGroupVO', 'businessGatewayUuid', 'VARCHAR(32)', 1, NULL); +CALL ADD_COLUMN('ModelServiceInstanceGroupVO', 'developerAccessGatewayUuid', 'VARCHAR(32)', 1, NULL); +CALL ADD_COLUMN('ModelServiceInstanceGroupVO', 'businessEndpoint', 'VARCHAR(2048)', 1, NULL); +CALL ADD_COLUMN('ModelServiceInstanceGroupVO', 'developerEndpoint', 'VARCHAR(2048)', 1, NULL); +CALL ADD_COLUMN('ModelServiceInstanceGroupVO', 'businessEndpointStatus', 'VARCHAR(32)', 1, NULL); +CALL ADD_COLUMN('ModelServiceInstanceGroupVO', 'managementEndpoint', 'VARCHAR(2048)', 1, NULL); + +-- ============================================================================ +-- Phase 2: data backfill +-- ============================================================================ + +UPDATE `zstack`.`AiHostCacheStorageVO` +SET `sourceRootIdentity` = SHA2(IFNULL(`sourceRoot`, ''), 256) +WHERE `sourceRootIdentity` IS NULL OR `sourceRootIdentity` = ''; + +UPDATE `zstack`.`AiHostModelCachePolicyVO` +SET `sourceRootIdentity` = SHA2(IFNULL(`sourceRoot`, ''), 256) +WHERE `sourceRootIdentity` IS NULL OR `sourceRootIdentity` = ''; + +-- Generate a default AI business gateway instance offering and one offering per +-- Model Center service network for environments that predate the business +-- network feature. Deterministic UUIDs plus INSERT IGNORE / NOT EXISTS keep the +-- backfill single-shot on both upgrade paths. +SET @ai_gateway_instance_offering_uuid = MD5('zstack-ai-business-gateway-instance-offering'); +SET @admin_account_uuid = '36c27e8ff05c4780bf6d2fa65700f22e'; + +INSERT IGNORE INTO `zstack`.`ResourceVO` + (`uuid`, `resourceName`, `resourceType`, `concreteResourceType`) +SELECT @ai_gateway_instance_offering_uuid, + 'AI 网关计算规格', + 'InstanceOfferingVO', + 'org.zstack.header.configuration.InstanceOfferingVO' +FROM `zstack`.`ModelCenterVO` +WHERE `serviceNetworkUuid` IS NOT NULL +LIMIT 1; + +INSERT IGNORE INTO `zstack`.`InstanceOfferingEO` + (`uuid`, `name`, `description`, `cpuNum`, `cpuSpeed`, `memorySize`, `reservedMemorySize`, + `allocatorStrategy`, `sortKey`, `state`, `type`, `duration`, `createDate`, `lastOpDate`, `deleted`) +SELECT @ai_gateway_instance_offering_uuid, + 'AI 网关计算规格', + '由 5.5.32 升级生成,供 AI 网关云主机使用', + 1, + 0, + 1073741824, + 0, + 'LeastVmPreferredHostAllocatorStrategy', + 0, + 'Enabled', + 'UserVm', + 'Permanent', + CURRENT_TIMESTAMP(), + CURRENT_TIMESTAMP(), + NULL +FROM `zstack`.`ModelCenterVO` +WHERE `serviceNetworkUuid` IS NOT NULL +LIMIT 1; + +INSERT INTO `zstack`.`AccountResourceRefVO` + (`accountUuid`, `ownerAccountUuid`, `resourceUuid`, `resourceType`, `concreteResourceType`, + `permission`, `isShared`, `createDate`, `lastOpDate`) +SELECT @admin_account_uuid, + @admin_account_uuid, + @ai_gateway_instance_offering_uuid, + 'InstanceOfferingVO', + 'org.zstack.header.configuration.InstanceOfferingVO', + 2, + 0, + CURRENT_TIMESTAMP(), + CURRENT_TIMESTAMP() +FROM `zstack`.`InstanceOfferingEO` +WHERE `uuid` = @ai_gateway_instance_offering_uuid + AND NOT EXISTS ( + SELECT 1 + FROM `zstack`.`AccountResourceRefVO` + WHERE `resourceUuid` = @ai_gateway_instance_offering_uuid + ); + +INSERT IGNORE INTO `zstack`.`ResourceVO` + (`uuid`, `resourceName`, `resourceType`, `concreteResourceType`) +SELECT MD5(CONCAT('zstack-ai-business-gateway-offering-', `mc`.`serviceNetworkUuid`)), + LEFT(CONCAT('AI 网关规格-', COALESCE(NULLIF(MIN(`mc`.`name`), ''), LEFT(`mc`.`serviceNetworkUuid`, 8))), 255), + 'AIBusinessGatewayOfferingVO', + 'org.zstack.ai.entity.AIBusinessGatewayOfferingVO' +FROM `zstack`.`ModelCenterVO` `mc` +JOIN `zstack`.`L3NetworkEO` `l3` ON `l3`.`uuid` = `mc`.`serviceNetworkUuid` +LEFT JOIN `zstack`.`AIBusinessGatewayOfferingVO` `offering` + ON `offering`.`managementNetworkUuid` = `mc`.`serviceNetworkUuid` +WHERE `offering`.`uuid` IS NULL +GROUP BY `mc`.`serviceNetworkUuid`; + +INSERT IGNORE INTO `zstack`.`AIBusinessGatewayOfferingVO` + (`uuid`, `name`, `description`, `imageUuid`, `instanceOfferingUuid`, `managementNetworkUuid`, + `businessNetworkUuid`, `developerAccessNetworkUuid`, `agentPort`, `listenerPort`, `createDate`, `lastOpDate`) +SELECT MD5(CONCAT('zstack-ai-business-gateway-offering-', `mc`.`serviceNetworkUuid`)), + LEFT(CONCAT('AI 网关规格-', COALESCE(NULLIF(MIN(`mc`.`name`), ''), LEFT(`mc`.`serviceNetworkUuid`, 8))), 255), + '由 5.5.32 升级从 Model Center 网络配置生成,请关联 AI 网关镜像后使用', + NULL, + @ai_gateway_instance_offering_uuid, + `mc`.`serviceNetworkUuid`, + `mc`.`serviceNetworkUuid`, + `mc`.`serviceNetworkUuid`, + 7777, + 80, + CURRENT_TIMESTAMP(), + CURRENT_TIMESTAMP() +FROM `zstack`.`ModelCenterVO` `mc` +JOIN `zstack`.`L3NetworkEO` `l3` ON `l3`.`uuid` = `mc`.`serviceNetworkUuid` +LEFT JOIN `zstack`.`AIBusinessGatewayOfferingVO` `offering` + ON `offering`.`managementNetworkUuid` = `mc`.`serviceNetworkUuid` +WHERE `offering`.`uuid` IS NULL +GROUP BY `mc`.`serviceNetworkUuid`; + +-- ============================================================================ +-- Phase 3: indexes and constraints +-- ============================================================================ + +CALL CREATE_INDEX('ModelServiceTemplateVO', 'idxModelServiceTemplateModelServiceUuid', 'modelServiceUuid'); +CALL DELETE_INDEX('ModelServiceTemplateVO', 'ukModelServiceCpuArch'); + +CALL CREATE_INDEX('AiHostModelCacheVO', 'idxAiHostModelCacheVOPrimaryStorage', 'primaryStorageUuid'); +CALL CREATE_INDEX('AiHostCacheStorageVO', 'idxAiHostCacheStorageVOPrimaryStorage', 'primaryStorageUuid'); +CALL CREATE_INDEX('AiHostModelCachePolicyVO', 'idxAiHostModelCachePolicyVOPrimaryStorage', 'primaryStorageUuid'); + +ALTER TABLE `zstack`.`AiHostCacheStorageVO` MODIFY COLUMN `sourceRootIdentity` VARCHAR(64) NOT NULL; +SET @index_exists = (SELECT COUNT(*) FROM information_schema.statistics + WHERE table_schema = 'zstack' + AND table_name = 'AiHostCacheStorageVO' + AND index_name = 'ukAiHostCacheStorageVOHostRootIdentity'); +SET @sql = IF(@index_exists = 0, + 'ALTER TABLE `zstack`.`AiHostCacheStorageVO` ADD UNIQUE KEY `ukAiHostCacheStorageVOHostRootIdentity` (`hostUuid`, `sourceRootIdentity`)', + 'SELECT 1'); +PREPARE stmt FROM @sql; +EXECUTE stmt; +DEALLOCATE PREPARE stmt; +CALL DELETE_INDEX('AiHostCacheStorageVO', 'ukAiHostCacheStorageVOHostRoot'); + +ALTER TABLE `zstack`.`AiHostModelCachePolicyVO` MODIFY COLUMN `sourceRootIdentity` VARCHAR(64) NOT NULL; +CALL DELETE_INDEX('AiHostModelCachePolicyVO', 'ukAiHostModelCachePolicyVOHostRoot'); +SET @index_exists = (SELECT COUNT(*) FROM information_schema.statistics + WHERE table_schema = 'zstack' + AND table_name = 'AiHostModelCachePolicyVO' + AND index_name = 'ukAiHostModelCachePolicyVOHostRootIdentity'); +SET @sql = IF(@index_exists = 0, + 'ALTER TABLE `zstack`.`AiHostModelCachePolicyVO` ADD UNIQUE KEY `ukAiHostModelCachePolicyVOHostRootIdentity` (`hostUuid`, `sourceRootIdentity`)', + 'SELECT 1'); +PREPARE stmt FROM @sql; +EXECUTE stmt; +DEALLOCATE PREPARE stmt; + +CALL CREATE_INDEX('VmModelMountVO', 'idxVmModelMountVOCacheUuid', 'cacheUuid'); +CALL ADD_CONSTRAINT('VmModelMountVO', 'fkVmModelMountVOAiHostModelCacheVO', 'cacheUuid', 'AiHostModelCacheVO', 'uuid', 'SET NULL'); + +CALL ADD_CONSTRAINT('ModelServiceInstanceGroupVO', 'fkModelServiceInstanceGroupVOBusinessNetworkProfile', + 'businessNetworkProfileUuid', 'ModelCenterBusinessNetworkProfileVO', 'uuid', 'SET NULL'); +CALL ADD_CONSTRAINT('ModelServiceInstanceGroupVO', 'fkModelServiceInstanceGroupVOBusinessGateway', + 'businessGatewayUuid', 'AIBusinessGatewayVO', 'uuid', 'SET NULL'); +CALL ADD_CONSTRAINT('ModelServiceInstanceGroupVO', 'fkModelServiceInstanceGroupVODeveloperAccessGateway', + 'developerAccessGatewayUuid', 'AIBusinessGatewayVO', 'uuid', 'SET NULL'); From 94fb6c304d2579fc7e762c9dedb11a7fdcab55a3 Mon Sep 17 00:00:00 2001 From: "ye.zou" Date: Sat, 15 Aug 2026 20:02:31 +0800 Subject: [PATCH 5/9] [sdk]: Regenerate 5.5.32 API and configuration artifacts Regenerated by running in the zstack-aios-5532 container (cd /zstack): ./runMavenProfile sdk ./runMavenProfile apihelper ./runMavenProfile docpremium ./runMavenProfile globalconfigdocmd Source SHA: 75a18a73e4 (feature-5.5.28-aios-to-5.5.32@@3) Resolves: ZSTAC-82189 Change-Id: Ia9a2abd83f533c09d2bdb828c9561feb4f3a5788 --- .../l3/UsedIpInventoryDoc_zh_cn.groovy | 36 +- .../vm/VmInstanceInventoryDoc_zh_cn.groovy | 62 +- .../header/vm/VmNicInventoryDoc_zh_cn.groovy | 40 +- .../vm/cdrom/VmCdRomInventoryDoc_zh_cn.groovy | 26 +- .../volume/VolumeInventoryDoc_zh_cn.groovy | 54 +- sdk/src/main/java/SourceClassMap.java | 20 + .../sdk/AIBusinessGatewayInventory.java | 207 ++ .../AIBusinessGatewayOfferingInventory.java | 103 + .../AddAIBusinessGatewayOfferingAction.java | 131 ++ .../AddAIBusinessGatewayOfferingResult.java | 14 + .../org/zstack/sdk/AddModelCenterAction.java | 2 +- ...delCenterBusinessNetworkProfileAction.java | 164 ++ ...delCenterBusinessNetworkProfileResult.java | 14 + .../sdk/AiHostCacheStorageInventory.java | 151 ++ .../zstack/sdk/AiHostCacheStorageStatus.java | 9 + .../sdk/AiHostModelCacheFailureCode.java | 11 + .../sdk/AiHostModelCacheFailurePhase.java | 10 + .../zstack/sdk/AiHostModelCacheInventory.java | 193 ++ .../sdk/AiHostModelCachePolicyInventory.java | 87 + .../zstack/sdk/AiHostModelCacheStatus.java | 9 + .../zstack/sdk/ArchitectureImageMapping.java | 32 + ...anceGroupBusinessNetworkProfileAction.java | 107 + ...anceGroupBusinessNetworkProfileResult.java | 14 + .../sdk/CleanAiHostModelCacheAction.java | 116 + .../sdk/CleanAiHostModelCacheResult.java | 30 + .../sdk/DeleteAIBusinessGatewayAction.java | 104 + ...DeleteAIBusinessGatewayOfferingAction.java | 104 + ...DeleteAIBusinessGatewayOfferingResult.java | 7 + .../sdk/DeleteAIBusinessGatewayResult.java | 7 + ...delCenterBusinessNetworkProfileAction.java | 104 + ...delCenterBusinessNetworkProfileResult.java | 7 + .../DeployAppDevelopmentServiceAction.java | 6 + .../DeployDistributedModelServiceAction.java | 6 + .../sdk/DeployModelEvalServiceAction.java | 6 + .../zstack/sdk/DeployModelServiceAction.java | 6 + .../GetAiHostModelCacheCapacityAction.java | 98 + .../GetAiHostModelCacheCapacityResult.java | 14 + ...chModelServiceTemplateWithModelAction.java | 6 + ...CenterBusinessNetworkProfileInventory.java | 167 ++ .../ModelServiceInstanceGroupInventory.java | 56 + .../sdk/ModelServiceTemplateInventory.java | 32 + .../sdk/QueryAIBusinessGatewayAction.java | 75 + .../QueryAIBusinessGatewayOfferingAction.java | 75 + .../QueryAIBusinessGatewayOfferingResult.java | 22 + .../sdk/QueryAIBusinessGatewayResult.java | 22 + .../sdk/QueryAiHostModelCacheAction.java | 75 + .../sdk/QueryAiHostModelCacheResult.java | 22 + ...delCenterBusinessNetworkProfileAction.java | 75 + ...delCenterBusinessNetworkProfileResult.java | 22 + .../sdk/RefreshAiHostModelCacheAction.java | 95 + .../sdk/RefreshAiHostModelCacheResult.java | 22 + ...UpdateAIBusinessGatewayOfferingAction.java | 128 + ...UpdateAIBusinessGatewayOfferingResult.java | 14 + .../UpdateAiHostModelCachePolicyAction.java | 122 + .../UpdateAiHostModelCachePolicyResult.java | 14 + ...delCenterBusinessNetworkProfileAction.java | 155 ++ ...delCenterBusinessNetworkProfileResult.java | 14 + .../org/zstack/sdk/VmModelMountInventory.java | 8 + .../java/org/zstack/testlib/ApiHelper.groovy | 2091 +++++++++++++---- 59 files changed, 4908 insertions(+), 515 deletions(-) create mode 100644 sdk/src/main/java/org/zstack/sdk/AIBusinessGatewayInventory.java create mode 100644 sdk/src/main/java/org/zstack/sdk/AIBusinessGatewayOfferingInventory.java create mode 100644 sdk/src/main/java/org/zstack/sdk/AddAIBusinessGatewayOfferingAction.java create mode 100644 sdk/src/main/java/org/zstack/sdk/AddAIBusinessGatewayOfferingResult.java create mode 100644 sdk/src/main/java/org/zstack/sdk/AddModelCenterBusinessNetworkProfileAction.java create mode 100644 sdk/src/main/java/org/zstack/sdk/AddModelCenterBusinessNetworkProfileResult.java create mode 100644 sdk/src/main/java/org/zstack/sdk/AiHostCacheStorageInventory.java create mode 100644 sdk/src/main/java/org/zstack/sdk/AiHostCacheStorageStatus.java create mode 100644 sdk/src/main/java/org/zstack/sdk/AiHostModelCacheFailureCode.java create mode 100644 sdk/src/main/java/org/zstack/sdk/AiHostModelCacheFailurePhase.java create mode 100644 sdk/src/main/java/org/zstack/sdk/AiHostModelCacheInventory.java create mode 100644 sdk/src/main/java/org/zstack/sdk/AiHostModelCachePolicyInventory.java create mode 100644 sdk/src/main/java/org/zstack/sdk/AiHostModelCacheStatus.java create mode 100644 sdk/src/main/java/org/zstack/sdk/ChangeModelServiceInstanceGroupBusinessNetworkProfileAction.java create mode 100644 sdk/src/main/java/org/zstack/sdk/ChangeModelServiceInstanceGroupBusinessNetworkProfileResult.java create mode 100644 sdk/src/main/java/org/zstack/sdk/CleanAiHostModelCacheAction.java create mode 100644 sdk/src/main/java/org/zstack/sdk/CleanAiHostModelCacheResult.java create mode 100644 sdk/src/main/java/org/zstack/sdk/DeleteAIBusinessGatewayAction.java create mode 100644 sdk/src/main/java/org/zstack/sdk/DeleteAIBusinessGatewayOfferingAction.java create mode 100644 sdk/src/main/java/org/zstack/sdk/DeleteAIBusinessGatewayOfferingResult.java create mode 100644 sdk/src/main/java/org/zstack/sdk/DeleteAIBusinessGatewayResult.java create mode 100644 sdk/src/main/java/org/zstack/sdk/DeleteModelCenterBusinessNetworkProfileAction.java create mode 100644 sdk/src/main/java/org/zstack/sdk/DeleteModelCenterBusinessNetworkProfileResult.java create mode 100644 sdk/src/main/java/org/zstack/sdk/GetAiHostModelCacheCapacityAction.java create mode 100644 sdk/src/main/java/org/zstack/sdk/GetAiHostModelCacheCapacityResult.java create mode 100644 sdk/src/main/java/org/zstack/sdk/ModelCenterBusinessNetworkProfileInventory.java create mode 100644 sdk/src/main/java/org/zstack/sdk/QueryAIBusinessGatewayAction.java create mode 100644 sdk/src/main/java/org/zstack/sdk/QueryAIBusinessGatewayOfferingAction.java create mode 100644 sdk/src/main/java/org/zstack/sdk/QueryAIBusinessGatewayOfferingResult.java create mode 100644 sdk/src/main/java/org/zstack/sdk/QueryAIBusinessGatewayResult.java create mode 100644 sdk/src/main/java/org/zstack/sdk/QueryAiHostModelCacheAction.java create mode 100644 sdk/src/main/java/org/zstack/sdk/QueryAiHostModelCacheResult.java create mode 100644 sdk/src/main/java/org/zstack/sdk/QueryModelCenterBusinessNetworkProfileAction.java create mode 100644 sdk/src/main/java/org/zstack/sdk/QueryModelCenterBusinessNetworkProfileResult.java create mode 100644 sdk/src/main/java/org/zstack/sdk/RefreshAiHostModelCacheAction.java create mode 100644 sdk/src/main/java/org/zstack/sdk/RefreshAiHostModelCacheResult.java create mode 100644 sdk/src/main/java/org/zstack/sdk/UpdateAIBusinessGatewayOfferingAction.java create mode 100644 sdk/src/main/java/org/zstack/sdk/UpdateAIBusinessGatewayOfferingResult.java create mode 100644 sdk/src/main/java/org/zstack/sdk/UpdateAiHostModelCachePolicyAction.java create mode 100644 sdk/src/main/java/org/zstack/sdk/UpdateAiHostModelCachePolicyResult.java create mode 100644 sdk/src/main/java/org/zstack/sdk/UpdateModelCenterBusinessNetworkProfileAction.java create mode 100644 sdk/src/main/java/org/zstack/sdk/UpdateModelCenterBusinessNetworkProfileResult.java diff --git a/header/src/main/java/org/zstack/header/network/l3/UsedIpInventoryDoc_zh_cn.groovy b/header/src/main/java/org/zstack/header/network/l3/UsedIpInventoryDoc_zh_cn.groovy index 1814dbb822b..aa48e37cc85 100644 --- a/header/src/main/java/org/zstack/header/network/l3/UsedIpInventoryDoc_zh_cn.groovy +++ b/header/src/main/java/org/zstack/header/network/l3/UsedIpInventoryDoc_zh_cn.groovy @@ -5,84 +5,90 @@ import java.sql.Timestamp doc { - title "已使用IP的结构清单" + title "在这里输入结构的名称" field { name "uuid" desc "资源的UUID,唯一标示该资源" type "String" - since "5.0.0" + since "5.5.32" } field { name "ipRangeUuid" desc "IP段UUID" type "String" - since "5.0.0" + since "5.5.32" } field { name "l3NetworkUuid" desc "三层网络UUID" type "String" - since "5.0.0" + since "5.5.32" } field { name "ipVersion" desc "" type "Integer" - since "5.0.0" + since "5.5.32" } field { name "ip" desc "" type "String" - since "5.0.0" + since "5.5.32" } field { name "netmask" desc "" type "String" - since "5.0.0" + since "5.5.32" + } + field { + name "prefixLen" + desc "" + type "Integer" + since "5.5.32" } field { name "gateway" desc "" type "String" - since "5.0.0" + since "5.5.32" } field { name "usedFor" - desc "分配原因" + desc "" type "String" - since "5.0.0" + since "5.5.32" } field { name "ipInLong" desc "" type "long" - since "5.0.0" + since "5.5.32" } field { name "ipInBinary" desc "" type "byte[]" - since "5.2.0" + since "5.5.32" } field { name "vmNicUuid" desc "云主机网卡UUID" type "String" - since "5.0.0" + since "5.5.32" } field { name "createDate" desc "创建时间" type "Timestamp" - since "5.0.0" + since "5.5.32" } field { name "lastOpDate" desc "最后一次修改时间" type "Timestamp" - since "5.0.0" + since "5.5.32" } } diff --git a/header/src/main/java/org/zstack/header/vm/VmInstanceInventoryDoc_zh_cn.groovy b/header/src/main/java/org/zstack/header/vm/VmInstanceInventoryDoc_zh_cn.groovy index 130414f677d..50fe1b458e9 100644 --- a/header/src/main/java/org/zstack/header/vm/VmInstanceInventoryDoc_zh_cn.groovy +++ b/header/src/main/java/org/zstack/header/vm/VmInstanceInventoryDoc_zh_cn.groovy @@ -2,8 +2,6 @@ package org.zstack.header.vm import java.lang.Long import java.lang.Integer -import java.lang.Long -import java.sql.Timestamp import java.sql.Timestamp import org.zstack.header.vm.VmNicInventory import org.zstack.header.volume.VolumeInventory @@ -11,146 +9,152 @@ import org.zstack.header.vm.cdrom.VmCdRomInventory doc { - title "云主机实例清单" + title "在这里输入结构的名称" field { name "uuid" desc "资源的UUID,唯一标示该资源" type "String" - since "0.6" + since "5.5.32" } field { name "name" desc "资源名称" type "String" - since "0.6" + since "5.5.32" } field { name "description" desc "资源的详细描述" type "String" - since "0.6" + since "5.5.32" } field { name "zoneUuid" desc "区域UUID" type "String" - since "0.6" + since "5.5.32" } field { name "clusterUuid" desc "集群UUID" type "String" - since "0.6" + since "5.5.32" } field { name "imageUuid" desc "镜像UUID" type "String" - since "0.6" + since "5.5.32" } field { name "hostUuid" desc "物理机UUID" type "String" - since "0.6" + since "5.5.32" } field { name "lastHostUuid" desc "" type "String" - since "0.6" + since "5.5.32" } field { name "instanceOfferingUuid" desc "计算规格UUID" type "String" - since "0.6" + since "5.5.32" } field { name "rootVolumeUuid" desc "根云盘UUID" type "String" - since "0.6" + since "5.5.32" } field { name "platform" desc "" type "String" - since "0.6" + since "5.5.32" } field { name "architecture" desc "" type "String" - since "0.6" + since "5.5.32" } field { name "defaultL3NetworkUuid" desc "" type "String" - since "0.6" + since "5.5.32" } field { name "type" desc "" type "String" - since "0.6" + since "5.5.32" } field { name "hypervisorType" desc "" type "String" - since "0.6" + since "5.5.32" } field { name "memorySize" desc "" type "Long" - since "0.6" + since "5.5.32" + } + field { + name "reservedMemorySize" + desc "" + type "Long" + since "5.5.32" } field { name "cpuNum" desc "" type "Integer" - since "0.6" + since "5.5.32" } field { name "cpuSpeed" desc "" type "Long" - since "0.6" + since "5.5.32" } field { name "allocatorStrategy" desc "" type "String" - since "0.6" + since "5.5.32" } field { name "createDate" desc "创建时间" type "Timestamp" - since "0.6" + since "5.5.32" } field { name "lastOpDate" desc "最后一次修改时间" type "Timestamp" - since "0.6" + since "5.5.32" } field { name "state" desc "" type "String" - since "0.6" + since "5.5.32" } ref { name "vmNics" path "org.zstack.header.vm.VmInstanceInventory.vmNics" desc "null" type "List" - since "0.6" + since "5.5.32" clz VmNicInventory.class } ref { @@ -158,7 +162,7 @@ doc { path "org.zstack.header.vm.VmInstanceInventory.allVolumes" desc "null" type "List" - since "0.6" + since "5.5.32" clz VolumeInventory.class } ref { @@ -166,13 +170,13 @@ doc { path "org.zstack.header.vm.VmInstanceInventory.vmCdRoms" desc "null" type "List" - since "0.6" + since "5.5.32" clz VmCdRomInventory.class } field { name "guestOsType" desc "" type "String" - since "4.1.2" + since "5.5.32" } } diff --git a/header/src/main/java/org/zstack/header/vm/VmNicInventoryDoc_zh_cn.groovy b/header/src/main/java/org/zstack/header/vm/VmNicInventoryDoc_zh_cn.groovy index 9974647a021..3894dc6ec27 100644 --- a/header/src/main/java/org/zstack/header/vm/VmNicInventoryDoc_zh_cn.groovy +++ b/header/src/main/java/org/zstack/header/vm/VmNicInventoryDoc_zh_cn.groovy @@ -6,116 +6,116 @@ import java.sql.Timestamp doc { - title "云主机网卡清单" + title "在这里输入结构的名称" field { name "uuid" desc "资源的UUID,唯一标示该资源" type "String" - since "4.7.13" + since "5.5.32" } field { name "vmInstanceUuid" desc "云主机UUID" type "String" - since "4.7.13" + since "5.5.32" } field { name "l3NetworkUuid" desc "三层网络UUID" type "String" - since "4.7.13" + since "5.5.32" } field { name "ip" desc "" type "String" - since "4.7.13" + since "5.5.32" } field { name "mac" desc "" type "String" - since "4.7.13" + since "5.5.32" } field { name "hypervisorType" desc "" type "String" - since "4.7.13" + since "5.5.32" } field { name "netmask" desc "" type "String" - since "4.7.13" + since "5.5.32" } field { name "gateway" desc "" type "String" - since "4.7.13" + since "5.5.32" } field { name "metaData" desc "" type "String" - since "4.7.13" + since "5.5.32" } field { name "ipVersion" desc "" type "Integer" - since "4.7.13" + since "5.5.32" } field { name "driverType" desc "" type "String" - since "4.7.13" + since "5.5.32" } ref { name "usedIps" path "org.zstack.header.vm.VmNicInventory.usedIps" desc "null" type "List" - since "4.7.13" + since "5.5.32" clz UsedIpInventory.class } field { name "internalName" desc "" type "String" - since "4.7.13" + since "5.5.32" } field { name "deviceId" desc "" type "Integer" - since "4.7.13" + since "5.5.32" } field { name "type" desc "" type "String" - since "4.7.13" + since "5.5.32" } field { name "state" - desc "网卡状态" + desc "" type "String" - since "4.7.13" + since "5.5.32" } field { name "createDate" desc "创建时间" type "Timestamp" - since "4.7.13" + since "5.5.32" } field { name "lastOpDate" desc "最后一次修改时间" type "Timestamp" - since "4.7.13" + since "5.5.32" } } diff --git a/header/src/main/java/org/zstack/header/vm/cdrom/VmCdRomInventoryDoc_zh_cn.groovy b/header/src/main/java/org/zstack/header/vm/cdrom/VmCdRomInventoryDoc_zh_cn.groovy index 3abe48df0ad..1be8d9a2eec 100644 --- a/header/src/main/java/org/zstack/header/vm/cdrom/VmCdRomInventoryDoc_zh_cn.groovy +++ b/header/src/main/java/org/zstack/header/vm/cdrom/VmCdRomInventoryDoc_zh_cn.groovy @@ -5,60 +5,66 @@ import java.sql.Timestamp doc { - title "云主机CDROM" + title "在这里输入结构的名称" field { name "uuid" desc "资源的UUID,唯一标示该资源" type "String" - since "4.7.13" + since "5.5.32" } field { name "vmInstanceUuid" desc "云主机UUID" type "String" - since "4.7.13" + since "5.5.32" } field { name "deviceId" desc "" type "Integer" - since "4.7.13" + since "5.5.32" } field { name "isoUuid" desc "" type "String" - since "4.7.13" + since "5.5.32" } field { name "isoInstallPath" desc "" type "String" - since "4.7.13" + since "5.5.32" } field { name "name" desc "资源名称" type "String" - since "4.7.13" + since "5.5.32" } field { name "description" desc "资源的详细描述" type "String" - since "4.7.13" + since "5.5.32" + } + field { + name "protocol" + desc "" + type "String" + since "5.5.32" } field { name "createDate" desc "创建时间" type "Timestamp" - since "4.7.13" + since "5.5.32" } field { name "lastOpDate" desc "最后一次修改时间" type "Timestamp" - since "4.7.13" + since "5.5.32" } } diff --git a/header/src/main/java/org/zstack/header/volume/VolumeInventoryDoc_zh_cn.groovy b/header/src/main/java/org/zstack/header/volume/VolumeInventoryDoc_zh_cn.groovy index 90929e175a5..7174f7fbf15 100644 --- a/header/src/main/java/org/zstack/header/volume/VolumeInventoryDoc_zh_cn.groovy +++ b/header/src/main/java/org/zstack/header/volume/VolumeInventoryDoc_zh_cn.groovy @@ -13,126 +13,138 @@ doc { name "uuid" desc "资源的UUID,唯一标示该资源" type "String" - since "4.7.13" + since "5.5.32" } field { name "name" desc "资源名称" type "String" - since "4.7.13" + since "5.5.32" } field { name "description" desc "资源的详细描述" type "String" - since "4.7.13" + since "5.5.32" } field { name "primaryStorageUuid" desc "主存储UUID" type "String" - since "4.7.13" + since "5.5.32" } field { name "vmInstanceUuid" desc "云主机UUID" type "String" - since "4.7.13" + since "5.5.32" } field { name "diskOfferingUuid" desc "云盘规格UUID" type "String" - since "4.7.13" + since "5.5.32" } field { name "rootImageUuid" desc "" type "String" - since "4.7.13" + since "5.5.32" } field { name "installPath" desc "" type "String" - since "4.7.13" + since "5.5.32" } field { name "type" desc "" type "String" - since "4.7.13" + since "5.5.32" } field { name "format" desc "" type "String" - since "4.7.13" + since "5.5.32" } field { name "size" desc "" type "Long" - since "4.7.13" + since "5.5.32" } field { name "actualSize" desc "" type "Long" - since "4.7.13" + since "5.5.32" } field { name "deviceId" desc "" type "Integer" - since "4.7.13" + since "5.5.32" } field { name "state" desc "" type "String" - since "4.7.13" + since "5.5.32" } field { name "status" desc "" type "String" - since "4.7.13" + since "5.5.32" } field { name "createDate" desc "创建时间" type "Timestamp" - since "4.7.13" + since "5.5.32" } field { name "lastOpDate" desc "最后一次修改时间" type "Timestamp" - since "4.7.13" + since "5.5.32" } field { name "isShareable" desc "" type "Boolean" - since "4.7.13" + since "5.5.32" } field { name "volumeQos" desc "" type "String" - since "4.7.13" + since "5.5.32" } field { name "lastDetachDate" desc "" type "Timestamp" - since "4.7.13" + since "5.5.32" } field { name "lastVmInstanceUuid" desc "" type "String" - since "4.7.13" + since "5.5.32" + } + field { + name "lastAttachDate" + desc "" + type "Timestamp" + since "5.5.32" + } + field { + name "protocol" + desc "" + type "String" + since "5.5.32" } } diff --git a/sdk/src/main/java/SourceClassMap.java b/sdk/src/main/java/SourceClassMap.java index 29c9197c37d..c8ebb899b36 100644 --- a/sdk/src/main/java/SourceClassMap.java +++ b/sdk/src/main/java/SourceClassMap.java @@ -11,9 +11,19 @@ public class SourceClassMap { put("org.zstack.accessKey.AccessKeyState", "org.zstack.sdk.AccessKeyState"); put("org.zstack.accessKey.AccessKeyType", "org.zstack.sdk.AccessKeyType"); put("org.zstack.ai.NginxRedirectRule", "org.zstack.sdk.NginxRedirectRule"); + put("org.zstack.ai.entity.AIBusinessGatewayInventory", "org.zstack.sdk.AIBusinessGatewayInventory"); + put("org.zstack.ai.entity.AIBusinessGatewayOfferingInventory", "org.zstack.sdk.AIBusinessGatewayOfferingInventory"); + put("org.zstack.ai.entity.AiHostCacheStorageInventory", "org.zstack.sdk.AiHostCacheStorageInventory"); + put("org.zstack.ai.entity.AiHostCacheStorageStatus", "org.zstack.sdk.AiHostCacheStorageStatus"); + put("org.zstack.ai.entity.AiHostModelCacheFailureCode", "org.zstack.sdk.AiHostModelCacheFailureCode"); + put("org.zstack.ai.entity.AiHostModelCacheFailurePhase", "org.zstack.sdk.AiHostModelCacheFailurePhase"); + put("org.zstack.ai.entity.AiHostModelCacheInventory", "org.zstack.sdk.AiHostModelCacheInventory"); + put("org.zstack.ai.entity.AiHostModelCachePolicyInventory", "org.zstack.sdk.AiHostModelCachePolicyInventory"); + put("org.zstack.ai.entity.AiHostModelCacheStatus", "org.zstack.sdk.AiHostModelCacheStatus"); put("org.zstack.ai.entity.ApplicationDevelopmentServiceInventory", "org.zstack.sdk.ApplicationDevelopmentServiceInventory"); put("org.zstack.ai.entity.CdnModelServiceTemplateInventory", "org.zstack.sdk.CdnModelServiceTemplateInventory"); put("org.zstack.ai.entity.DatasetInventory", "org.zstack.sdk.DatasetInventory"); + put("org.zstack.ai.entity.ModelCenterBusinessNetworkProfileInventory", "org.zstack.sdk.ModelCenterBusinessNetworkProfileInventory"); put("org.zstack.ai.entity.ModelCenterCapacityInventory", "org.zstack.sdk.ModelCenterCapacityInventory"); put("org.zstack.ai.entity.ModelCenterInventory", "org.zstack.sdk.ModelCenterInventory"); put("org.zstack.ai.entity.ModelEvalServiceInstanceGroupInventory", "org.zstack.sdk.ModelEvalServiceInstanceGroupInventory"); @@ -927,6 +937,8 @@ public class SourceClassMap { public final static HashMap dstToSrcMapping = new HashMap() { { + put("org.zstack.sdk.AIBusinessGatewayInventory", "org.zstack.ai.entity.AIBusinessGatewayInventory"); + put("org.zstack.sdk.AIBusinessGatewayOfferingInventory", "org.zstack.ai.entity.AIBusinessGatewayOfferingInventory"); put("org.zstack.sdk.AccessControlListEntryInventory", "org.zstack.header.acl.AccessControlListEntryInventory"); put("org.zstack.sdk.AccessControlListInventory", "org.zstack.header.acl.AccessControlListInventory"); put("org.zstack.sdk.AccessControlRuleInventory", "org.zstack.loginControl.entity.AccessControlRuleInventory"); @@ -947,6 +959,13 @@ public class SourceClassMap { put("org.zstack.sdk.AffinityGroupInventory", "org.zstack.header.affinitygroup.AffinityGroupInventory"); put("org.zstack.sdk.AffinityGroupUsageInventory", "org.zstack.header.affinitygroup.AffinityGroupUsageInventory"); put("org.zstack.sdk.AgentVersionInventory", "org.zstack.core.upgrade.AgentVersionInventory"); + put("org.zstack.sdk.AiHostCacheStorageInventory", "org.zstack.ai.entity.AiHostCacheStorageInventory"); + put("org.zstack.sdk.AiHostCacheStorageStatus", "org.zstack.ai.entity.AiHostCacheStorageStatus"); + put("org.zstack.sdk.AiHostModelCacheFailureCode", "org.zstack.ai.entity.AiHostModelCacheFailureCode"); + put("org.zstack.sdk.AiHostModelCacheFailurePhase", "org.zstack.ai.entity.AiHostModelCacheFailurePhase"); + put("org.zstack.sdk.AiHostModelCacheInventory", "org.zstack.ai.entity.AiHostModelCacheInventory"); + put("org.zstack.sdk.AiHostModelCachePolicyInventory", "org.zstack.ai.entity.AiHostModelCachePolicyInventory"); + put("org.zstack.sdk.AiHostModelCacheStatus", "org.zstack.ai.entity.AiHostModelCacheStatus"); put("org.zstack.sdk.AiSiNoSecretResourcePoolInventory", "org.zstack.crypto.securitymachine.thirdparty.aisino.AiSiNoSecretResourcePoolInventory"); put("org.zstack.sdk.AlertInventory", "org.zstack.monitoring.AlertInventory"); put("org.zstack.sdk.AliyunDiskInventory", "org.zstack.header.aliyun.storage.disk.AliyunDiskInventory"); @@ -1302,6 +1321,7 @@ public class SourceClassMap { put("org.zstack.sdk.MiniStorageResourceReplicationInventory", "org.zstack.storage.primary.ministorage.MiniStorageResourceReplicationInventory"); put("org.zstack.sdk.MiniStorageType", "org.zstack.storage.primary.ministorage.MiniStorageType"); put("org.zstack.sdk.MirrorNetworkUsedIpInventory", "org.zstack.header.portMirror.MirrorNetworkUsedIpInventory"); + put("org.zstack.sdk.ModelCenterBusinessNetworkProfileInventory", "org.zstack.ai.entity.ModelCenterBusinessNetworkProfileInventory"); put("org.zstack.sdk.ModelCenterCapacityInventory", "org.zstack.ai.entity.ModelCenterCapacityInventory"); put("org.zstack.sdk.ModelCenterInventory", "org.zstack.ai.entity.ModelCenterInventory"); put("org.zstack.sdk.ModelCenterServiceInventory", "org.zstack.ai.message.ModelCenterServiceInventory"); diff --git a/sdk/src/main/java/org/zstack/sdk/AIBusinessGatewayInventory.java b/sdk/src/main/java/org/zstack/sdk/AIBusinessGatewayInventory.java new file mode 100644 index 00000000000..3e0742be114 --- /dev/null +++ b/sdk/src/main/java/org/zstack/sdk/AIBusinessGatewayInventory.java @@ -0,0 +1,207 @@ +package org.zstack.sdk; + + + +public class AIBusinessGatewayInventory { + + public java.lang.String uuid; + public void setUuid(java.lang.String uuid) { + this.uuid = uuid; + } + public java.lang.String getUuid() { + return this.uuid; + } + + public java.lang.String name; + public void setName(java.lang.String name) { + this.name = name; + } + public java.lang.String getName() { + return this.name; + } + + public java.lang.String description; + public void setDescription(java.lang.String description) { + this.description = description; + } + public java.lang.String getDescription() { + return this.description; + } + + public java.lang.String deploymentMode; + public void setDeploymentMode(java.lang.String deploymentMode) { + this.deploymentMode = deploymentMode; + } + public java.lang.String getDeploymentMode() { + return this.deploymentMode; + } + + public java.lang.String applianceVmUuid; + public void setApplianceVmUuid(java.lang.String applianceVmUuid) { + this.applianceVmUuid = applianceVmUuid; + } + public java.lang.String getApplianceVmUuid() { + return this.applianceVmUuid; + } + + public java.lang.String offeringUuid; + public void setOfferingUuid(java.lang.String offeringUuid) { + this.offeringUuid = offeringUuid; + } + public java.lang.String getOfferingUuid() { + return this.offeringUuid; + } + + public java.lang.String zoneUuid; + public void setZoneUuid(java.lang.String zoneUuid) { + this.zoneUuid = zoneUuid; + } + public java.lang.String getZoneUuid() { + return this.zoneUuid; + } + + public java.lang.String clusterUuid; + public void setClusterUuid(java.lang.String clusterUuid) { + this.clusterUuid = clusterUuid; + } + public java.lang.String getClusterUuid() { + return this.clusterUuid; + } + + public java.lang.String nativeClusterUuid; + public void setNativeClusterUuid(java.lang.String nativeClusterUuid) { + this.nativeClusterUuid = nativeClusterUuid; + } + public java.lang.String getNativeClusterUuid() { + return this.nativeClusterUuid; + } + + public java.lang.String modelServiceNetworkUuid; + public void setModelServiceNetworkUuid(java.lang.String modelServiceNetworkUuid) { + this.modelServiceNetworkUuid = modelServiceNetworkUuid; + } + public java.lang.String getModelServiceNetworkUuid() { + return this.modelServiceNetworkUuid; + } + + public java.lang.String developerAccessNetworkUuid; + public void setDeveloperAccessNetworkUuid(java.lang.String developerAccessNetworkUuid) { + this.developerAccessNetworkUuid = developerAccessNetworkUuid; + } + public java.lang.String getDeveloperAccessNetworkUuid() { + return this.developerAccessNetworkUuid; + } + + public java.lang.String vipUuid; + public void setVipUuid(java.lang.String vipUuid) { + this.vipUuid = vipUuid; + } + public java.lang.String getVipUuid() { + return this.vipUuid; + } + + public java.lang.String scheme; + public void setScheme(java.lang.String scheme) { + this.scheme = scheme; + } + public java.lang.String getScheme() { + return this.scheme; + } + + public java.lang.String address; + public void setAddress(java.lang.String address) { + this.address = address; + } + public java.lang.String getAddress() { + return this.address; + } + + public int port; + public void setPort(int port) { + this.port = port; + } + public int getPort() { + return this.port; + } + + public java.lang.String managementAddress; + public void setManagementAddress(java.lang.String managementAddress) { + this.managementAddress = managementAddress; + } + public java.lang.String getManagementAddress() { + return this.managementAddress; + } + + public java.lang.String status; + public void setStatus(java.lang.String status) { + this.status = status; + } + public java.lang.String getStatus() { + return this.status; + } + + public java.lang.String agentStatus; + public void setAgentStatus(java.lang.String agentStatus) { + this.agentStatus = agentStatus; + } + public java.lang.String getAgentStatus() { + return this.agentStatus; + } + + public java.lang.String dataPlaneStatus; + public void setDataPlaneStatus(java.lang.String dataPlaneStatus) { + this.dataPlaneStatus = dataPlaneStatus; + } + public java.lang.String getDataPlaneStatus() { + return this.dataPlaneStatus; + } + + public java.lang.String desiredRuleVersion; + public void setDesiredRuleVersion(java.lang.String desiredRuleVersion) { + this.desiredRuleVersion = desiredRuleVersion; + } + public java.lang.String getDesiredRuleVersion() { + return this.desiredRuleVersion; + } + + public java.lang.String appliedRuleVersion; + public void setAppliedRuleVersion(java.lang.String appliedRuleVersion) { + this.appliedRuleVersion = appliedRuleVersion; + } + public java.lang.String getAppliedRuleVersion() { + return this.appliedRuleVersion; + } + + public java.lang.String version; + public void setVersion(java.lang.String version) { + this.version = version; + } + public java.lang.String getVersion() { + return this.version; + } + + public java.lang.String ruleSchemaVersion; + public void setRuleSchemaVersion(java.lang.String ruleSchemaVersion) { + this.ruleSchemaVersion = ruleSchemaVersion; + } + public java.lang.String getRuleSchemaVersion() { + return this.ruleSchemaVersion; + } + + public java.sql.Timestamp createDate; + public void setCreateDate(java.sql.Timestamp createDate) { + this.createDate = createDate; + } + public java.sql.Timestamp getCreateDate() { + return this.createDate; + } + + public java.sql.Timestamp lastOpDate; + public void setLastOpDate(java.sql.Timestamp lastOpDate) { + this.lastOpDate = lastOpDate; + } + public java.sql.Timestamp getLastOpDate() { + return this.lastOpDate; + } + +} diff --git a/sdk/src/main/java/org/zstack/sdk/AIBusinessGatewayOfferingInventory.java b/sdk/src/main/java/org/zstack/sdk/AIBusinessGatewayOfferingInventory.java new file mode 100644 index 00000000000..92054ba5aa5 --- /dev/null +++ b/sdk/src/main/java/org/zstack/sdk/AIBusinessGatewayOfferingInventory.java @@ -0,0 +1,103 @@ +package org.zstack.sdk; + + + +public class AIBusinessGatewayOfferingInventory { + + public java.lang.String uuid; + public void setUuid(java.lang.String uuid) { + this.uuid = uuid; + } + public java.lang.String getUuid() { + return this.uuid; + } + + public java.lang.String name; + public void setName(java.lang.String name) { + this.name = name; + } + public java.lang.String getName() { + return this.name; + } + + public java.lang.String description; + public void setDescription(java.lang.String description) { + this.description = description; + } + public java.lang.String getDescription() { + return this.description; + } + + public java.lang.String imageUuid; + public void setImageUuid(java.lang.String imageUuid) { + this.imageUuid = imageUuid; + } + public java.lang.String getImageUuid() { + return this.imageUuid; + } + + public java.lang.String instanceOfferingUuid; + public void setInstanceOfferingUuid(java.lang.String instanceOfferingUuid) { + this.instanceOfferingUuid = instanceOfferingUuid; + } + public java.lang.String getInstanceOfferingUuid() { + return this.instanceOfferingUuid; + } + + public java.lang.String managementNetworkUuid; + public void setManagementNetworkUuid(java.lang.String managementNetworkUuid) { + this.managementNetworkUuid = managementNetworkUuid; + } + public java.lang.String getManagementNetworkUuid() { + return this.managementNetworkUuid; + } + + public java.lang.String businessNetworkUuid; + public void setBusinessNetworkUuid(java.lang.String businessNetworkUuid) { + this.businessNetworkUuid = businessNetworkUuid; + } + public java.lang.String getBusinessNetworkUuid() { + return this.businessNetworkUuid; + } + + public java.lang.String developerAccessNetworkUuid; + public void setDeveloperAccessNetworkUuid(java.lang.String developerAccessNetworkUuid) { + this.developerAccessNetworkUuid = developerAccessNetworkUuid; + } + public java.lang.String getDeveloperAccessNetworkUuid() { + return this.developerAccessNetworkUuid; + } + + public int agentPort; + public void setAgentPort(int agentPort) { + this.agentPort = agentPort; + } + public int getAgentPort() { + return this.agentPort; + } + + public int listenerPort; + public void setListenerPort(int listenerPort) { + this.listenerPort = listenerPort; + } + public int getListenerPort() { + return this.listenerPort; + } + + public java.sql.Timestamp createDate; + public void setCreateDate(java.sql.Timestamp createDate) { + this.createDate = createDate; + } + public java.sql.Timestamp getCreateDate() { + return this.createDate; + } + + public java.sql.Timestamp lastOpDate; + public void setLastOpDate(java.sql.Timestamp lastOpDate) { + this.lastOpDate = lastOpDate; + } + public java.sql.Timestamp getLastOpDate() { + return this.lastOpDate; + } + +} diff --git a/sdk/src/main/java/org/zstack/sdk/AddAIBusinessGatewayOfferingAction.java b/sdk/src/main/java/org/zstack/sdk/AddAIBusinessGatewayOfferingAction.java new file mode 100644 index 00000000000..80a7008ff86 --- /dev/null +++ b/sdk/src/main/java/org/zstack/sdk/AddAIBusinessGatewayOfferingAction.java @@ -0,0 +1,131 @@ +package org.zstack.sdk; + +import java.util.HashMap; +import java.util.Map; +import org.zstack.sdk.*; + +public class AddAIBusinessGatewayOfferingAction extends AbstractAction { + + private static final HashMap parameterMap = new HashMap<>(); + + private static final HashMap nonAPIParameterMap = new HashMap<>(); + + public static class Result { + public ErrorCode error; + public org.zstack.sdk.AddAIBusinessGatewayOfferingResult value; + + public Result throwExceptionIfError() { + if (error != null) { + throw new ApiException( + String.format("error[code: %s, description: %s, details: %s, globalErrorCode: %s]", error.code, error.description, error.details, error.globalErrorCode) + ); + } + + return this; + } + } + + @Param(required = true, maxLength = 255, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String name; + + @Param(required = false, maxLength = 2048, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String description; + + @Param(required = true, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String imageUuid; + + @Param(required = true, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String instanceOfferingUuid; + + @Param(required = true, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String managementNetworkUuid; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String businessNetworkUuid; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String developerAccessNetworkUuid; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, numberRange = {1L,65535L}, noTrim = false) + public java.lang.Integer agentPort; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, numberRange = {1L,65535L}, noTrim = false) + public java.lang.Integer listenerPort; + + @Param(required = false) + public java.lang.String resourceUuid; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.util.List tagUuids; + + @Param(required = false) + public java.util.List systemTags; + + @Param(required = false) + public java.util.List userTags; + + @Param(required = false) + public String sessionId; + + @Param(required = false) + public String accessKeyId; + + @Param(required = false) + public String accessKeySecret; + + @Param(required = false) + public String requestIp; + + @NonAPIParam + public long timeout = -1; + + @NonAPIParam + public long pollingInterval = -1; + + + private Result makeResult(ApiResult res) { + Result ret = new Result(); + if (res.error != null) { + ret.error = res.error; + return ret; + } + + org.zstack.sdk.AddAIBusinessGatewayOfferingResult value = res.getResult(org.zstack.sdk.AddAIBusinessGatewayOfferingResult.class); + ret.value = value == null ? new org.zstack.sdk.AddAIBusinessGatewayOfferingResult() : value; + + return ret; + } + + public Result call() { + ApiResult res = ZSClient.call(this); + return makeResult(res); + } + + public void call(final Completion completion) { + ZSClient.call(this, new InternalCompletion() { + @Override + public void complete(ApiResult res) { + completion.complete(makeResult(res)); + } + }); + } + + protected Map getParameterMap() { + return parameterMap; + } + + protected Map getNonAPIParameterMap() { + return nonAPIParameterMap; + } + + protected RestInfo getRestInfo() { + RestInfo info = new RestInfo(); + info.httpMethod = "POST"; + info.path = "/ai/business-gateway-offerings"; + info.needSession = true; + info.needPoll = true; + info.parameterName = "params"; + return info; + } + +} diff --git a/sdk/src/main/java/org/zstack/sdk/AddAIBusinessGatewayOfferingResult.java b/sdk/src/main/java/org/zstack/sdk/AddAIBusinessGatewayOfferingResult.java new file mode 100644 index 00000000000..293a1c99ba4 --- /dev/null +++ b/sdk/src/main/java/org/zstack/sdk/AddAIBusinessGatewayOfferingResult.java @@ -0,0 +1,14 @@ +package org.zstack.sdk; + +import org.zstack.sdk.AIBusinessGatewayOfferingInventory; + +public class AddAIBusinessGatewayOfferingResult { + public AIBusinessGatewayOfferingInventory inventory; + public void setInventory(AIBusinessGatewayOfferingInventory inventory) { + this.inventory = inventory; + } + public AIBusinessGatewayOfferingInventory getInventory() { + return this.inventory; + } + +} diff --git a/sdk/src/main/java/org/zstack/sdk/AddModelCenterAction.java b/sdk/src/main/java/org/zstack/sdk/AddModelCenterAction.java index 5ec8f02097c..25015165d01 100644 --- a/sdk/src/main/java/org/zstack/sdk/AddModelCenterAction.java +++ b/sdk/src/main/java/org/zstack/sdk/AddModelCenterAction.java @@ -31,7 +31,7 @@ public Result throwExceptionIfError() { @Param(required = true, nonempty = false, nullElements = false, emptyString = true, noTrim = false) public java.lang.String url; - @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + @Param(required = true, nonempty = false, nullElements = false, emptyString = true, noTrim = false) public java.lang.String zoneUuid; @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) diff --git a/sdk/src/main/java/org/zstack/sdk/AddModelCenterBusinessNetworkProfileAction.java b/sdk/src/main/java/org/zstack/sdk/AddModelCenterBusinessNetworkProfileAction.java new file mode 100644 index 00000000000..c4f0b41f013 --- /dev/null +++ b/sdk/src/main/java/org/zstack/sdk/AddModelCenterBusinessNetworkProfileAction.java @@ -0,0 +1,164 @@ +package org.zstack.sdk; + +import java.util.HashMap; +import java.util.Map; +import org.zstack.sdk.*; + +public class AddModelCenterBusinessNetworkProfileAction extends AbstractAction { + + private static final HashMap parameterMap = new HashMap<>(); + + private static final HashMap nonAPIParameterMap = new HashMap<>(); + + public static class Result { + public ErrorCode error; + public org.zstack.sdk.AddModelCenterBusinessNetworkProfileResult value; + + public Result throwExceptionIfError() { + if (error != null) { + throw new ApiException( + String.format("error[code: %s, description: %s, details: %s, globalErrorCode: %s]", error.code, error.description, error.details, error.globalErrorCode) + ); + } + + return this; + } + } + + @Param(required = true, maxLength = 255, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String name; + + @Param(required = false, maxLength = 2048, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String description; + + @Param(required = true, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String modelCenterUuid; + + @Param(required = true, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String zoneUuid; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String clusterUuid; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String nativeClusterUuid; + + @Param(required = true, validValues = {"VirtualMachine","Container"}, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String backendType; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String modelServiceNetworkUuid; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String developerAccessNetworkUuid; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String storageNetworkUuid; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String containerNetwork; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String containerDeveloperAccessNetwork; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String containerStorageNetwork; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.Boolean defaultProfile; + + @Param(required = false, validValues = {"Enabled","Disabled","Error"}, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String status; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String gatewayScheme; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String gatewayAddress; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, numberRange = {1L,65535L}, noTrim = false) + public java.lang.Integer gatewayPort; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String gatewayManagementAddress; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String businessGatewayOfferingUuid; + + @Param(required = false) + public java.lang.String resourceUuid; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.util.List tagUuids; + + @Param(required = false) + public java.util.List systemTags; + + @Param(required = false) + public java.util.List userTags; + + @Param(required = false) + public String sessionId; + + @Param(required = false) + public String accessKeyId; + + @Param(required = false) + public String accessKeySecret; + + @Param(required = false) + public String requestIp; + + @NonAPIParam + public long timeout = -1; + + @NonAPIParam + public long pollingInterval = -1; + + + private Result makeResult(ApiResult res) { + Result ret = new Result(); + if (res.error != null) { + ret.error = res.error; + return ret; + } + + org.zstack.sdk.AddModelCenterBusinessNetworkProfileResult value = res.getResult(org.zstack.sdk.AddModelCenterBusinessNetworkProfileResult.class); + ret.value = value == null ? new org.zstack.sdk.AddModelCenterBusinessNetworkProfileResult() : value; + + return ret; + } + + public Result call() { + ApiResult res = ZSClient.call(this); + return makeResult(res); + } + + public void call(final Completion completion) { + ZSClient.call(this, new InternalCompletion() { + @Override + public void complete(ApiResult res) { + completion.complete(makeResult(res)); + } + }); + } + + protected Map getParameterMap() { + return parameterMap; + } + + protected Map getNonAPIParameterMap() { + return nonAPIParameterMap; + } + + protected RestInfo getRestInfo() { + RestInfo info = new RestInfo(); + info.httpMethod = "POST"; + info.path = "/ai/model-center-business-network-profiles"; + info.needSession = true; + info.needPoll = true; + info.parameterName = "params"; + return info; + } + +} diff --git a/sdk/src/main/java/org/zstack/sdk/AddModelCenterBusinessNetworkProfileResult.java b/sdk/src/main/java/org/zstack/sdk/AddModelCenterBusinessNetworkProfileResult.java new file mode 100644 index 00000000000..3260f3cb774 --- /dev/null +++ b/sdk/src/main/java/org/zstack/sdk/AddModelCenterBusinessNetworkProfileResult.java @@ -0,0 +1,14 @@ +package org.zstack.sdk; + +import org.zstack.sdk.ModelCenterBusinessNetworkProfileInventory; + +public class AddModelCenterBusinessNetworkProfileResult { + public ModelCenterBusinessNetworkProfileInventory inventory; + public void setInventory(ModelCenterBusinessNetworkProfileInventory inventory) { + this.inventory = inventory; + } + public ModelCenterBusinessNetworkProfileInventory getInventory() { + return this.inventory; + } + +} diff --git a/sdk/src/main/java/org/zstack/sdk/AiHostCacheStorageInventory.java b/sdk/src/main/java/org/zstack/sdk/AiHostCacheStorageInventory.java new file mode 100644 index 00000000000..4a14bddd7f7 --- /dev/null +++ b/sdk/src/main/java/org/zstack/sdk/AiHostCacheStorageInventory.java @@ -0,0 +1,151 @@ +package org.zstack.sdk; + +import org.zstack.sdk.AiHostCacheStorageStatus; + +public class AiHostCacheStorageInventory { + + public java.lang.String uuid; + public void setUuid(java.lang.String uuid) { + this.uuid = uuid; + } + public java.lang.String getUuid() { + return this.uuid; + } + + public java.lang.String hostUuid; + public void setHostUuid(java.lang.String hostUuid) { + this.hostUuid = hostUuid; + } + public java.lang.String getHostUuid() { + return this.hostUuid; + } + + public java.lang.String hostName; + public void setHostName(java.lang.String hostName) { + this.hostName = hostName; + } + public java.lang.String getHostName() { + return this.hostName; + } + + public java.lang.String sourceRoot; + public void setSourceRoot(java.lang.String sourceRoot) { + this.sourceRoot = sourceRoot; + } + public java.lang.String getSourceRoot() { + return this.sourceRoot; + } + + public java.lang.String primaryStorageUuid; + public void setPrimaryStorageUuid(java.lang.String primaryStorageUuid) { + this.primaryStorageUuid = primaryStorageUuid; + } + public java.lang.String getPrimaryStorageUuid() { + return this.primaryStorageUuid; + } + + public java.lang.String primaryStorageName; + public void setPrimaryStorageName(java.lang.String primaryStorageName) { + this.primaryStorageName = primaryStorageName; + } + public java.lang.String getPrimaryStorageName() { + return this.primaryStorageName; + } + + public java.lang.Long physicalTotalBytes; + public void setPhysicalTotalBytes(java.lang.Long physicalTotalBytes) { + this.physicalTotalBytes = physicalTotalBytes; + } + public java.lang.Long getPhysicalTotalBytes() { + return this.physicalTotalBytes; + } + + public java.lang.Long physicalAvailableBytes; + public void setPhysicalAvailableBytes(java.lang.Long physicalAvailableBytes) { + this.physicalAvailableBytes = physicalAvailableBytes; + } + public java.lang.Long getPhysicalAvailableBytes() { + return this.physicalAvailableBytes; + } + + public java.lang.Long policyUsedBytes; + public void setPolicyUsedBytes(java.lang.Long policyUsedBytes) { + this.policyUsedBytes = policyUsedBytes; + } + public java.lang.Long getPolicyUsedBytes() { + return this.policyUsedBytes; + } + + public java.lang.Long unmanagedUsedBytesEstimate; + public void setUnmanagedUsedBytesEstimate(java.lang.Long unmanagedUsedBytesEstimate) { + this.unmanagedUsedBytesEstimate = unmanagedUsedBytesEstimate; + } + public java.lang.Long getUnmanagedUsedBytesEstimate() { + return this.unmanagedUsedBytesEstimate; + } + + public java.lang.Long policyReservedBytes; + public void setPolicyReservedBytes(java.lang.Long policyReservedBytes) { + this.policyReservedBytes = policyReservedBytes; + } + public java.lang.Long getPolicyReservedBytes() { + return this.policyReservedBytes; + } + + public java.lang.Long policyMaxSizeBytes; + public void setPolicyMaxSizeBytes(java.lang.Long policyMaxSizeBytes) { + this.policyMaxSizeBytes = policyMaxSizeBytes; + } + public java.lang.Long getPolicyMaxSizeBytes() { + return this.policyMaxSizeBytes; + } + + public java.lang.Long effectiveAvailableBytes; + public void setEffectiveAvailableBytes(java.lang.Long effectiveAvailableBytes) { + this.effectiveAvailableBytes = effectiveAvailableBytes; + } + public java.lang.Long getEffectiveAvailableBytes() { + return this.effectiveAvailableBytes; + } + + public java.lang.Long highWatermarkBytes; + public void setHighWatermarkBytes(java.lang.Long highWatermarkBytes) { + this.highWatermarkBytes = highWatermarkBytes; + } + public java.lang.Long getHighWatermarkBytes() { + return this.highWatermarkBytes; + } + + public java.lang.Long lowWatermarkBytes; + public void setLowWatermarkBytes(java.lang.Long lowWatermarkBytes) { + this.lowWatermarkBytes = lowWatermarkBytes; + } + public java.lang.Long getLowWatermarkBytes() { + return this.lowWatermarkBytes; + } + + public AiHostCacheStorageStatus status; + public void setStatus(AiHostCacheStorageStatus status) { + this.status = status; + } + public AiHostCacheStorageStatus getStatus() { + return this.status; + } + + public java.lang.String statusReason; + public void setStatusReason(java.lang.String statusReason) { + this.statusReason = statusReason; + } + public java.lang.String getStatusReason() { + return this.statusReason; + } + + public java.sql.Timestamp lastSyncDate; + public void setLastSyncDate(java.sql.Timestamp lastSyncDate) { + this.lastSyncDate = lastSyncDate; + } + public java.sql.Timestamp getLastSyncDate() { + return this.lastSyncDate; + } + +} diff --git a/sdk/src/main/java/org/zstack/sdk/AiHostCacheStorageStatus.java b/sdk/src/main/java/org/zstack/sdk/AiHostCacheStorageStatus.java new file mode 100644 index 00000000000..836b25f8ddb --- /dev/null +++ b/sdk/src/main/java/org/zstack/sdk/AiHostCacheStorageStatus.java @@ -0,0 +1,9 @@ +package org.zstack.sdk; + +public enum AiHostCacheStorageStatus { + Healthy, + Unknown, + PhysicalInsufficient, + PolicyInsufficient, + Disabled, +} diff --git a/sdk/src/main/java/org/zstack/sdk/AiHostModelCacheFailureCode.java b/sdk/src/main/java/org/zstack/sdk/AiHostModelCacheFailureCode.java new file mode 100644 index 00000000000..adaf4985d4c --- /dev/null +++ b/sdk/src/main/java/org/zstack/sdk/AiHostModelCacheFailureCode.java @@ -0,0 +1,11 @@ +package org.zstack.sdk; + +public enum AiHostModelCacheFailureCode { + JuicefsMountFailed, + JuicefsWarmupFailed, + InsufficientHostCacheStorage, + SourcePathInvalid, + PermissionDenied, + AgentTimeout, + Unknown, +} diff --git a/sdk/src/main/java/org/zstack/sdk/AiHostModelCacheFailurePhase.java b/sdk/src/main/java/org/zstack/sdk/AiHostModelCacheFailurePhase.java new file mode 100644 index 00000000000..15ec07a58b4 --- /dev/null +++ b/sdk/src/main/java/org/zstack/sdk/AiHostModelCacheFailurePhase.java @@ -0,0 +1,10 @@ +package org.zstack.sdk; + +public enum AiHostModelCacheFailurePhase { + ModelSourceMount, + ModelSourceWarmup, + PreparedSourceValidation, + CapacityCheck, + AgentExecution, + Unknown, +} diff --git a/sdk/src/main/java/org/zstack/sdk/AiHostModelCacheInventory.java b/sdk/src/main/java/org/zstack/sdk/AiHostModelCacheInventory.java new file mode 100644 index 00000000000..c7fe062519a --- /dev/null +++ b/sdk/src/main/java/org/zstack/sdk/AiHostModelCacheInventory.java @@ -0,0 +1,193 @@ +package org.zstack.sdk; + +import org.zstack.sdk.AiHostModelCacheStatus; +import org.zstack.sdk.AiHostModelCacheFailurePhase; +import org.zstack.sdk.AiHostModelCacheFailureCode; + +public class AiHostModelCacheInventory { + + public java.lang.String uuid; + public void setUuid(java.lang.String uuid) { + this.uuid = uuid; + } + public java.lang.String getUuid() { + return this.uuid; + } + + public java.lang.String hostUuid; + public void setHostUuid(java.lang.String hostUuid) { + this.hostUuid = hostUuid; + } + public java.lang.String getHostUuid() { + return this.hostUuid; + } + + public java.lang.String modelCenterUuid; + public void setModelCenterUuid(java.lang.String modelCenterUuid) { + this.modelCenterUuid = modelCenterUuid; + } + public java.lang.String getModelCenterUuid() { + return this.modelCenterUuid; + } + + public java.lang.String modelUuid; + public void setModelUuid(java.lang.String modelUuid) { + this.modelUuid = modelUuid; + } + public java.lang.String getModelUuid() { + return this.modelUuid; + } + + public java.lang.String primaryStorageUuid; + public void setPrimaryStorageUuid(java.lang.String primaryStorageUuid) { + this.primaryStorageUuid = primaryStorageUuid; + } + public java.lang.String getPrimaryStorageUuid() { + return this.primaryStorageUuid; + } + + public java.lang.String primaryStorageName; + public void setPrimaryStorageName(java.lang.String primaryStorageName) { + this.primaryStorageName = primaryStorageName; + } + public java.lang.String getPrimaryStorageName() { + return this.primaryStorageName; + } + + public java.lang.String sourceRoot; + public void setSourceRoot(java.lang.String sourceRoot) { + this.sourceRoot = sourceRoot; + } + public java.lang.String getSourceRoot() { + return this.sourceRoot; + } + + public java.lang.String sourcePath; + public void setSourcePath(java.lang.String sourcePath) { + this.sourcePath = sourcePath; + } + public java.lang.String getSourcePath() { + return this.sourcePath; + } + + public java.lang.Long sizeBytes; + public void setSizeBytes(java.lang.Long sizeBytes) { + this.sizeBytes = sizeBytes; + } + public java.lang.Long getSizeBytes() { + return this.sizeBytes; + } + + public java.lang.Long sourceMtime; + public void setSourceMtime(java.lang.Long sourceMtime) { + this.sourceMtime = sourceMtime; + } + public java.lang.Long getSourceMtime() { + return this.sourceMtime; + } + + public java.lang.String checksum; + public void setChecksum(java.lang.String checksum) { + this.checksum = checksum; + } + public java.lang.String getChecksum() { + return this.checksum; + } + + public java.lang.String contentVersion; + public void setContentVersion(java.lang.String contentVersion) { + this.contentVersion = contentVersion; + } + public java.lang.String getContentVersion() { + return this.contentVersion; + } + + public java.lang.String identityHash; + public void setIdentityHash(java.lang.String identityHash) { + this.identityHash = identityHash; + } + public java.lang.String getIdentityHash() { + return this.identityHash; + } + + public AiHostModelCacheStatus status; + public void setStatus(AiHostModelCacheStatus status) { + this.status = status; + } + public AiHostModelCacheStatus getStatus() { + return this.status; + } + + public long desiredRefCount; + public void setDesiredRefCount(long desiredRefCount) { + this.desiredRefCount = desiredRefCount; + } + public long getDesiredRefCount() { + return this.desiredRefCount; + } + + public long runningRefCount; + public void setRunningRefCount(long runningRefCount) { + this.runningRefCount = runningRefCount; + } + public long getRunningRefCount() { + return this.runningRefCount; + } + + public java.lang.String reservationUuid; + public void setReservationUuid(java.lang.String reservationUuid) { + this.reservationUuid = reservationUuid; + } + public java.lang.String getReservationUuid() { + return this.reservationUuid; + } + + public java.lang.Integer waiterCount; + public void setWaiterCount(java.lang.Integer waiterCount) { + this.waiterCount = waiterCount; + } + public java.lang.Integer getWaiterCount() { + return this.waiterCount; + } + + public java.sql.Timestamp lastAccessDate; + public void setLastAccessDate(java.sql.Timestamp lastAccessDate) { + this.lastAccessDate = lastAccessDate; + } + public java.sql.Timestamp getLastAccessDate() { + return this.lastAccessDate; + } + + public java.sql.Timestamp lastSyncDate; + public void setLastSyncDate(java.sql.Timestamp lastSyncDate) { + this.lastSyncDate = lastSyncDate; + } + public java.sql.Timestamp getLastSyncDate() { + return this.lastSyncDate; + } + + public AiHostModelCacheFailurePhase failurePhase; + public void setFailurePhase(AiHostModelCacheFailurePhase failurePhase) { + this.failurePhase = failurePhase; + } + public AiHostModelCacheFailurePhase getFailurePhase() { + return this.failurePhase; + } + + public AiHostModelCacheFailureCode failureCode; + public void setFailureCode(AiHostModelCacheFailureCode failureCode) { + this.failureCode = failureCode; + } + public AiHostModelCacheFailureCode getFailureCode() { + return this.failureCode; + } + + public java.lang.String failureMessage; + public void setFailureMessage(java.lang.String failureMessage) { + this.failureMessage = failureMessage; + } + public java.lang.String getFailureMessage() { + return this.failureMessage; + } + +} diff --git a/sdk/src/main/java/org/zstack/sdk/AiHostModelCachePolicyInventory.java b/sdk/src/main/java/org/zstack/sdk/AiHostModelCachePolicyInventory.java new file mode 100644 index 00000000000..e77da14cbb9 --- /dev/null +++ b/sdk/src/main/java/org/zstack/sdk/AiHostModelCachePolicyInventory.java @@ -0,0 +1,87 @@ +package org.zstack.sdk; + + + +public class AiHostModelCachePolicyInventory { + + public java.lang.String uuid; + public void setUuid(java.lang.String uuid) { + this.uuid = uuid; + } + public java.lang.String getUuid() { + return this.uuid; + } + + public java.lang.String hostUuid; + public void setHostUuid(java.lang.String hostUuid) { + this.hostUuid = hostUuid; + } + public java.lang.String getHostUuid() { + return this.hostUuid; + } + + public java.lang.String sourceRoot; + public void setSourceRoot(java.lang.String sourceRoot) { + this.sourceRoot = sourceRoot; + } + public java.lang.String getSourceRoot() { + return this.sourceRoot; + } + + public java.lang.String primaryStorageUuid; + public void setPrimaryStorageUuid(java.lang.String primaryStorageUuid) { + this.primaryStorageUuid = primaryStorageUuid; + } + public java.lang.String getPrimaryStorageUuid() { + return this.primaryStorageUuid; + } + + public java.lang.String primaryStorageName; + public void setPrimaryStorageName(java.lang.String primaryStorageName) { + this.primaryStorageName = primaryStorageName; + } + public java.lang.String getPrimaryStorageName() { + return this.primaryStorageName; + } + + public java.lang.Boolean enabled; + public void setEnabled(java.lang.Boolean enabled) { + this.enabled = enabled; + } + public java.lang.Boolean getEnabled() { + return this.enabled; + } + + public java.lang.Long maxSizeBytes; + public void setMaxSizeBytes(java.lang.Long maxSizeBytes) { + this.maxSizeBytes = maxSizeBytes; + } + public java.lang.Long getMaxSizeBytes() { + return this.maxSizeBytes; + } + + public java.lang.Integer highWatermarkPercent; + public void setHighWatermarkPercent(java.lang.Integer highWatermarkPercent) { + this.highWatermarkPercent = highWatermarkPercent; + } + public java.lang.Integer getHighWatermarkPercent() { + return this.highWatermarkPercent; + } + + public java.lang.Integer lowWatermarkPercent; + public void setLowWatermarkPercent(java.lang.Integer lowWatermarkPercent) { + this.lowWatermarkPercent = lowWatermarkPercent; + } + public java.lang.Integer getLowWatermarkPercent() { + return this.lowWatermarkPercent; + } + + public java.lang.String disabledReason; + public void setDisabledReason(java.lang.String disabledReason) { + this.disabledReason = disabledReason; + } + public java.lang.String getDisabledReason() { + return this.disabledReason; + } + +} diff --git a/sdk/src/main/java/org/zstack/sdk/AiHostModelCacheStatus.java b/sdk/src/main/java/org/zstack/sdk/AiHostModelCacheStatus.java new file mode 100644 index 00000000000..7372bc3a0a1 --- /dev/null +++ b/sdk/src/main/java/org/zstack/sdk/AiHostModelCacheStatus.java @@ -0,0 +1,9 @@ +package org.zstack.sdk; + +public enum AiHostModelCacheStatus { + Preparing, + Ready, + Failed, + Unknown, + Cleaning, +} diff --git a/sdk/src/main/java/org/zstack/sdk/ArchitectureImageMapping.java b/sdk/src/main/java/org/zstack/sdk/ArchitectureImageMapping.java index bcce51854c0..28780208132 100644 --- a/sdk/src/main/java/org/zstack/sdk/ArchitectureImageMapping.java +++ b/sdk/src/main/java/org/zstack/sdk/ArchitectureImageMapping.java @@ -4,6 +4,14 @@ public class ArchitectureImageMapping { + public java.lang.String templateName; + public void setTemplateName(java.lang.String templateName) { + this.templateName = templateName; + } + public java.lang.String getTemplateName() { + return this.templateName; + } + public java.lang.String cpuArchitecture; public void setCpuArchitecture(java.lang.String cpuArchitecture) { this.cpuArchitecture = cpuArchitecture; @@ -12,6 +20,22 @@ public java.lang.String getCpuArchitecture() { return this.cpuArchitecture; } + public java.lang.String gpuVendor; + public void setGpuVendor(java.lang.String gpuVendor) { + this.gpuVendor = gpuVendor; + } + public java.lang.String getGpuVendor() { + return this.gpuVendor; + } + + public java.lang.String acceleratorType; + public void setAcceleratorType(java.lang.String acceleratorType) { + this.acceleratorType = acceleratorType; + } + public java.lang.String getAcceleratorType() { + return this.acceleratorType; + } + public java.lang.String vmImageUuid; public void setVmImageUuid(java.lang.String vmImageUuid) { this.vmImageUuid = vmImageUuid; @@ -20,6 +44,14 @@ public java.lang.String getVmImageUuid() { return this.vmImageUuid; } + public java.lang.String imageNamePattern; + public void setImageNamePattern(java.lang.String imageNamePattern) { + this.imageNamePattern = imageNamePattern; + } + public java.lang.String getImageNamePattern() { + return this.imageNamePattern; + } + public java.lang.String dockerImage; public void setDockerImage(java.lang.String dockerImage) { this.dockerImage = dockerImage; diff --git a/sdk/src/main/java/org/zstack/sdk/ChangeModelServiceInstanceGroupBusinessNetworkProfileAction.java b/sdk/src/main/java/org/zstack/sdk/ChangeModelServiceInstanceGroupBusinessNetworkProfileAction.java new file mode 100644 index 00000000000..cff5a87da08 --- /dev/null +++ b/sdk/src/main/java/org/zstack/sdk/ChangeModelServiceInstanceGroupBusinessNetworkProfileAction.java @@ -0,0 +1,107 @@ +package org.zstack.sdk; + +import java.util.HashMap; +import java.util.Map; +import org.zstack.sdk.*; + +public class ChangeModelServiceInstanceGroupBusinessNetworkProfileAction extends AbstractAction { + + private static final HashMap parameterMap = new HashMap<>(); + + private static final HashMap nonAPIParameterMap = new HashMap<>(); + + public static class Result { + public ErrorCode error; + public org.zstack.sdk.ChangeModelServiceInstanceGroupBusinessNetworkProfileResult value; + + public Result throwExceptionIfError() { + if (error != null) { + throw new ApiException( + String.format("error[code: %s, description: %s, details: %s, globalErrorCode: %s]", error.code, error.description, error.details, error.globalErrorCode) + ); + } + + return this; + } + } + + @Param(required = true, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String uuid; + + @Param(required = true, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String businessNetworkProfileUuid; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.Boolean enableDeveloperEndpoint; + + @Param(required = false) + public java.util.List systemTags; + + @Param(required = false) + public java.util.List userTags; + + @Param(required = false) + public String sessionId; + + @Param(required = false) + public String accessKeyId; + + @Param(required = false) + public String accessKeySecret; + + @Param(required = false) + public String requestIp; + + @NonAPIParam + public long timeout = -1; + + @NonAPIParam + public long pollingInterval = -1; + + + private Result makeResult(ApiResult res) { + Result ret = new Result(); + if (res.error != null) { + ret.error = res.error; + return ret; + } + + org.zstack.sdk.ChangeModelServiceInstanceGroupBusinessNetworkProfileResult value = res.getResult(org.zstack.sdk.ChangeModelServiceInstanceGroupBusinessNetworkProfileResult.class); + ret.value = value == null ? new org.zstack.sdk.ChangeModelServiceInstanceGroupBusinessNetworkProfileResult() : value; + + return ret; + } + + public Result call() { + ApiResult res = ZSClient.call(this); + return makeResult(res); + } + + public void call(final Completion completion) { + ZSClient.call(this, new InternalCompletion() { + @Override + public void complete(ApiResult res) { + completion.complete(makeResult(res)); + } + }); + } + + protected Map getParameterMap() { + return parameterMap; + } + + protected Map getNonAPIParameterMap() { + return nonAPIParameterMap; + } + + protected RestInfo getRestInfo() { + RestInfo info = new RestInfo(); + info.httpMethod = "PUT"; + info.path = "/model-service-instance-groups/{uuid}/actions"; + info.needSession = true; + info.needPoll = true; + info.parameterName = "changeModelServiceInstanceGroupBusinessNetworkProfile"; + return info; + } + +} diff --git a/sdk/src/main/java/org/zstack/sdk/ChangeModelServiceInstanceGroupBusinessNetworkProfileResult.java b/sdk/src/main/java/org/zstack/sdk/ChangeModelServiceInstanceGroupBusinessNetworkProfileResult.java new file mode 100644 index 00000000000..365802404d1 --- /dev/null +++ b/sdk/src/main/java/org/zstack/sdk/ChangeModelServiceInstanceGroupBusinessNetworkProfileResult.java @@ -0,0 +1,14 @@ +package org.zstack.sdk; + +import org.zstack.sdk.ModelServiceInstanceGroupInventory; + +public class ChangeModelServiceInstanceGroupBusinessNetworkProfileResult { + public ModelServiceInstanceGroupInventory inventory; + public void setInventory(ModelServiceInstanceGroupInventory inventory) { + this.inventory = inventory; + } + public ModelServiceInstanceGroupInventory getInventory() { + return this.inventory; + } + +} diff --git a/sdk/src/main/java/org/zstack/sdk/CleanAiHostModelCacheAction.java b/sdk/src/main/java/org/zstack/sdk/CleanAiHostModelCacheAction.java new file mode 100644 index 00000000000..75742f0e5ca --- /dev/null +++ b/sdk/src/main/java/org/zstack/sdk/CleanAiHostModelCacheAction.java @@ -0,0 +1,116 @@ +package org.zstack.sdk; + +import java.util.HashMap; +import java.util.Map; +import org.zstack.sdk.*; + +public class CleanAiHostModelCacheAction extends AbstractAction { + + private static final HashMap parameterMap = new HashMap<>(); + + private static final HashMap nonAPIParameterMap = new HashMap<>(); + + public static class Result { + public ErrorCode error; + public org.zstack.sdk.CleanAiHostModelCacheResult value; + + public Result throwExceptionIfError() { + if (error != null) { + throw new ApiException( + String.format("error[code: %s, description: %s, details: %s, globalErrorCode: %s]", error.code, error.description, error.details, error.globalErrorCode) + ); + } + + return this; + } + } + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String cacheUuid; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String hostUuid; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String primaryStorageUuid; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String modelUuid; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.util.List statuses; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.Boolean onlyUnused; + + @Param(required = false) + public java.util.List systemTags; + + @Param(required = false) + public java.util.List userTags; + + @Param(required = false) + public String sessionId; + + @Param(required = false) + public String accessKeyId; + + @Param(required = false) + public String accessKeySecret; + + @Param(required = false) + public String requestIp; + + @NonAPIParam + public long timeout = -1; + + @NonAPIParam + public long pollingInterval = -1; + + + private Result makeResult(ApiResult res) { + Result ret = new Result(); + if (res.error != null) { + ret.error = res.error; + return ret; + } + + org.zstack.sdk.CleanAiHostModelCacheResult value = res.getResult(org.zstack.sdk.CleanAiHostModelCacheResult.class); + ret.value = value == null ? new org.zstack.sdk.CleanAiHostModelCacheResult() : value; + + return ret; + } + + public Result call() { + ApiResult res = ZSClient.call(this); + return makeResult(res); + } + + public void call(final Completion completion) { + ZSClient.call(this, new InternalCompletion() { + @Override + public void complete(ApiResult res) { + completion.complete(makeResult(res)); + } + }); + } + + protected Map getParameterMap() { + return parameterMap; + } + + protected Map getNonAPIParameterMap() { + return nonAPIParameterMap; + } + + protected RestInfo getRestInfo() { + RestInfo info = new RestInfo(); + info.httpMethod = "PUT"; + info.path = "/ai/host-model-caches/actions"; + info.needSession = true; + info.needPoll = true; + info.parameterName = "cleanAiHostModelCache"; + return info; + } + +} diff --git a/sdk/src/main/java/org/zstack/sdk/CleanAiHostModelCacheResult.java b/sdk/src/main/java/org/zstack/sdk/CleanAiHostModelCacheResult.java new file mode 100644 index 00000000000..a589ff41299 --- /dev/null +++ b/sdk/src/main/java/org/zstack/sdk/CleanAiHostModelCacheResult.java @@ -0,0 +1,30 @@ +package org.zstack.sdk; + + + +public class CleanAiHostModelCacheResult { + public java.util.List cleanedInventories; + public void setCleanedInventories(java.util.List cleanedInventories) { + this.cleanedInventories = cleanedInventories; + } + public java.util.List getCleanedInventories() { + return this.cleanedInventories; + } + + public java.util.List skippedReasons; + public void setSkippedReasons(java.util.List skippedReasons) { + this.skippedReasons = skippedReasons; + } + public java.util.List getSkippedReasons() { + return this.skippedReasons; + } + + public java.lang.Long bytesReclaimed; + public void setBytesReclaimed(java.lang.Long bytesReclaimed) { + this.bytesReclaimed = bytesReclaimed; + } + public java.lang.Long getBytesReclaimed() { + return this.bytesReclaimed; + } + +} diff --git a/sdk/src/main/java/org/zstack/sdk/DeleteAIBusinessGatewayAction.java b/sdk/src/main/java/org/zstack/sdk/DeleteAIBusinessGatewayAction.java new file mode 100644 index 00000000000..210996de226 --- /dev/null +++ b/sdk/src/main/java/org/zstack/sdk/DeleteAIBusinessGatewayAction.java @@ -0,0 +1,104 @@ +package org.zstack.sdk; + +import java.util.HashMap; +import java.util.Map; +import org.zstack.sdk.*; + +public class DeleteAIBusinessGatewayAction extends AbstractAction { + + private static final HashMap parameterMap = new HashMap<>(); + + private static final HashMap nonAPIParameterMap = new HashMap<>(); + + public static class Result { + public ErrorCode error; + public org.zstack.sdk.DeleteAIBusinessGatewayResult value; + + public Result throwExceptionIfError() { + if (error != null) { + throw new ApiException( + String.format("error[code: %s, description: %s, details: %s, globalErrorCode: %s]", error.code, error.description, error.details, error.globalErrorCode) + ); + } + + return this; + } + } + + @Param(required = true, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String uuid; + + @Param(required = false) + public java.lang.String deleteMode = "Permissive"; + + @Param(required = false) + public java.util.List systemTags; + + @Param(required = false) + public java.util.List userTags; + + @Param(required = false) + public String sessionId; + + @Param(required = false) + public String accessKeyId; + + @Param(required = false) + public String accessKeySecret; + + @Param(required = false) + public String requestIp; + + @NonAPIParam + public long timeout = -1; + + @NonAPIParam + public long pollingInterval = -1; + + + private Result makeResult(ApiResult res) { + Result ret = new Result(); + if (res.error != null) { + ret.error = res.error; + return ret; + } + + org.zstack.sdk.DeleteAIBusinessGatewayResult value = res.getResult(org.zstack.sdk.DeleteAIBusinessGatewayResult.class); + ret.value = value == null ? new org.zstack.sdk.DeleteAIBusinessGatewayResult() : value; + + return ret; + } + + public Result call() { + ApiResult res = ZSClient.call(this); + return makeResult(res); + } + + public void call(final Completion completion) { + ZSClient.call(this, new InternalCompletion() { + @Override + public void complete(ApiResult res) { + completion.complete(makeResult(res)); + } + }); + } + + protected Map getParameterMap() { + return parameterMap; + } + + protected Map getNonAPIParameterMap() { + return nonAPIParameterMap; + } + + protected RestInfo getRestInfo() { + RestInfo info = new RestInfo(); + info.httpMethod = "DELETE"; + info.path = "/ai/business-gateways/{uuid}"; + info.needSession = true; + info.needPoll = true; + info.parameterName = ""; + return info; + } + +} diff --git a/sdk/src/main/java/org/zstack/sdk/DeleteAIBusinessGatewayOfferingAction.java b/sdk/src/main/java/org/zstack/sdk/DeleteAIBusinessGatewayOfferingAction.java new file mode 100644 index 00000000000..dfffc1b5e01 --- /dev/null +++ b/sdk/src/main/java/org/zstack/sdk/DeleteAIBusinessGatewayOfferingAction.java @@ -0,0 +1,104 @@ +package org.zstack.sdk; + +import java.util.HashMap; +import java.util.Map; +import org.zstack.sdk.*; + +public class DeleteAIBusinessGatewayOfferingAction extends AbstractAction { + + private static final HashMap parameterMap = new HashMap<>(); + + private static final HashMap nonAPIParameterMap = new HashMap<>(); + + public static class Result { + public ErrorCode error; + public org.zstack.sdk.DeleteAIBusinessGatewayOfferingResult value; + + public Result throwExceptionIfError() { + if (error != null) { + throw new ApiException( + String.format("error[code: %s, description: %s, details: %s, globalErrorCode: %s]", error.code, error.description, error.details, error.globalErrorCode) + ); + } + + return this; + } + } + + @Param(required = true, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String uuid; + + @Param(required = false) + public java.lang.String deleteMode = "Permissive"; + + @Param(required = false) + public java.util.List systemTags; + + @Param(required = false) + public java.util.List userTags; + + @Param(required = false) + public String sessionId; + + @Param(required = false) + public String accessKeyId; + + @Param(required = false) + public String accessKeySecret; + + @Param(required = false) + public String requestIp; + + @NonAPIParam + public long timeout = -1; + + @NonAPIParam + public long pollingInterval = -1; + + + private Result makeResult(ApiResult res) { + Result ret = new Result(); + if (res.error != null) { + ret.error = res.error; + return ret; + } + + org.zstack.sdk.DeleteAIBusinessGatewayOfferingResult value = res.getResult(org.zstack.sdk.DeleteAIBusinessGatewayOfferingResult.class); + ret.value = value == null ? new org.zstack.sdk.DeleteAIBusinessGatewayOfferingResult() : value; + + return ret; + } + + public Result call() { + ApiResult res = ZSClient.call(this); + return makeResult(res); + } + + public void call(final Completion completion) { + ZSClient.call(this, new InternalCompletion() { + @Override + public void complete(ApiResult res) { + completion.complete(makeResult(res)); + } + }); + } + + protected Map getParameterMap() { + return parameterMap; + } + + protected Map getNonAPIParameterMap() { + return nonAPIParameterMap; + } + + protected RestInfo getRestInfo() { + RestInfo info = new RestInfo(); + info.httpMethod = "DELETE"; + info.path = "/ai/business-gateway-offerings/{uuid}"; + info.needSession = true; + info.needPoll = true; + info.parameterName = ""; + return info; + } + +} diff --git a/sdk/src/main/java/org/zstack/sdk/DeleteAIBusinessGatewayOfferingResult.java b/sdk/src/main/java/org/zstack/sdk/DeleteAIBusinessGatewayOfferingResult.java new file mode 100644 index 00000000000..81253d1481a --- /dev/null +++ b/sdk/src/main/java/org/zstack/sdk/DeleteAIBusinessGatewayOfferingResult.java @@ -0,0 +1,7 @@ +package org.zstack.sdk; + + + +public class DeleteAIBusinessGatewayOfferingResult { + +} diff --git a/sdk/src/main/java/org/zstack/sdk/DeleteAIBusinessGatewayResult.java b/sdk/src/main/java/org/zstack/sdk/DeleteAIBusinessGatewayResult.java new file mode 100644 index 00000000000..1c9977fcc3c --- /dev/null +++ b/sdk/src/main/java/org/zstack/sdk/DeleteAIBusinessGatewayResult.java @@ -0,0 +1,7 @@ +package org.zstack.sdk; + + + +public class DeleteAIBusinessGatewayResult { + +} diff --git a/sdk/src/main/java/org/zstack/sdk/DeleteModelCenterBusinessNetworkProfileAction.java b/sdk/src/main/java/org/zstack/sdk/DeleteModelCenterBusinessNetworkProfileAction.java new file mode 100644 index 00000000000..15442437b1e --- /dev/null +++ b/sdk/src/main/java/org/zstack/sdk/DeleteModelCenterBusinessNetworkProfileAction.java @@ -0,0 +1,104 @@ +package org.zstack.sdk; + +import java.util.HashMap; +import java.util.Map; +import org.zstack.sdk.*; + +public class DeleteModelCenterBusinessNetworkProfileAction extends AbstractAction { + + private static final HashMap parameterMap = new HashMap<>(); + + private static final HashMap nonAPIParameterMap = new HashMap<>(); + + public static class Result { + public ErrorCode error; + public org.zstack.sdk.DeleteModelCenterBusinessNetworkProfileResult value; + + public Result throwExceptionIfError() { + if (error != null) { + throw new ApiException( + String.format("error[code: %s, description: %s, details: %s, globalErrorCode: %s]", error.code, error.description, error.details, error.globalErrorCode) + ); + } + + return this; + } + } + + @Param(required = true, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String uuid; + + @Param(required = false) + public java.lang.String deleteMode = "Permissive"; + + @Param(required = false) + public java.util.List systemTags; + + @Param(required = false) + public java.util.List userTags; + + @Param(required = false) + public String sessionId; + + @Param(required = false) + public String accessKeyId; + + @Param(required = false) + public String accessKeySecret; + + @Param(required = false) + public String requestIp; + + @NonAPIParam + public long timeout = -1; + + @NonAPIParam + public long pollingInterval = -1; + + + private Result makeResult(ApiResult res) { + Result ret = new Result(); + if (res.error != null) { + ret.error = res.error; + return ret; + } + + org.zstack.sdk.DeleteModelCenterBusinessNetworkProfileResult value = res.getResult(org.zstack.sdk.DeleteModelCenterBusinessNetworkProfileResult.class); + ret.value = value == null ? new org.zstack.sdk.DeleteModelCenterBusinessNetworkProfileResult() : value; + + return ret; + } + + public Result call() { + ApiResult res = ZSClient.call(this); + return makeResult(res); + } + + public void call(final Completion completion) { + ZSClient.call(this, new InternalCompletion() { + @Override + public void complete(ApiResult res) { + completion.complete(makeResult(res)); + } + }); + } + + protected Map getParameterMap() { + return parameterMap; + } + + protected Map getNonAPIParameterMap() { + return nonAPIParameterMap; + } + + protected RestInfo getRestInfo() { + RestInfo info = new RestInfo(); + info.httpMethod = "DELETE"; + info.path = "/ai/model-center-business-network-profiles/{uuid}"; + info.needSession = true; + info.needPoll = true; + info.parameterName = ""; + return info; + } + +} diff --git a/sdk/src/main/java/org/zstack/sdk/DeleteModelCenterBusinessNetworkProfileResult.java b/sdk/src/main/java/org/zstack/sdk/DeleteModelCenterBusinessNetworkProfileResult.java new file mode 100644 index 00000000000..19851b4833f --- /dev/null +++ b/sdk/src/main/java/org/zstack/sdk/DeleteModelCenterBusinessNetworkProfileResult.java @@ -0,0 +1,7 @@ +package org.zstack.sdk; + + + +public class DeleteModelCenterBusinessNetworkProfileResult { + +} diff --git a/sdk/src/main/java/org/zstack/sdk/DeployAppDevelopmentServiceAction.java b/sdk/src/main/java/org/zstack/sdk/DeployAppDevelopmentServiceAction.java index 4fdecd4a475..77a836f30d6 100644 --- a/sdk/src/main/java/org/zstack/sdk/DeployAppDevelopmentServiceAction.java +++ b/sdk/src/main/java/org/zstack/sdk/DeployAppDevelopmentServiceAction.java @@ -82,6 +82,12 @@ public Result throwExceptionIfError() { @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) public java.util.List l3NetworkUuids; + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String businessNetworkProfileUuid; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.Boolean enableDeveloperEndpoint; + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) public java.lang.Integer serviceBootUptime; diff --git a/sdk/src/main/java/org/zstack/sdk/DeployDistributedModelServiceAction.java b/sdk/src/main/java/org/zstack/sdk/DeployDistributedModelServiceAction.java index 5b40f929cc2..a63682140be 100644 --- a/sdk/src/main/java/org/zstack/sdk/DeployDistributedModelServiceAction.java +++ b/sdk/src/main/java/org/zstack/sdk/DeployDistributedModelServiceAction.java @@ -37,6 +37,12 @@ public Result throwExceptionIfError() { @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) public java.lang.String description; + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String businessNetworkProfileUuid; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.Boolean enableDeveloperEndpoint; + @Param(required = false) public java.lang.String resourceUuid; diff --git a/sdk/src/main/java/org/zstack/sdk/DeployModelEvalServiceAction.java b/sdk/src/main/java/org/zstack/sdk/DeployModelEvalServiceAction.java index a75b1f851ec..56458fc5e6f 100644 --- a/sdk/src/main/java/org/zstack/sdk/DeployModelEvalServiceAction.java +++ b/sdk/src/main/java/org/zstack/sdk/DeployModelEvalServiceAction.java @@ -133,6 +133,12 @@ public Result throwExceptionIfError() { @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) public java.util.List l3NetworkUuids; + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String businessNetworkProfileUuid; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.Boolean enableDeveloperEndpoint; + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) public java.lang.Integer serviceBootUptime; diff --git a/sdk/src/main/java/org/zstack/sdk/DeployModelServiceAction.java b/sdk/src/main/java/org/zstack/sdk/DeployModelServiceAction.java index cbfe5811d6a..f3ae7791116 100644 --- a/sdk/src/main/java/org/zstack/sdk/DeployModelServiceAction.java +++ b/sdk/src/main/java/org/zstack/sdk/DeployModelServiceAction.java @@ -82,6 +82,12 @@ public Result throwExceptionIfError() { @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) public java.util.List l3NetworkUuids; + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String businessNetworkProfileUuid; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.Boolean enableDeveloperEndpoint; + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) public java.lang.Integer serviceBootUptime; diff --git a/sdk/src/main/java/org/zstack/sdk/GetAiHostModelCacheCapacityAction.java b/sdk/src/main/java/org/zstack/sdk/GetAiHostModelCacheCapacityAction.java new file mode 100644 index 00000000000..82ef28d1f97 --- /dev/null +++ b/sdk/src/main/java/org/zstack/sdk/GetAiHostModelCacheCapacityAction.java @@ -0,0 +1,98 @@ +package org.zstack.sdk; + +import java.util.HashMap; +import java.util.Map; +import org.zstack.sdk.*; + +public class GetAiHostModelCacheCapacityAction extends AbstractAction { + + private static final HashMap parameterMap = new HashMap<>(); + + private static final HashMap nonAPIParameterMap = new HashMap<>(); + + public static class Result { + public ErrorCode error; + public org.zstack.sdk.GetAiHostModelCacheCapacityResult value; + + public Result throwExceptionIfError() { + if (error != null) { + throw new ApiException( + String.format("error[code: %s, description: %s, details: %s, globalErrorCode: %s]", error.code, error.description, error.details, error.globalErrorCode) + ); + } + + return this; + } + } + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String hostUuid; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String primaryStorageUuid; + + @Param(required = false) + public java.util.List systemTags; + + @Param(required = false) + public java.util.List userTags; + + @Param(required = false) + public String sessionId; + + @Param(required = false) + public String accessKeyId; + + @Param(required = false) + public String accessKeySecret; + + @Param(required = false) + public String requestIp; + + + private Result makeResult(ApiResult res) { + Result ret = new Result(); + if (res.error != null) { + ret.error = res.error; + return ret; + } + + org.zstack.sdk.GetAiHostModelCacheCapacityResult value = res.getResult(org.zstack.sdk.GetAiHostModelCacheCapacityResult.class); + ret.value = value == null ? new org.zstack.sdk.GetAiHostModelCacheCapacityResult() : value; + + return ret; + } + + public Result call() { + ApiResult res = ZSClient.call(this); + return makeResult(res); + } + + public void call(final Completion completion) { + ZSClient.call(this, new InternalCompletion() { + @Override + public void complete(ApiResult res) { + completion.complete(makeResult(res)); + } + }); + } + + protected Map getParameterMap() { + return parameterMap; + } + + protected Map getNonAPIParameterMap() { + return nonAPIParameterMap; + } + + protected RestInfo getRestInfo() { + RestInfo info = new RestInfo(); + info.httpMethod = "GET"; + info.path = "/ai/host-model-caches/capacities"; + info.needSession = true; + info.needPoll = false; + info.parameterName = ""; + return info; + } + +} diff --git a/sdk/src/main/java/org/zstack/sdk/GetAiHostModelCacheCapacityResult.java b/sdk/src/main/java/org/zstack/sdk/GetAiHostModelCacheCapacityResult.java new file mode 100644 index 00000000000..6c419732973 --- /dev/null +++ b/sdk/src/main/java/org/zstack/sdk/GetAiHostModelCacheCapacityResult.java @@ -0,0 +1,14 @@ +package org.zstack.sdk; + + + +public class GetAiHostModelCacheCapacityResult { + public java.util.List inventories; + public void setInventories(java.util.List inventories) { + this.inventories = inventories; + } + public java.util.List getInventories() { + return this.inventories; + } + +} diff --git a/sdk/src/main/java/org/zstack/sdk/MatchModelServiceTemplateWithModelAction.java b/sdk/src/main/java/org/zstack/sdk/MatchModelServiceTemplateWithModelAction.java index 36df79c8c7c..611d3118d83 100644 --- a/sdk/src/main/java/org/zstack/sdk/MatchModelServiceTemplateWithModelAction.java +++ b/sdk/src/main/java/org/zstack/sdk/MatchModelServiceTemplateWithModelAction.java @@ -91,6 +91,12 @@ public Result throwExceptionIfError() { @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) public java.util.List l3NetworkUuids; + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String businessNetworkProfileUuid; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.Boolean enableDeveloperEndpoint; + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) public java.lang.Integer serviceBootUptime; diff --git a/sdk/src/main/java/org/zstack/sdk/ModelCenterBusinessNetworkProfileInventory.java b/sdk/src/main/java/org/zstack/sdk/ModelCenterBusinessNetworkProfileInventory.java new file mode 100644 index 00000000000..8542eedb54d --- /dev/null +++ b/sdk/src/main/java/org/zstack/sdk/ModelCenterBusinessNetworkProfileInventory.java @@ -0,0 +1,167 @@ +package org.zstack.sdk; + + + +public class ModelCenterBusinessNetworkProfileInventory { + + public java.lang.String uuid; + public void setUuid(java.lang.String uuid) { + this.uuid = uuid; + } + public java.lang.String getUuid() { + return this.uuid; + } + + public java.lang.String name; + public void setName(java.lang.String name) { + this.name = name; + } + public java.lang.String getName() { + return this.name; + } + + public java.lang.String description; + public void setDescription(java.lang.String description) { + this.description = description; + } + public java.lang.String getDescription() { + return this.description; + } + + public java.lang.String modelCenterUuid; + public void setModelCenterUuid(java.lang.String modelCenterUuid) { + this.modelCenterUuid = modelCenterUuid; + } + public java.lang.String getModelCenterUuid() { + return this.modelCenterUuid; + } + + public java.lang.String zoneUuid; + public void setZoneUuid(java.lang.String zoneUuid) { + this.zoneUuid = zoneUuid; + } + public java.lang.String getZoneUuid() { + return this.zoneUuid; + } + + public java.lang.String clusterUuid; + public void setClusterUuid(java.lang.String clusterUuid) { + this.clusterUuid = clusterUuid; + } + public java.lang.String getClusterUuid() { + return this.clusterUuid; + } + + public java.lang.String nativeClusterUuid; + public void setNativeClusterUuid(java.lang.String nativeClusterUuid) { + this.nativeClusterUuid = nativeClusterUuid; + } + public java.lang.String getNativeClusterUuid() { + return this.nativeClusterUuid; + } + + public java.lang.String backendType; + public void setBackendType(java.lang.String backendType) { + this.backendType = backendType; + } + public java.lang.String getBackendType() { + return this.backendType; + } + + public java.lang.String modelServiceNetworkUuid; + public void setModelServiceNetworkUuid(java.lang.String modelServiceNetworkUuid) { + this.modelServiceNetworkUuid = modelServiceNetworkUuid; + } + public java.lang.String getModelServiceNetworkUuid() { + return this.modelServiceNetworkUuid; + } + + public java.lang.String developerAccessNetworkUuid; + public void setDeveloperAccessNetworkUuid(java.lang.String developerAccessNetworkUuid) { + this.developerAccessNetworkUuid = developerAccessNetworkUuid; + } + public java.lang.String getDeveloperAccessNetworkUuid() { + return this.developerAccessNetworkUuid; + } + + public java.lang.String storageNetworkUuid; + public void setStorageNetworkUuid(java.lang.String storageNetworkUuid) { + this.storageNetworkUuid = storageNetworkUuid; + } + public java.lang.String getStorageNetworkUuid() { + return this.storageNetworkUuid; + } + + public java.lang.String containerNetwork; + public void setContainerNetwork(java.lang.String containerNetwork) { + this.containerNetwork = containerNetwork; + } + public java.lang.String getContainerNetwork() { + return this.containerNetwork; + } + + public java.lang.String containerDeveloperAccessNetwork; + public void setContainerDeveloperAccessNetwork(java.lang.String containerDeveloperAccessNetwork) { + this.containerDeveloperAccessNetwork = containerDeveloperAccessNetwork; + } + public java.lang.String getContainerDeveloperAccessNetwork() { + return this.containerDeveloperAccessNetwork; + } + + public java.lang.String containerStorageNetwork; + public void setContainerStorageNetwork(java.lang.String containerStorageNetwork) { + this.containerStorageNetwork = containerStorageNetwork; + } + public java.lang.String getContainerStorageNetwork() { + return this.containerStorageNetwork; + } + + public java.lang.String businessGatewayUuid; + public void setBusinessGatewayUuid(java.lang.String businessGatewayUuid) { + this.businessGatewayUuid = businessGatewayUuid; + } + public java.lang.String getBusinessGatewayUuid() { + return this.businessGatewayUuid; + } + + public java.lang.String developerAccessGatewayUuid; + public void setDeveloperAccessGatewayUuid(java.lang.String developerAccessGatewayUuid) { + this.developerAccessGatewayUuid = developerAccessGatewayUuid; + } + public java.lang.String getDeveloperAccessGatewayUuid() { + return this.developerAccessGatewayUuid; + } + + public boolean defaultProfile; + public void setDefaultProfile(boolean defaultProfile) { + this.defaultProfile = defaultProfile; + } + public boolean getDefaultProfile() { + return this.defaultProfile; + } + + public java.lang.String status; + public void setStatus(java.lang.String status) { + this.status = status; + } + public java.lang.String getStatus() { + return this.status; + } + + public java.sql.Timestamp createDate; + public void setCreateDate(java.sql.Timestamp createDate) { + this.createDate = createDate; + } + public java.sql.Timestamp getCreateDate() { + return this.createDate; + } + + public java.sql.Timestamp lastOpDate; + public void setLastOpDate(java.sql.Timestamp lastOpDate) { + this.lastOpDate = lastOpDate; + } + public java.sql.Timestamp getLastOpDate() { + return this.lastOpDate; + } + +} diff --git a/sdk/src/main/java/org/zstack/sdk/ModelServiceInstanceGroupInventory.java b/sdk/src/main/java/org/zstack/sdk/ModelServiceInstanceGroupInventory.java index 7e594109096..632d0373509 100644 --- a/sdk/src/main/java/org/zstack/sdk/ModelServiceInstanceGroupInventory.java +++ b/sdk/src/main/java/org/zstack/sdk/ModelServiceInstanceGroupInventory.java @@ -132,4 +132,60 @@ public java.lang.String getExportPath() { return this.exportPath; } + public java.lang.String businessNetworkProfileUuid; + public void setBusinessNetworkProfileUuid(java.lang.String businessNetworkProfileUuid) { + this.businessNetworkProfileUuid = businessNetworkProfileUuid; + } + public java.lang.String getBusinessNetworkProfileUuid() { + return this.businessNetworkProfileUuid; + } + + public java.lang.String businessGatewayUuid; + public void setBusinessGatewayUuid(java.lang.String businessGatewayUuid) { + this.businessGatewayUuid = businessGatewayUuid; + } + public java.lang.String getBusinessGatewayUuid() { + return this.businessGatewayUuid; + } + + public java.lang.String developerAccessGatewayUuid; + public void setDeveloperAccessGatewayUuid(java.lang.String developerAccessGatewayUuid) { + this.developerAccessGatewayUuid = developerAccessGatewayUuid; + } + public java.lang.String getDeveloperAccessGatewayUuid() { + return this.developerAccessGatewayUuid; + } + + public java.lang.String businessEndpoint; + public void setBusinessEndpoint(java.lang.String businessEndpoint) { + this.businessEndpoint = businessEndpoint; + } + public java.lang.String getBusinessEndpoint() { + return this.businessEndpoint; + } + + public java.lang.String developerEndpoint; + public void setDeveloperEndpoint(java.lang.String developerEndpoint) { + this.developerEndpoint = developerEndpoint; + } + public java.lang.String getDeveloperEndpoint() { + return this.developerEndpoint; + } + + public java.lang.String managementEndpoint; + public void setManagementEndpoint(java.lang.String managementEndpoint) { + this.managementEndpoint = managementEndpoint; + } + public java.lang.String getManagementEndpoint() { + return this.managementEndpoint; + } + + public java.lang.String businessEndpointStatus; + public void setBusinessEndpointStatus(java.lang.String businessEndpointStatus) { + this.businessEndpointStatus = businessEndpointStatus; + } + public java.lang.String getBusinessEndpointStatus() { + return this.businessEndpointStatus; + } + } diff --git a/sdk/src/main/java/org/zstack/sdk/ModelServiceTemplateInventory.java b/sdk/src/main/java/org/zstack/sdk/ModelServiceTemplateInventory.java index 04278cd76d4..e615c0fae4c 100644 --- a/sdk/src/main/java/org/zstack/sdk/ModelServiceTemplateInventory.java +++ b/sdk/src/main/java/org/zstack/sdk/ModelServiceTemplateInventory.java @@ -20,6 +20,14 @@ public java.lang.String getModelServiceUuid() { return this.modelServiceUuid; } + public java.lang.String name; + public void setName(java.lang.String name) { + this.name = name; + } + public java.lang.String getName() { + return this.name; + } + public java.lang.String cpuArchitecture; public void setCpuArchitecture(java.lang.String cpuArchitecture) { this.cpuArchitecture = cpuArchitecture; @@ -44,6 +52,30 @@ public java.lang.String getDockerImage() { return this.dockerImage; } + public java.lang.String gpuVendor; + public void setGpuVendor(java.lang.String gpuVendor) { + this.gpuVendor = gpuVendor; + } + public java.lang.String getGpuVendor() { + return this.gpuVendor; + } + + public java.lang.String acceleratorType; + public void setAcceleratorType(java.lang.String acceleratorType) { + this.acceleratorType = acceleratorType; + } + public java.lang.String getAcceleratorType() { + return this.acceleratorType; + } + + public java.lang.String imageNamePattern; + public void setImageNamePattern(java.lang.String imageNamePattern) { + this.imageNamePattern = imageNamePattern; + } + public java.lang.String getImageNamePattern() { + return this.imageNamePattern; + } + public java.sql.Timestamp createDate; public void setCreateDate(java.sql.Timestamp createDate) { this.createDate = createDate; diff --git a/sdk/src/main/java/org/zstack/sdk/QueryAIBusinessGatewayAction.java b/sdk/src/main/java/org/zstack/sdk/QueryAIBusinessGatewayAction.java new file mode 100644 index 00000000000..c63962d8b8a --- /dev/null +++ b/sdk/src/main/java/org/zstack/sdk/QueryAIBusinessGatewayAction.java @@ -0,0 +1,75 @@ +package org.zstack.sdk; + +import java.util.HashMap; +import java.util.Map; +import org.zstack.sdk.*; + +public class QueryAIBusinessGatewayAction extends QueryAction { + + private static final HashMap parameterMap = new HashMap<>(); + + private static final HashMap nonAPIParameterMap = new HashMap<>(); + + public static class Result { + public ErrorCode error; + public org.zstack.sdk.QueryAIBusinessGatewayResult value; + + public Result throwExceptionIfError() { + if (error != null) { + throw new ApiException( + String.format("error[code: %s, description: %s, details: %s, globalErrorCode: %s]", error.code, error.description, error.details, error.globalErrorCode) + ); + } + + return this; + } + } + + + + private Result makeResult(ApiResult res) { + Result ret = new Result(); + if (res.error != null) { + ret.error = res.error; + return ret; + } + + org.zstack.sdk.QueryAIBusinessGatewayResult value = res.getResult(org.zstack.sdk.QueryAIBusinessGatewayResult.class); + ret.value = value == null ? new org.zstack.sdk.QueryAIBusinessGatewayResult() : value; + + return ret; + } + + public Result call() { + ApiResult res = ZSClient.call(this); + return makeResult(res); + } + + public void call(final Completion completion) { + ZSClient.call(this, new InternalCompletion() { + @Override + public void complete(ApiResult res) { + completion.complete(makeResult(res)); + } + }); + } + + protected Map getParameterMap() { + return parameterMap; + } + + protected Map getNonAPIParameterMap() { + return nonAPIParameterMap; + } + + protected RestInfo getRestInfo() { + RestInfo info = new RestInfo(); + info.httpMethod = "GET"; + info.path = "/ai/business-gateways"; + info.needSession = true; + info.needPoll = false; + info.parameterName = ""; + return info; + } + +} diff --git a/sdk/src/main/java/org/zstack/sdk/QueryAIBusinessGatewayOfferingAction.java b/sdk/src/main/java/org/zstack/sdk/QueryAIBusinessGatewayOfferingAction.java new file mode 100644 index 00000000000..359718773de --- /dev/null +++ b/sdk/src/main/java/org/zstack/sdk/QueryAIBusinessGatewayOfferingAction.java @@ -0,0 +1,75 @@ +package org.zstack.sdk; + +import java.util.HashMap; +import java.util.Map; +import org.zstack.sdk.*; + +public class QueryAIBusinessGatewayOfferingAction extends QueryAction { + + private static final HashMap parameterMap = new HashMap<>(); + + private static final HashMap nonAPIParameterMap = new HashMap<>(); + + public static class Result { + public ErrorCode error; + public org.zstack.sdk.QueryAIBusinessGatewayOfferingResult value; + + public Result throwExceptionIfError() { + if (error != null) { + throw new ApiException( + String.format("error[code: %s, description: %s, details: %s, globalErrorCode: %s]", error.code, error.description, error.details, error.globalErrorCode) + ); + } + + return this; + } + } + + + + private Result makeResult(ApiResult res) { + Result ret = new Result(); + if (res.error != null) { + ret.error = res.error; + return ret; + } + + org.zstack.sdk.QueryAIBusinessGatewayOfferingResult value = res.getResult(org.zstack.sdk.QueryAIBusinessGatewayOfferingResult.class); + ret.value = value == null ? new org.zstack.sdk.QueryAIBusinessGatewayOfferingResult() : value; + + return ret; + } + + public Result call() { + ApiResult res = ZSClient.call(this); + return makeResult(res); + } + + public void call(final Completion completion) { + ZSClient.call(this, new InternalCompletion() { + @Override + public void complete(ApiResult res) { + completion.complete(makeResult(res)); + } + }); + } + + protected Map getParameterMap() { + return parameterMap; + } + + protected Map getNonAPIParameterMap() { + return nonAPIParameterMap; + } + + protected RestInfo getRestInfo() { + RestInfo info = new RestInfo(); + info.httpMethod = "GET"; + info.path = "/ai/business-gateway-offerings"; + info.needSession = true; + info.needPoll = false; + info.parameterName = ""; + return info; + } + +} diff --git a/sdk/src/main/java/org/zstack/sdk/QueryAIBusinessGatewayOfferingResult.java b/sdk/src/main/java/org/zstack/sdk/QueryAIBusinessGatewayOfferingResult.java new file mode 100644 index 00000000000..7bf63cd5b10 --- /dev/null +++ b/sdk/src/main/java/org/zstack/sdk/QueryAIBusinessGatewayOfferingResult.java @@ -0,0 +1,22 @@ +package org.zstack.sdk; + + + +public class QueryAIBusinessGatewayOfferingResult { + public java.util.List inventories; + public void setInventories(java.util.List inventories) { + this.inventories = inventories; + } + public java.util.List getInventories() { + return this.inventories; + } + + public java.lang.Long total; + public void setTotal(java.lang.Long total) { + this.total = total; + } + public java.lang.Long getTotal() { + return this.total; + } + +} diff --git a/sdk/src/main/java/org/zstack/sdk/QueryAIBusinessGatewayResult.java b/sdk/src/main/java/org/zstack/sdk/QueryAIBusinessGatewayResult.java new file mode 100644 index 00000000000..1fad63a0b6a --- /dev/null +++ b/sdk/src/main/java/org/zstack/sdk/QueryAIBusinessGatewayResult.java @@ -0,0 +1,22 @@ +package org.zstack.sdk; + + + +public class QueryAIBusinessGatewayResult { + public java.util.List inventories; + public void setInventories(java.util.List inventories) { + this.inventories = inventories; + } + public java.util.List getInventories() { + return this.inventories; + } + + public java.lang.Long total; + public void setTotal(java.lang.Long total) { + this.total = total; + } + public java.lang.Long getTotal() { + return this.total; + } + +} diff --git a/sdk/src/main/java/org/zstack/sdk/QueryAiHostModelCacheAction.java b/sdk/src/main/java/org/zstack/sdk/QueryAiHostModelCacheAction.java new file mode 100644 index 00000000000..26217b8ba58 --- /dev/null +++ b/sdk/src/main/java/org/zstack/sdk/QueryAiHostModelCacheAction.java @@ -0,0 +1,75 @@ +package org.zstack.sdk; + +import java.util.HashMap; +import java.util.Map; +import org.zstack.sdk.*; + +public class QueryAiHostModelCacheAction extends QueryAction { + + private static final HashMap parameterMap = new HashMap<>(); + + private static final HashMap nonAPIParameterMap = new HashMap<>(); + + public static class Result { + public ErrorCode error; + public org.zstack.sdk.QueryAiHostModelCacheResult value; + + public Result throwExceptionIfError() { + if (error != null) { + throw new ApiException( + String.format("error[code: %s, description: %s, details: %s, globalErrorCode: %s]", error.code, error.description, error.details, error.globalErrorCode) + ); + } + + return this; + } + } + + + + private Result makeResult(ApiResult res) { + Result ret = new Result(); + if (res.error != null) { + ret.error = res.error; + return ret; + } + + org.zstack.sdk.QueryAiHostModelCacheResult value = res.getResult(org.zstack.sdk.QueryAiHostModelCacheResult.class); + ret.value = value == null ? new org.zstack.sdk.QueryAiHostModelCacheResult() : value; + + return ret; + } + + public Result call() { + ApiResult res = ZSClient.call(this); + return makeResult(res); + } + + public void call(final Completion completion) { + ZSClient.call(this, new InternalCompletion() { + @Override + public void complete(ApiResult res) { + completion.complete(makeResult(res)); + } + }); + } + + protected Map getParameterMap() { + return parameterMap; + } + + protected Map getNonAPIParameterMap() { + return nonAPIParameterMap; + } + + protected RestInfo getRestInfo() { + RestInfo info = new RestInfo(); + info.httpMethod = "GET"; + info.path = "/ai/host-model-caches"; + info.needSession = true; + info.needPoll = false; + info.parameterName = ""; + return info; + } + +} diff --git a/sdk/src/main/java/org/zstack/sdk/QueryAiHostModelCacheResult.java b/sdk/src/main/java/org/zstack/sdk/QueryAiHostModelCacheResult.java new file mode 100644 index 00000000000..8d5c39bdfe9 --- /dev/null +++ b/sdk/src/main/java/org/zstack/sdk/QueryAiHostModelCacheResult.java @@ -0,0 +1,22 @@ +package org.zstack.sdk; + + + +public class QueryAiHostModelCacheResult { + public java.util.List inventories; + public void setInventories(java.util.List inventories) { + this.inventories = inventories; + } + public java.util.List getInventories() { + return this.inventories; + } + + public java.lang.Long total; + public void setTotal(java.lang.Long total) { + this.total = total; + } + public java.lang.Long getTotal() { + return this.total; + } + +} diff --git a/sdk/src/main/java/org/zstack/sdk/QueryModelCenterBusinessNetworkProfileAction.java b/sdk/src/main/java/org/zstack/sdk/QueryModelCenterBusinessNetworkProfileAction.java new file mode 100644 index 00000000000..3e7d7b5c1e8 --- /dev/null +++ b/sdk/src/main/java/org/zstack/sdk/QueryModelCenterBusinessNetworkProfileAction.java @@ -0,0 +1,75 @@ +package org.zstack.sdk; + +import java.util.HashMap; +import java.util.Map; +import org.zstack.sdk.*; + +public class QueryModelCenterBusinessNetworkProfileAction extends QueryAction { + + private static final HashMap parameterMap = new HashMap<>(); + + private static final HashMap nonAPIParameterMap = new HashMap<>(); + + public static class Result { + public ErrorCode error; + public org.zstack.sdk.QueryModelCenterBusinessNetworkProfileResult value; + + public Result throwExceptionIfError() { + if (error != null) { + throw new ApiException( + String.format("error[code: %s, description: %s, details: %s, globalErrorCode: %s]", error.code, error.description, error.details, error.globalErrorCode) + ); + } + + return this; + } + } + + + + private Result makeResult(ApiResult res) { + Result ret = new Result(); + if (res.error != null) { + ret.error = res.error; + return ret; + } + + org.zstack.sdk.QueryModelCenterBusinessNetworkProfileResult value = res.getResult(org.zstack.sdk.QueryModelCenterBusinessNetworkProfileResult.class); + ret.value = value == null ? new org.zstack.sdk.QueryModelCenterBusinessNetworkProfileResult() : value; + + return ret; + } + + public Result call() { + ApiResult res = ZSClient.call(this); + return makeResult(res); + } + + public void call(final Completion completion) { + ZSClient.call(this, new InternalCompletion() { + @Override + public void complete(ApiResult res) { + completion.complete(makeResult(res)); + } + }); + } + + protected Map getParameterMap() { + return parameterMap; + } + + protected Map getNonAPIParameterMap() { + return nonAPIParameterMap; + } + + protected RestInfo getRestInfo() { + RestInfo info = new RestInfo(); + info.httpMethod = "GET"; + info.path = "/ai/model-center-business-network-profiles"; + info.needSession = true; + info.needPoll = false; + info.parameterName = ""; + return info; + } + +} diff --git a/sdk/src/main/java/org/zstack/sdk/QueryModelCenterBusinessNetworkProfileResult.java b/sdk/src/main/java/org/zstack/sdk/QueryModelCenterBusinessNetworkProfileResult.java new file mode 100644 index 00000000000..bf6849c9188 --- /dev/null +++ b/sdk/src/main/java/org/zstack/sdk/QueryModelCenterBusinessNetworkProfileResult.java @@ -0,0 +1,22 @@ +package org.zstack.sdk; + + + +public class QueryModelCenterBusinessNetworkProfileResult { + public java.util.List inventories; + public void setInventories(java.util.List inventories) { + this.inventories = inventories; + } + public java.util.List getInventories() { + return this.inventories; + } + + public java.lang.Long total; + public void setTotal(java.lang.Long total) { + this.total = total; + } + public java.lang.Long getTotal() { + return this.total; + } + +} diff --git a/sdk/src/main/java/org/zstack/sdk/RefreshAiHostModelCacheAction.java b/sdk/src/main/java/org/zstack/sdk/RefreshAiHostModelCacheAction.java new file mode 100644 index 00000000000..6e86b554f39 --- /dev/null +++ b/sdk/src/main/java/org/zstack/sdk/RefreshAiHostModelCacheAction.java @@ -0,0 +1,95 @@ +package org.zstack.sdk; + +import java.util.HashMap; +import java.util.Map; +import org.zstack.sdk.*; + +public class RefreshAiHostModelCacheAction extends AbstractAction { + + private static final HashMap parameterMap = new HashMap<>(); + + private static final HashMap nonAPIParameterMap = new HashMap<>(); + + public static class Result { + public ErrorCode error; + public org.zstack.sdk.RefreshAiHostModelCacheResult value; + + public Result throwExceptionIfError() { + if (error != null) { + throw new ApiException( + String.format("error[code: %s, description: %s, details: %s, globalErrorCode: %s]", error.code, error.description, error.details, error.globalErrorCode) + ); + } + + return this; + } + } + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.util.List hostUuids; + + @Param(required = false) + public java.util.List systemTags; + + @Param(required = false) + public java.util.List userTags; + + @Param(required = false) + public String sessionId; + + @Param(required = false) + public String accessKeyId; + + @Param(required = false) + public String accessKeySecret; + + @Param(required = false) + public String requestIp; + + + private Result makeResult(ApiResult res) { + Result ret = new Result(); + if (res.error != null) { + ret.error = res.error; + return ret; + } + + org.zstack.sdk.RefreshAiHostModelCacheResult value = res.getResult(org.zstack.sdk.RefreshAiHostModelCacheResult.class); + ret.value = value == null ? new org.zstack.sdk.RefreshAiHostModelCacheResult() : value; + + return ret; + } + + public Result call() { + ApiResult res = ZSClient.call(this); + return makeResult(res); + } + + public void call(final Completion completion) { + ZSClient.call(this, new InternalCompletion() { + @Override + public void complete(ApiResult res) { + completion.complete(makeResult(res)); + } + }); + } + + protected Map getParameterMap() { + return parameterMap; + } + + protected Map getNonAPIParameterMap() { + return nonAPIParameterMap; + } + + protected RestInfo getRestInfo() { + RestInfo info = new RestInfo(); + info.httpMethod = "PUT"; + info.path = "/ai/host-model-caches/actions"; + info.needSession = true; + info.needPoll = false; + info.parameterName = "refreshAiHostModelCache"; + return info; + } + +} diff --git a/sdk/src/main/java/org/zstack/sdk/RefreshAiHostModelCacheResult.java b/sdk/src/main/java/org/zstack/sdk/RefreshAiHostModelCacheResult.java new file mode 100644 index 00000000000..a869d0c4535 --- /dev/null +++ b/sdk/src/main/java/org/zstack/sdk/RefreshAiHostModelCacheResult.java @@ -0,0 +1,22 @@ +package org.zstack.sdk; + + + +public class RefreshAiHostModelCacheResult { + public java.util.List inventories; + public void setInventories(java.util.List inventories) { + this.inventories = inventories; + } + public java.util.List getInventories() { + return this.inventories; + } + + public java.util.List failureReasons; + public void setFailureReasons(java.util.List failureReasons) { + this.failureReasons = failureReasons; + } + public java.util.List getFailureReasons() { + return this.failureReasons; + } + +} diff --git a/sdk/src/main/java/org/zstack/sdk/UpdateAIBusinessGatewayOfferingAction.java b/sdk/src/main/java/org/zstack/sdk/UpdateAIBusinessGatewayOfferingAction.java new file mode 100644 index 00000000000..c5f17360e47 --- /dev/null +++ b/sdk/src/main/java/org/zstack/sdk/UpdateAIBusinessGatewayOfferingAction.java @@ -0,0 +1,128 @@ +package org.zstack.sdk; + +import java.util.HashMap; +import java.util.Map; +import org.zstack.sdk.*; + +public class UpdateAIBusinessGatewayOfferingAction extends AbstractAction { + + private static final HashMap parameterMap = new HashMap<>(); + + private static final HashMap nonAPIParameterMap = new HashMap<>(); + + public static class Result { + public ErrorCode error; + public org.zstack.sdk.UpdateAIBusinessGatewayOfferingResult value; + + public Result throwExceptionIfError() { + if (error != null) { + throw new ApiException( + String.format("error[code: %s, description: %s, details: %s, globalErrorCode: %s]", error.code, error.description, error.details, error.globalErrorCode) + ); + } + + return this; + } + } + + @Param(required = true, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String uuid; + + @Param(required = false, maxLength = 255, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String name; + + @Param(required = false, maxLength = 2048, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String description; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String imageUuid; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String instanceOfferingUuid; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String managementNetworkUuid; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String businessNetworkUuid; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String developerAccessNetworkUuid; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, numberRange = {1L,65535L}, noTrim = false) + public java.lang.Integer agentPort; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, numberRange = {1L,65535L}, noTrim = false) + public java.lang.Integer listenerPort; + + @Param(required = false) + public java.util.List systemTags; + + @Param(required = false) + public java.util.List userTags; + + @Param(required = false) + public String sessionId; + + @Param(required = false) + public String accessKeyId; + + @Param(required = false) + public String accessKeySecret; + + @Param(required = false) + public String requestIp; + + @NonAPIParam + public long timeout = -1; + + @NonAPIParam + public long pollingInterval = -1; + + + private Result makeResult(ApiResult res) { + Result ret = new Result(); + if (res.error != null) { + ret.error = res.error; + return ret; + } + + org.zstack.sdk.UpdateAIBusinessGatewayOfferingResult value = res.getResult(org.zstack.sdk.UpdateAIBusinessGatewayOfferingResult.class); + ret.value = value == null ? new org.zstack.sdk.UpdateAIBusinessGatewayOfferingResult() : value; + + return ret; + } + + public Result call() { + ApiResult res = ZSClient.call(this); + return makeResult(res); + } + + public void call(final Completion completion) { + ZSClient.call(this, new InternalCompletion() { + @Override + public void complete(ApiResult res) { + completion.complete(makeResult(res)); + } + }); + } + + protected Map getParameterMap() { + return parameterMap; + } + + protected Map getNonAPIParameterMap() { + return nonAPIParameterMap; + } + + protected RestInfo getRestInfo() { + RestInfo info = new RestInfo(); + info.httpMethod = "PUT"; + info.path = "/ai/business-gateway-offerings/{uuid}"; + info.needSession = true; + info.needPoll = true; + info.parameterName = "updateAIBusinessGatewayOffering"; + return info; + } + +} diff --git a/sdk/src/main/java/org/zstack/sdk/UpdateAIBusinessGatewayOfferingResult.java b/sdk/src/main/java/org/zstack/sdk/UpdateAIBusinessGatewayOfferingResult.java new file mode 100644 index 00000000000..98063c1f1dc --- /dev/null +++ b/sdk/src/main/java/org/zstack/sdk/UpdateAIBusinessGatewayOfferingResult.java @@ -0,0 +1,14 @@ +package org.zstack.sdk; + +import org.zstack.sdk.AIBusinessGatewayOfferingInventory; + +public class UpdateAIBusinessGatewayOfferingResult { + public AIBusinessGatewayOfferingInventory inventory; + public void setInventory(AIBusinessGatewayOfferingInventory inventory) { + this.inventory = inventory; + } + public AIBusinessGatewayOfferingInventory getInventory() { + return this.inventory; + } + +} diff --git a/sdk/src/main/java/org/zstack/sdk/UpdateAiHostModelCachePolicyAction.java b/sdk/src/main/java/org/zstack/sdk/UpdateAiHostModelCachePolicyAction.java new file mode 100644 index 00000000000..d4c5f676d69 --- /dev/null +++ b/sdk/src/main/java/org/zstack/sdk/UpdateAiHostModelCachePolicyAction.java @@ -0,0 +1,122 @@ +package org.zstack.sdk; + +import java.util.HashMap; +import java.util.Map; +import org.zstack.sdk.*; + +public class UpdateAiHostModelCachePolicyAction extends AbstractAction { + + private static final HashMap parameterMap = new HashMap<>(); + + private static final HashMap nonAPIParameterMap = new HashMap<>(); + + public static class Result { + public ErrorCode error; + public org.zstack.sdk.UpdateAiHostModelCachePolicyResult value; + + public Result throwExceptionIfError() { + if (error != null) { + throw new ApiException( + String.format("error[code: %s, description: %s, details: %s, globalErrorCode: %s]", error.code, error.description, error.details, error.globalErrorCode) + ); + } + + return this; + } + } + + @Param(required = true, nonempty = true, nullElements = false, emptyString = false, noTrim = false) + public java.lang.String hostUuid; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String sourceRoot; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String primaryStorageUuid; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.Boolean enabled; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.Long maxSizeBytes; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, numberRange = {0L,100L}, noTrim = false) + public java.lang.Integer highWatermarkPercent; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, numberRange = {0L,100L}, noTrim = false) + public java.lang.Integer lowWatermarkPercent; + + @Param(required = false, maxLength = 1024, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String disabledReason; + + @Param(required = false) + public java.util.List systemTags; + + @Param(required = false) + public java.util.List userTags; + + @Param(required = false) + public String sessionId; + + @Param(required = false) + public String accessKeyId; + + @Param(required = false) + public String accessKeySecret; + + @Param(required = false) + public String requestIp; + + @NonAPIParam + public long timeout = -1; + + @NonAPIParam + public long pollingInterval = -1; + + + private Result makeResult(ApiResult res) { + Result ret = new Result(); + if (res.error != null) { + ret.error = res.error; + return ret; + } + + org.zstack.sdk.UpdateAiHostModelCachePolicyResult value = res.getResult(org.zstack.sdk.UpdateAiHostModelCachePolicyResult.class); + ret.value = value == null ? new org.zstack.sdk.UpdateAiHostModelCachePolicyResult() : value; + + return ret; + } + + public Result call() { + ApiResult res = ZSClient.call(this); + return makeResult(res); + } + + public void call(final Completion completion) { + ZSClient.call(this, new InternalCompletion() { + @Override + public void complete(ApiResult res) { + completion.complete(makeResult(res)); + } + }); + } + + protected Map getParameterMap() { + return parameterMap; + } + + protected Map getNonAPIParameterMap() { + return nonAPIParameterMap; + } + + protected RestInfo getRestInfo() { + RestInfo info = new RestInfo(); + info.httpMethod = "PUT"; + info.path = "/ai/host-model-cache-policies/{hostUuid}/actions"; + info.needSession = true; + info.needPoll = true; + info.parameterName = "updateAiHostModelCachePolicy"; + return info; + } + +} diff --git a/sdk/src/main/java/org/zstack/sdk/UpdateAiHostModelCachePolicyResult.java b/sdk/src/main/java/org/zstack/sdk/UpdateAiHostModelCachePolicyResult.java new file mode 100644 index 00000000000..9e2b2870009 --- /dev/null +++ b/sdk/src/main/java/org/zstack/sdk/UpdateAiHostModelCachePolicyResult.java @@ -0,0 +1,14 @@ +package org.zstack.sdk; + +import org.zstack.sdk.AiHostModelCachePolicyInventory; + +public class UpdateAiHostModelCachePolicyResult { + public AiHostModelCachePolicyInventory inventory; + public void setInventory(AiHostModelCachePolicyInventory inventory) { + this.inventory = inventory; + } + public AiHostModelCachePolicyInventory getInventory() { + return this.inventory; + } + +} diff --git a/sdk/src/main/java/org/zstack/sdk/UpdateModelCenterBusinessNetworkProfileAction.java b/sdk/src/main/java/org/zstack/sdk/UpdateModelCenterBusinessNetworkProfileAction.java new file mode 100644 index 00000000000..7ddb3b2de83 --- /dev/null +++ b/sdk/src/main/java/org/zstack/sdk/UpdateModelCenterBusinessNetworkProfileAction.java @@ -0,0 +1,155 @@ +package org.zstack.sdk; + +import java.util.HashMap; +import java.util.Map; +import org.zstack.sdk.*; + +public class UpdateModelCenterBusinessNetworkProfileAction extends AbstractAction { + + private static final HashMap parameterMap = new HashMap<>(); + + private static final HashMap nonAPIParameterMap = new HashMap<>(); + + public static class Result { + public ErrorCode error; + public org.zstack.sdk.UpdateModelCenterBusinessNetworkProfileResult value; + + public Result throwExceptionIfError() { + if (error != null) { + throw new ApiException( + String.format("error[code: %s, description: %s, details: %s, globalErrorCode: %s]", error.code, error.description, error.details, error.globalErrorCode) + ); + } + + return this; + } + } + + @Param(required = true, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String uuid; + + @Param(required = false, maxLength = 255, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String name; + + @Param(required = false, maxLength = 2048, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String description; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String zoneUuid; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String clusterUuid; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String nativeClusterUuid; + + @Param(required = false, validValues = {"VirtualMachine","Container"}, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String backendType; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String modelServiceNetworkUuid; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String developerAccessNetworkUuid; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String storageNetworkUuid; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String containerNetwork; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String containerDeveloperAccessNetwork; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String containerStorageNetwork; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.Boolean defaultProfile; + + @Param(required = false, validValues = {"Enabled","Disabled","Error"}, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String status; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String gatewayScheme; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String gatewayAddress; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, numberRange = {1L,65535L}, noTrim = false) + public java.lang.Integer gatewayPort; + + @Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false) + public java.lang.String gatewayManagementAddress; + + @Param(required = false) + public java.util.List systemTags; + + @Param(required = false) + public java.util.List userTags; + + @Param(required = false) + public String sessionId; + + @Param(required = false) + public String accessKeyId; + + @Param(required = false) + public String accessKeySecret; + + @Param(required = false) + public String requestIp; + + @NonAPIParam + public long timeout = -1; + + @NonAPIParam + public long pollingInterval = -1; + + + private Result makeResult(ApiResult res) { + Result ret = new Result(); + if (res.error != null) { + ret.error = res.error; + return ret; + } + + org.zstack.sdk.UpdateModelCenterBusinessNetworkProfileResult value = res.getResult(org.zstack.sdk.UpdateModelCenterBusinessNetworkProfileResult.class); + ret.value = value == null ? new org.zstack.sdk.UpdateModelCenterBusinessNetworkProfileResult() : value; + + return ret; + } + + public Result call() { + ApiResult res = ZSClient.call(this); + return makeResult(res); + } + + public void call(final Completion completion) { + ZSClient.call(this, new InternalCompletion() { + @Override + public void complete(ApiResult res) { + completion.complete(makeResult(res)); + } + }); + } + + protected Map getParameterMap() { + return parameterMap; + } + + protected Map getNonAPIParameterMap() { + return nonAPIParameterMap; + } + + protected RestInfo getRestInfo() { + RestInfo info = new RestInfo(); + info.httpMethod = "PUT"; + info.path = "/ai/model-center-business-network-profiles/{uuid}"; + info.needSession = true; + info.needPoll = true; + info.parameterName = "updateModelCenterBusinessNetworkProfile"; + return info; + } + +} diff --git a/sdk/src/main/java/org/zstack/sdk/UpdateModelCenterBusinessNetworkProfileResult.java b/sdk/src/main/java/org/zstack/sdk/UpdateModelCenterBusinessNetworkProfileResult.java new file mode 100644 index 00000000000..426df0af277 --- /dev/null +++ b/sdk/src/main/java/org/zstack/sdk/UpdateModelCenterBusinessNetworkProfileResult.java @@ -0,0 +1,14 @@ +package org.zstack.sdk; + +import org.zstack.sdk.ModelCenterBusinessNetworkProfileInventory; + +public class UpdateModelCenterBusinessNetworkProfileResult { + public ModelCenterBusinessNetworkProfileInventory inventory; + public void setInventory(ModelCenterBusinessNetworkProfileInventory inventory) { + this.inventory = inventory; + } + public ModelCenterBusinessNetworkProfileInventory getInventory() { + return this.inventory; + } + +} diff --git a/sdk/src/main/java/org/zstack/sdk/VmModelMountInventory.java b/sdk/src/main/java/org/zstack/sdk/VmModelMountInventory.java index e328b9292b4..3ba54b88f0d 100644 --- a/sdk/src/main/java/org/zstack/sdk/VmModelMountInventory.java +++ b/sdk/src/main/java/org/zstack/sdk/VmModelMountInventory.java @@ -52,6 +52,14 @@ public java.lang.String getSourcePath() { return this.sourcePath; } + public java.lang.String cacheUuid; + public void setCacheUuid(java.lang.String cacheUuid) { + this.cacheUuid = cacheUuid; + } + public java.lang.String getCacheUuid() { + return this.cacheUuid; + } + public VmModelMountStatus status; public void setStatus(VmModelMountStatus status) { this.status = status; diff --git a/testlib/src/main/java/org/zstack/testlib/ApiHelper.groovy b/testlib/src/main/java/org/zstack/testlib/ApiHelper.groovy index 1d4b6e55847..194f5e0937c 100644 --- a/testlib/src/main/java/org/zstack/testlib/ApiHelper.groovy +++ b/testlib/src/main/java/org/zstack/testlib/ApiHelper.groovy @@ -319,7 +319,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -557,6 +559,33 @@ abstract class ApiHelper { } + def addAIBusinessGatewayOffering(@DelegatesTo(strategy = Closure.OWNER_FIRST, value = org.zstack.sdk.AddAIBusinessGatewayOfferingAction.class) Closure c) { + def a = new org.zstack.sdk.AddAIBusinessGatewayOfferingAction() + a.sessionId = Test.currentEnvSpec?.session?.uuid + c.resolveStrategy = Closure.OWNER_FIRST + c.delegate = a + c() + + + if (System.getProperty("apipath") != null) { + if (a.apiId == null) { + a.apiId = Platform.uuid + } + + def tracker = new ApiPathTracker(a.apiId) + def out = errorOut(a.call()) + def path = tracker.getApiPath() + if (!path.isEmpty()) { + Test.apiPaths[a.class.name] = path.join(" --->\n") + } + + return out + } else { + return errorOut(a.call()) + } + } + + def addAccessControlListEntry(@DelegatesTo(strategy = Closure.OWNER_FIRST, value = org.zstack.sdk.AddAccessControlListEntryAction.class) Closure c) { def a = new org.zstack.sdk.AddAccessControlListEntryAction() a.sessionId = Test.currentEnvSpec?.session?.uuid @@ -2204,6 +2233,33 @@ abstract class ApiHelper { } + def addModelCenterBusinessNetworkProfile(@DelegatesTo(strategy = Closure.OWNER_FIRST, value = org.zstack.sdk.AddModelCenterBusinessNetworkProfileAction.class) Closure c) { + def a = new org.zstack.sdk.AddModelCenterBusinessNetworkProfileAction() + a.sessionId = Test.currentEnvSpec?.session?.uuid + c.resolveStrategy = Closure.OWNER_FIRST + c.delegate = a + c() + + + if (System.getProperty("apipath") != null) { + if (a.apiId == null) { + a.apiId = Platform.uuid + } + + def tracker = new ApiPathTracker(a.apiId) + def out = errorOut(a.call()) + def path = tracker.getApiPath() + if (!path.isEmpty()) { + Test.apiPaths[a.class.name] = path.join(" --->\n") + } + + return out + } else { + return errorOut(a.call()) + } + } + + def addModelService(@DelegatesTo(strategy = Closure.OWNER_FIRST, value = org.zstack.sdk.AddModelServiceAction.class) Closure c) { def a = new org.zstack.sdk.AddModelServiceAction() a.sessionId = Test.currentEnvSpec?.session?.uuid @@ -6146,6 +6202,33 @@ abstract class ApiHelper { } + def changeModelServiceInstanceGroupBusinessNetworkProfile(@DelegatesTo(strategy = Closure.OWNER_FIRST, value = org.zstack.sdk.ChangeModelServiceInstanceGroupBusinessNetworkProfileAction.class) Closure c) { + def a = new org.zstack.sdk.ChangeModelServiceInstanceGroupBusinessNetworkProfileAction() + a.sessionId = Test.currentEnvSpec?.session?.uuid + c.resolveStrategy = Closure.OWNER_FIRST + c.delegate = a + c() + + + if (System.getProperty("apipath") != null) { + if (a.apiId == null) { + a.apiId = Platform.uuid + } + + def tracker = new ApiPathTracker(a.apiId) + def out = errorOut(a.call()) + def path = tracker.getApiPath() + if (!path.isEmpty()) { + Test.apiPaths[a.class.name] = path.join(" --->\n") + } + + return out + } else { + return errorOut(a.call()) + } + } + + def changeMonitorTriggerStateAction(@DelegatesTo(strategy = Closure.OWNER_FIRST, value = org.zstack.sdk.ChangeMonitorTriggerActionStateAction.class) Closure c) { def a = new org.zstack.sdk.ChangeMonitorTriggerActionStateAction() a.sessionId = Test.currentEnvSpec?.session?.uuid @@ -7469,6 +7552,33 @@ abstract class ApiHelper { } + def cleanAiHostModelCache(@DelegatesTo(strategy = Closure.OWNER_FIRST, value = org.zstack.sdk.CleanAiHostModelCacheAction.class) Closure c) { + def a = new org.zstack.sdk.CleanAiHostModelCacheAction() + a.sessionId = Test.currentEnvSpec?.session?.uuid + c.resolveStrategy = Closure.OWNER_FIRST + c.delegate = a + c() + + + if (System.getProperty("apipath") != null) { + if (a.apiId == null) { + a.apiId = Platform.uuid + } + + def tracker = new ApiPathTracker(a.apiId) + def out = errorOut(a.call()) + def path = tracker.getApiPath() + if (!path.isEmpty()) { + Test.apiPaths[a.class.name] = path.join(" --->\n") + } + + return out + } else { + return errorOut(a.call()) + } + } + + def cleanInvalidLdapBinding(@DelegatesTo(strategy = Closure.OWNER_FIRST, value = org.zstack.sdk.CleanInvalidLdapBindingAction.class) Closure c) { def a = new org.zstack.sdk.CleanInvalidLdapBindingAction() a.sessionId = Test.currentEnvSpec?.session?.uuid @@ -12842,6 +12952,60 @@ abstract class ApiHelper { } + def deleteAIBusinessGateway(@DelegatesTo(strategy = Closure.OWNER_FIRST, value = org.zstack.sdk.DeleteAIBusinessGatewayAction.class) Closure c) { + def a = new org.zstack.sdk.DeleteAIBusinessGatewayAction() + a.sessionId = Test.currentEnvSpec?.session?.uuid + c.resolveStrategy = Closure.OWNER_FIRST + c.delegate = a + c() + + + if (System.getProperty("apipath") != null) { + if (a.apiId == null) { + a.apiId = Platform.uuid + } + + def tracker = new ApiPathTracker(a.apiId) + def out = errorOut(a.call()) + def path = tracker.getApiPath() + if (!path.isEmpty()) { + Test.apiPaths[a.class.name] = path.join(" --->\n") + } + + return out + } else { + return errorOut(a.call()) + } + } + + + def deleteAIBusinessGatewayOffering(@DelegatesTo(strategy = Closure.OWNER_FIRST, value = org.zstack.sdk.DeleteAIBusinessGatewayOfferingAction.class) Closure c) { + def a = new org.zstack.sdk.DeleteAIBusinessGatewayOfferingAction() + a.sessionId = Test.currentEnvSpec?.session?.uuid + c.resolveStrategy = Closure.OWNER_FIRST + c.delegate = a + c() + + + if (System.getProperty("apipath") != null) { + if (a.apiId == null) { + a.apiId = Platform.uuid + } + + def tracker = new ApiPathTracker(a.apiId) + def out = errorOut(a.call()) + def path = tracker.getApiPath() + if (!path.isEmpty()) { + Test.apiPaths[a.class.name] = path.join(" --->\n") + } + + return out + } else { + return errorOut(a.call()) + } + } + + def deleteAccessControlList(@DelegatesTo(strategy = Closure.OWNER_FIRST, value = org.zstack.sdk.DeleteAccessControlListAction.class) Closure c) { def a = new org.zstack.sdk.DeleteAccessControlListAction() a.sessionId = Test.currentEnvSpec?.session?.uuid @@ -15893,6 +16057,33 @@ abstract class ApiHelper { } + def deleteModelCenterBusinessNetworkProfile(@DelegatesTo(strategy = Closure.OWNER_FIRST, value = org.zstack.sdk.DeleteModelCenterBusinessNetworkProfileAction.class) Closure c) { + def a = new org.zstack.sdk.DeleteModelCenterBusinessNetworkProfileAction() + a.sessionId = Test.currentEnvSpec?.session?.uuid + c.resolveStrategy = Closure.OWNER_FIRST + c.delegate = a + c() + + + if (System.getProperty("apipath") != null) { + if (a.apiId == null) { + a.apiId = Platform.uuid + } + + def tracker = new ApiPathTracker(a.apiId) + def out = errorOut(a.call()) + def path = tracker.getApiPath() + if (!path.isEmpty()) { + Test.apiPaths[a.class.name] = path.join(" --->\n") + } + + return out + } else { + return errorOut(a.call()) + } + } + + def deleteModelEvaluationTask(@DelegatesTo(strategy = Closure.OWNER_FIRST, value = org.zstack.sdk.DeleteModelEvaluationTaskAction.class) Closure c) { def a = new org.zstack.sdk.DeleteModelEvaluationTaskAction() a.sessionId = Test.currentEnvSpec?.session?.uuid @@ -20996,6 +21187,33 @@ abstract class ApiHelper { } + def getAiHostModelCacheCapacity(@DelegatesTo(strategy = Closure.OWNER_FIRST, value = org.zstack.sdk.GetAiHostModelCacheCapacityAction.class) Closure c) { + def a = new org.zstack.sdk.GetAiHostModelCacheCapacityAction() + a.sessionId = Test.currentEnvSpec?.session?.uuid + c.resolveStrategy = Closure.OWNER_FIRST + c.delegate = a + c() + + + if (System.getProperty("apipath") != null) { + if (a.apiId == null) { + a.apiId = Platform.uuid + } + + def tracker = new ApiPathTracker(a.apiId) + def out = errorOut(a.call()) + def path = tracker.getApiPath() + if (!path.isEmpty()) { + Test.apiPaths[a.class.name] = path.join(" --->\n") + } + + return out + } else { + return errorOut(a.call()) + } + } + + def getAliyunNasAccessGroupRemote(@DelegatesTo(strategy = Closure.OWNER_FIRST, value = org.zstack.sdk.GetAliyunNasAccessGroupRemoteAction.class) Closure c) { def a = new org.zstack.sdk.GetAliyunNasAccessGroupRemoteAction() a.sessionId = Test.currentEnvSpec?.session?.uuid @@ -24425,6 +24643,33 @@ abstract class ApiHelper { } + def getModelServiceLaunchCommands(@DelegatesTo(strategy = Closure.OWNER_FIRST, value = org.zstack.sdk.GetModelServiceLaunchCommandsAction.class) Closure c) { + def a = new org.zstack.sdk.GetModelServiceLaunchCommandsAction() + a.sessionId = Test.currentEnvSpec?.session?.uuid + c.resolveStrategy = Closure.OWNER_FIRST + c.delegate = a + c() + + + if (System.getProperty("apipath") != null) { + if (a.apiId == null) { + a.apiId = Platform.uuid + } + + def tracker = new ApiPathTracker(a.apiId) + def out = errorOut(a.call()) + def path = tracker.getApiPath() + if (!path.isEmpty()) { + Test.apiPaths[a.class.name] = path.join(" --->\n") + } + + return out + } else { + return errorOut(a.call()) + } + } + + def getMonitorItem(@DelegatesTo(strategy = Closure.OWNER_FIRST, value = org.zstack.sdk.GetMonitorItemAction.class) Closure c) { def a = new org.zstack.sdk.GetMonitorItemAction() a.sessionId = Test.currentEnvSpec?.session?.uuid @@ -29042,14 +29287,16 @@ abstract class ApiHelper { } - def queryAccessControlList(@DelegatesTo(strategy = Closure.OWNER_FIRST, value = org.zstack.sdk.QueryAccessControlListAction.class) Closure c) { - def a = new org.zstack.sdk.QueryAccessControlListAction() + def queryAIBusinessGateway(@DelegatesTo(strategy = Closure.OWNER_FIRST, value = org.zstack.sdk.QueryAIBusinessGatewayAction.class) Closure c) { + def a = new org.zstack.sdk.QueryAIBusinessGatewayAction() a.sessionId = Test.currentEnvSpec?.session?.uuid c.resolveStrategy = Closure.OWNER_FIRST c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -29071,14 +29318,16 @@ abstract class ApiHelper { } - def queryAccessControlRule(@DelegatesTo(strategy = Closure.OWNER_FIRST, value = org.zstack.sdk.QueryAccessControlRuleAction.class) Closure c) { - def a = new org.zstack.sdk.QueryAccessControlRuleAction() + def queryAIBusinessGatewayOffering(@DelegatesTo(strategy = Closure.OWNER_FIRST, value = org.zstack.sdk.QueryAIBusinessGatewayOfferingAction.class) Closure c) { + def a = new org.zstack.sdk.QueryAIBusinessGatewayOfferingAction() a.sessionId = Test.currentEnvSpec?.session?.uuid c.resolveStrategy = Closure.OWNER_FIRST c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -29100,14 +29349,16 @@ abstract class ApiHelper { } - def queryAccessKey(@DelegatesTo(strategy = Closure.OWNER_FIRST, value = org.zstack.sdk.QueryAccessKeyAction.class) Closure c) { - def a = new org.zstack.sdk.QueryAccessKeyAction() + def queryAccessControlList(@DelegatesTo(strategy = Closure.OWNER_FIRST, value = org.zstack.sdk.QueryAccessControlListAction.class) Closure c) { + def a = new org.zstack.sdk.QueryAccessControlListAction() a.sessionId = Test.currentEnvSpec?.session?.uuid c.resolveStrategy = Closure.OWNER_FIRST c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -29129,14 +29380,16 @@ abstract class ApiHelper { } - def queryAccount(@DelegatesTo(strategy = Closure.OWNER_FIRST, value = org.zstack.sdk.QueryAccountAction.class) Closure c) { - def a = new org.zstack.sdk.QueryAccountAction() + def queryAccessControlRule(@DelegatesTo(strategy = Closure.OWNER_FIRST, value = org.zstack.sdk.QueryAccessControlRuleAction.class) Closure c) { + def a = new org.zstack.sdk.QueryAccessControlRuleAction() a.sessionId = Test.currentEnvSpec?.session?.uuid c.resolveStrategy = Closure.OWNER_FIRST c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -29158,14 +29411,16 @@ abstract class ApiHelper { } - def queryAccountBilling(@DelegatesTo(strategy = Closure.OWNER_FIRST, value = org.zstack.sdk.QueryAccountBillingAction.class) Closure c) { - def a = new org.zstack.sdk.QueryAccountBillingAction() + def queryAccessKey(@DelegatesTo(strategy = Closure.OWNER_FIRST, value = org.zstack.sdk.QueryAccessKeyAction.class) Closure c) { + def a = new org.zstack.sdk.QueryAccessKeyAction() a.sessionId = Test.currentEnvSpec?.session?.uuid c.resolveStrategy = Closure.OWNER_FIRST c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -29187,14 +29442,16 @@ abstract class ApiHelper { } - def queryAccountPriceTableRef(@DelegatesTo(strategy = Closure.OWNER_FIRST, value = org.zstack.sdk.QueryAccountPriceTableRefAction.class) Closure c) { - def a = new org.zstack.sdk.QueryAccountPriceTableRefAction() + def queryAccount(@DelegatesTo(strategy = Closure.OWNER_FIRST, value = org.zstack.sdk.QueryAccountAction.class) Closure c) { + def a = new org.zstack.sdk.QueryAccountAction() a.sessionId = Test.currentEnvSpec?.session?.uuid c.resolveStrategy = Closure.OWNER_FIRST c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -29216,14 +29473,78 @@ abstract class ApiHelper { } - def queryAccountResourceRef(@DelegatesTo(strategy = Closure.OWNER_FIRST, value = org.zstack.sdk.QueryAccountResourceRefAction.class) Closure c) { - def a = new org.zstack.sdk.QueryAccountResourceRefAction() + def queryAccountBilling(@DelegatesTo(strategy = Closure.OWNER_FIRST, value = org.zstack.sdk.QueryAccountBillingAction.class) Closure c) { + def a = new org.zstack.sdk.QueryAccountBillingAction() a.sessionId = Test.currentEnvSpec?.session?.uuid c.resolveStrategy = Closure.OWNER_FIRST c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } + + + if (System.getProperty("apipath") != null) { + if (a.apiId == null) { + a.apiId = Platform.uuid + } + + def tracker = new ApiPathTracker(a.apiId) + def out = errorOut(a.call()) + def path = tracker.getApiPath() + if (!path.isEmpty()) { + Test.apiPaths[a.class.name] = path.join(" --->\n") + } + + return out + } else { + return errorOut(a.call()) + } + } + + + def queryAccountPriceTableRef(@DelegatesTo(strategy = Closure.OWNER_FIRST, value = org.zstack.sdk.QueryAccountPriceTableRefAction.class) Closure c) { + def a = new org.zstack.sdk.QueryAccountPriceTableRefAction() + a.sessionId = Test.currentEnvSpec?.session?.uuid + c.resolveStrategy = Closure.OWNER_FIRST + c.delegate = a + c() + + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } + + + if (System.getProperty("apipath") != null) { + if (a.apiId == null) { + a.apiId = Platform.uuid + } + + def tracker = new ApiPathTracker(a.apiId) + def out = errorOut(a.call()) + def path = tracker.getApiPath() + if (!path.isEmpty()) { + Test.apiPaths[a.class.name] = path.join(" --->\n") + } + + return out + } else { + return errorOut(a.call()) + } + } + + + def queryAccountResourceRef(@DelegatesTo(strategy = Closure.OWNER_FIRST, value = org.zstack.sdk.QueryAccountResourceRefAction.class) Closure c) { + def a = new org.zstack.sdk.QueryAccountResourceRefAction() + a.sessionId = Test.currentEnvSpec?.session?.uuid + c.resolveStrategy = Closure.OWNER_FIRST + c.delegate = a + c() + + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -29252,7 +29573,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -29281,7 +29604,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -29310,7 +29635,40 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } + + + if (System.getProperty("apipath") != null) { + if (a.apiId == null) { + a.apiId = Platform.uuid + } + + def tracker = new ApiPathTracker(a.apiId) + def out = errorOut(a.call()) + def path = tracker.getApiPath() + if (!path.isEmpty()) { + Test.apiPaths[a.class.name] = path.join(" --->\n") + } + + return out + } else { + return errorOut(a.call()) + } + } + + + def queryAiHostModelCache(@DelegatesTo(strategy = Closure.OWNER_FIRST, value = org.zstack.sdk.QueryAiHostModelCacheAction.class) Closure c) { + def a = new org.zstack.sdk.QueryAiHostModelCacheAction() + a.sessionId = Test.currentEnvSpec?.session?.uuid + c.resolveStrategy = Closure.OWNER_FIRST + c.delegate = a + c() + + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -29339,7 +29697,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -29368,7 +29728,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -29397,7 +29759,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -29426,7 +29790,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -29455,7 +29821,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -29484,7 +29852,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -29513,7 +29883,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -29542,7 +29914,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -29571,7 +29945,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -29600,7 +29976,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -29629,7 +30007,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -29658,7 +30038,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -29687,7 +30069,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -29716,7 +30100,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -29745,7 +30131,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -29774,7 +30162,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -29803,7 +30193,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -29832,7 +30224,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -29861,7 +30255,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -29890,7 +30286,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -29919,7 +30317,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -29948,7 +30348,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -29977,7 +30379,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -30006,7 +30410,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -30035,7 +30441,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -30064,7 +30472,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -30093,7 +30503,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -30122,7 +30534,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -30151,7 +30565,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -30180,7 +30596,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -30209,7 +30627,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -30238,7 +30658,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -30267,7 +30689,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -30296,7 +30720,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -30325,7 +30751,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -30354,7 +30782,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -30383,7 +30813,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -30412,7 +30844,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -30441,7 +30875,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -30470,7 +30906,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -30499,7 +30937,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -30528,7 +30968,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -30557,7 +30999,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -30586,7 +31030,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -30615,7 +31061,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -30644,7 +31092,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -30673,7 +31123,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -30702,7 +31154,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -30731,7 +31185,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -30760,7 +31216,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -30789,7 +31247,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -30818,7 +31278,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -30847,7 +31309,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -30876,7 +31340,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -30905,7 +31371,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -30934,7 +31402,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -30963,7 +31433,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -30992,7 +31464,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -31021,7 +31495,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -31050,7 +31526,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -31079,7 +31557,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -31108,7 +31588,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -31137,7 +31619,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -31166,7 +31650,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -31195,7 +31681,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -31224,7 +31712,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -31253,7 +31743,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -31282,7 +31774,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -31311,7 +31805,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -31340,7 +31836,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -31369,7 +31867,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -31398,7 +31898,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -31427,7 +31929,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -31456,7 +31960,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -31485,7 +31991,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -31514,7 +32022,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -31543,7 +32053,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -31572,7 +32084,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -31601,7 +32115,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -31630,7 +32146,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -31659,7 +32177,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -31688,7 +32208,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -31717,7 +32239,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -31746,7 +32270,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -31775,7 +32301,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -31804,7 +32332,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -31833,7 +32363,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -31862,7 +32394,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -31891,7 +32425,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -31920,7 +32456,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -31949,7 +32487,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -31978,7 +32518,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -32007,7 +32549,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -32036,7 +32580,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -32065,7 +32611,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -32094,7 +32642,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -32123,7 +32673,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -32152,7 +32704,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -32181,7 +32735,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -32210,7 +32766,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -32239,7 +32797,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -32268,7 +32828,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -32297,7 +32859,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -32326,7 +32890,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -32355,7 +32921,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -32384,7 +32952,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -32413,7 +32983,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -32442,7 +33014,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -32471,7 +33045,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -32500,7 +33076,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -32529,7 +33107,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -32558,7 +33138,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -32587,7 +33169,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -32616,7 +33200,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -32645,7 +33231,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -32674,7 +33262,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -32703,7 +33293,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -32732,7 +33324,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -32761,7 +33355,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -32790,7 +33386,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -32819,7 +33417,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -32848,7 +33448,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -32877,7 +33479,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -32906,7 +33510,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -32935,7 +33541,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -32964,7 +33572,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -32993,7 +33603,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -33022,7 +33634,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -33051,7 +33665,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -33080,7 +33696,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -33109,7 +33727,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -33138,7 +33758,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -33167,7 +33789,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -33196,7 +33820,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -33225,7 +33851,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -33254,7 +33882,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -33283,7 +33913,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -33312,7 +33944,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -33341,7 +33975,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -33370,7 +34006,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -33399,7 +34037,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -33428,7 +34068,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -33457,36 +34099,40 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } - - - if (System.getProperty("apipath") != null) { - if (a.apiId == null) { - a.apiId = Platform.uuid - } - - def tracker = new ApiPathTracker(a.apiId) - def out = errorOut(a.call()) - def path = tracker.getApiPath() - if (!path.isEmpty()) { - Test.apiPaths[a.class.name] = path.join(" --->\n") - } - - return out - } else { - return errorOut(a.call()) + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } + + + if (System.getProperty("apipath") != null) { + if (a.apiId == null) { + a.apiId = Platform.uuid + } + + def tracker = new ApiPathTracker(a.apiId) + def out = errorOut(a.call()) + def path = tracker.getApiPath() + if (!path.isEmpty()) { + Test.apiPaths[a.class.name] = path.join(" --->\n") + } + + return out + } else { + return errorOut(a.call()) + } + } + + + def queryLongJob(@DelegatesTo(strategy = Closure.OWNER_FIRST, value = org.zstack.sdk.QueryLongJobAction.class) Closure c) { + def a = new org.zstack.sdk.QueryLongJobAction() + a.sessionId = Test.currentEnvSpec?.session?.uuid + c.resolveStrategy = Closure.OWNER_FIRST + c.delegate = a + c() + + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } } - } - - - def queryLongJob(@DelegatesTo(strategy = Closure.OWNER_FIRST, value = org.zstack.sdk.QueryLongJobAction.class) Closure c) { - def a = new org.zstack.sdk.QueryLongJobAction() - a.sessionId = Test.currentEnvSpec?.session?.uuid - c.resolveStrategy = Closure.OWNER_FIRST - c.delegate = a - c() - - a.conditions = a.conditions.collect { it.toString() } if (System.getProperty("apipath") != null) { @@ -33515,7 +34161,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -33544,7 +34192,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -33573,7 +34223,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -33602,7 +34254,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -33631,7 +34285,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -33660,7 +34316,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -33689,7 +34347,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -33718,7 +34378,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -33747,7 +34409,40 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } + + + if (System.getProperty("apipath") != null) { + if (a.apiId == null) { + a.apiId = Platform.uuid + } + + def tracker = new ApiPathTracker(a.apiId) + def out = errorOut(a.call()) + def path = tracker.getApiPath() + if (!path.isEmpty()) { + Test.apiPaths[a.class.name] = path.join(" --->\n") + } + + return out + } else { + return errorOut(a.call()) + } + } + + + def queryModelCenterBusinessNetworkProfile(@DelegatesTo(strategy = Closure.OWNER_FIRST, value = org.zstack.sdk.QueryModelCenterBusinessNetworkProfileAction.class) Closure c) { + def a = new org.zstack.sdk.QueryModelCenterBusinessNetworkProfileAction() + a.sessionId = Test.currentEnvSpec?.session?.uuid + c.resolveStrategy = Closure.OWNER_FIRST + c.delegate = a + c() + + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -33776,7 +34471,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -33805,7 +34502,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -33834,7 +34533,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -33863,7 +34564,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -33892,7 +34595,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -33921,7 +34626,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -33950,7 +34657,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -33979,7 +34688,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -34008,7 +34719,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -34037,7 +34750,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -34066,7 +34781,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -34095,7 +34812,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -34124,7 +34843,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -34153,7 +34874,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -34182,7 +34905,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -34211,7 +34936,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -34240,7 +34967,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -34269,7 +34998,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -34298,7 +35029,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -34327,7 +35060,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -34356,7 +35091,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -34385,7 +35122,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -34414,7 +35153,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -34443,7 +35184,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -34472,7 +35215,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -34501,7 +35246,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -34530,7 +35277,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -34559,7 +35308,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -34588,7 +35339,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -34617,7 +35370,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -34646,7 +35401,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -34675,7 +35432,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -34704,7 +35463,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -34733,7 +35494,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -34762,7 +35525,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -34791,7 +35556,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -34820,7 +35587,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -34849,7 +35618,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -34878,7 +35649,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -34907,7 +35680,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -34936,7 +35711,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -34965,7 +35742,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -34994,7 +35773,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -35023,7 +35804,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -35052,7 +35835,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -35081,7 +35866,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -35110,7 +35897,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -35139,7 +35928,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -35168,7 +35959,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -35197,7 +35990,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -35226,7 +36021,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -35255,7 +36052,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -35284,7 +36083,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -35313,7 +36114,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -35342,7 +36145,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -35371,7 +36176,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -35400,7 +36207,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -35429,7 +36238,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -35458,7 +36269,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -35487,7 +36300,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -35516,7 +36331,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -35545,7 +36362,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -35574,7 +36393,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -35603,7 +36424,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -35632,7 +36455,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -35661,7 +36486,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -35690,7 +36517,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -35719,7 +36548,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -35748,7 +36579,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -35777,7 +36610,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -35806,7 +36641,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -35835,7 +36672,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -35864,7 +36703,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -35893,7 +36734,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -35922,7 +36765,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -35951,7 +36796,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -35980,7 +36827,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -36009,7 +36858,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -36038,7 +36889,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -36067,7 +36920,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -36096,7 +36951,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -36125,7 +36982,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -36154,7 +37013,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -36183,7 +37044,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -36212,7 +37075,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -36241,7 +37106,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -36270,7 +37137,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -36299,7 +37168,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -36328,7 +37199,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -36357,7 +37230,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -36386,7 +37261,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -36415,7 +37292,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -36444,7 +37323,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -36473,7 +37354,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -36502,7 +37385,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -36531,7 +37416,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -36560,7 +37447,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -36589,7 +37478,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -36618,7 +37509,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -36647,7 +37540,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -36676,7 +37571,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -36705,7 +37602,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -36734,7 +37633,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -36763,7 +37664,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -36792,7 +37695,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -36821,7 +37726,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -36850,7 +37757,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -36879,7 +37788,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -36908,7 +37819,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -36937,7 +37850,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -36966,7 +37881,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -36995,7 +37912,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -37024,7 +37943,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -37053,7 +37974,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -37082,7 +38005,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -37111,7 +38036,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -37140,7 +38067,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -37169,7 +38098,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -37198,7 +38129,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -37227,7 +38160,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -37256,7 +38191,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -37285,7 +38222,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -37314,7 +38253,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -37343,7 +38284,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -37372,7 +38315,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -37401,7 +38346,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -37430,7 +38377,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -37459,7 +38408,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -37488,7 +38439,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -37517,7 +38470,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -37546,7 +38501,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -37575,7 +38532,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -37604,7 +38563,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -37633,7 +38594,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -37662,7 +38625,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -37691,7 +38656,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -37720,7 +38687,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -37749,7 +38718,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -37778,7 +38749,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -38556,6 +39529,33 @@ abstract class ApiHelper { } + def refreshAiHostModelCache(@DelegatesTo(strategy = Closure.OWNER_FIRST, value = org.zstack.sdk.RefreshAiHostModelCacheAction.class) Closure c) { + def a = new org.zstack.sdk.RefreshAiHostModelCacheAction() + a.sessionId = Test.currentEnvSpec?.session?.uuid + c.resolveStrategy = Closure.OWNER_FIRST + c.delegate = a + c() + + + if (System.getProperty("apipath") != null) { + if (a.apiId == null) { + a.apiId = Platform.uuid + } + + def tracker = new ApiPathTracker(a.apiId) + def out = errorOut(a.call()) + def path = tracker.getApiPath() + if (!path.isEmpty()) { + Test.apiPaths[a.class.name] = path.join(" --->\n") + } + + return out + } else { + return errorOut(a.call()) + } + } + + def refreshCaptcha(@DelegatesTo(strategy = Closure.OWNER_FIRST, value = org.zstack.sdk.RefreshCaptchaAction.class) Closure c) { def a = new org.zstack.sdk.RefreshCaptchaAction() @@ -43524,6 +44524,33 @@ abstract class ApiHelper { } + def updateAIBusinessGatewayOffering(@DelegatesTo(strategy = Closure.OWNER_FIRST, value = org.zstack.sdk.UpdateAIBusinessGatewayOfferingAction.class) Closure c) { + def a = new org.zstack.sdk.UpdateAIBusinessGatewayOfferingAction() + a.sessionId = Test.currentEnvSpec?.session?.uuid + c.resolveStrategy = Closure.OWNER_FIRST + c.delegate = a + c() + + + if (System.getProperty("apipath") != null) { + if (a.apiId == null) { + a.apiId = Platform.uuid + } + + def tracker = new ApiPathTracker(a.apiId) + def out = errorOut(a.call()) + def path = tracker.getApiPath() + if (!path.isEmpty()) { + Test.apiPaths[a.class.name] = path.join(" --->\n") + } + + return out + } else { + return errorOut(a.call()) + } + } + + def updateAccessControlList(@DelegatesTo(strategy = Closure.OWNER_FIRST, value = org.zstack.sdk.UpdateAccessControlListAction.class) Closure c) { def a = new org.zstack.sdk.UpdateAccessControlListAction() a.sessionId = Test.currentEnvSpec?.session?.uuid @@ -43632,6 +44659,33 @@ abstract class ApiHelper { } + def updateAiHostModelCachePolicy(@DelegatesTo(strategy = Closure.OWNER_FIRST, value = org.zstack.sdk.UpdateAiHostModelCachePolicyAction.class) Closure c) { + def a = new org.zstack.sdk.UpdateAiHostModelCachePolicyAction() + a.sessionId = Test.currentEnvSpec?.session?.uuid + c.resolveStrategy = Closure.OWNER_FIRST + c.delegate = a + c() + + + if (System.getProperty("apipath") != null) { + if (a.apiId == null) { + a.apiId = Platform.uuid + } + + def tracker = new ApiPathTracker(a.apiId) + def out = errorOut(a.call()) + def path = tracker.getApiPath() + if (!path.isEmpty()) { + Test.apiPaths[a.class.name] = path.join(" --->\n") + } + + return out + } else { + return errorOut(a.call()) + } + } + + def updateAliyunDisk(@DelegatesTo(strategy = Closure.OWNER_FIRST, value = org.zstack.sdk.UpdateAliyunDiskAction.class) Closure c) { def a = new org.zstack.sdk.UpdateAliyunDiskAction() a.sessionId = Test.currentEnvSpec?.session?.uuid @@ -46791,6 +47845,33 @@ abstract class ApiHelper { } + def updateModelCenterBusinessNetworkProfile(@DelegatesTo(strategy = Closure.OWNER_FIRST, value = org.zstack.sdk.UpdateModelCenterBusinessNetworkProfileAction.class) Closure c) { + def a = new org.zstack.sdk.UpdateModelCenterBusinessNetworkProfileAction() + a.sessionId = Test.currentEnvSpec?.session?.uuid + c.resolveStrategy = Closure.OWNER_FIRST + c.delegate = a + c() + + + if (System.getProperty("apipath") != null) { + if (a.apiId == null) { + a.apiId = Platform.uuid + } + + def tracker = new ApiPathTracker(a.apiId) + def out = errorOut(a.call()) + def path = tracker.getApiPath() + if (!path.isEmpty()) { + Test.apiPaths[a.class.name] = path.join(" --->\n") + } + + return out + } else { + return errorOut(a.call()) + } + } + + def updateModelEvaluationTask(@DelegatesTo(strategy = Closure.OWNER_FIRST, value = org.zstack.sdk.UpdateModelEvaluationTaskAction.class) Closure c) { def a = new org.zstack.sdk.UpdateModelEvaluationTaskAction() a.sessionId = Test.currentEnvSpec?.session?.uuid @@ -48525,6 +49606,7 @@ abstract class ApiHelper { c.resolveStrategy = Closure.OWNER_FIRST c.delegate = a c() + if (System.getProperty("apipath") != null) { if (a.apiId == null) { @@ -49605,7 +50687,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -49877,7 +50961,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -49906,7 +50992,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -49935,7 +51023,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -49964,7 +51054,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -51262,7 +52354,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -51291,7 +52385,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -51320,7 +52416,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -51349,7 +52447,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -51378,7 +52478,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -51407,7 +52509,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -51436,7 +52540,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -51465,7 +52571,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -51494,7 +52602,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -51523,7 +52633,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -51552,7 +52664,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -51581,7 +52695,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -52008,6 +53124,33 @@ abstract class ApiHelper { } + def setIAM2RoleScope(@DelegatesTo(strategy = Closure.OWNER_FIRST, value = org.zstack.sdk.iam2.api.SetIAM2RoleScopeAction.class) Closure c) { + def a = new org.zstack.sdk.iam2.api.SetIAM2RoleScopeAction() + a.sessionId = Test.currentEnvSpec?.session?.uuid + c.resolveStrategy = Closure.OWNER_FIRST + c.delegate = a + c() + + + if (System.getProperty("apipath") != null) { + if (a.apiId == null) { + a.apiId = Platform.uuid + } + + def tracker = new ApiPathTracker(a.apiId) + def out = errorOut(a.call()) + def path = tracker.getApiPath() + if (!path.isEmpty()) { + Test.apiPaths[a.class.name] = path.join(" --->\n") + } + + return out + } else { + return errorOut(a.call()) + } + } + + def setOrganizationOperation(@DelegatesTo(strategy = Closure.OWNER_FIRST, value = org.zstack.sdk.iam2.api.SetOrganizationOperationAction.class) Closure c) { def a = new org.zstack.sdk.iam2.api.SetOrganizationOperationAction() a.sessionId = Test.currentEnvSpec?.session?.uuid @@ -52717,7 +53860,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -52908,7 +54053,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -53207,7 +54354,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -53236,7 +54385,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -53481,7 +54632,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -53510,7 +54663,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -53539,7 +54694,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -53568,7 +54725,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -53597,7 +54756,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -53896,7 +55057,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -53925,7 +55088,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -54170,7 +55335,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -54199,7 +55366,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -54228,7 +55397,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -54392,7 +55563,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -54421,7 +55594,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -54585,7 +55760,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -54695,7 +55872,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -54805,7 +55984,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -54888,7 +56069,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -54998,7 +56181,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -55135,7 +56320,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -55164,7 +56351,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -55463,7 +56652,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -55492,7 +56683,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -55521,7 +56714,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -55550,7 +56745,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -55579,7 +56776,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -55608,7 +56807,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -55637,7 +56838,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -56152,7 +57355,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -56180,22 +57385,24 @@ abstract class ApiHelper { c.resolveStrategy = Closure.OWNER_FIRST c.delegate = a c() - - a.conditions = a.conditions.collect { it.toString() } + + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { if (a.apiId == null) { a.apiId = Platform.uuid } - + def tracker = new ApiPathTracker(a.apiId) def out = errorOut(a.call()) def path = tracker.getApiPath() if (!path.isEmpty()) { Test.apiPaths[a.class.name] = path.join(" --->\n") } - + return out } else { return errorOut(a.call()) @@ -56210,7 +57417,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -56239,7 +57448,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -56619,7 +57830,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -56648,7 +57861,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -56758,7 +57973,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -56841,7 +58058,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -57329,7 +58548,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -57358,7 +58579,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -57387,7 +58610,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -57416,7 +58641,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -57445,7 +58672,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -57825,7 +59054,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -57854,7 +59085,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -57883,7 +59116,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -57912,7 +59147,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -57941,7 +59178,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -57970,7 +59209,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -57999,7 +59240,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -58028,7 +59271,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -58246,7 +59491,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -58383,7 +59630,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -58412,7 +59661,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { @@ -58441,7 +59692,9 @@ abstract class ApiHelper { c.delegate = a c() - a.conditions = a.conditions.collect { it.toString() } + if (a.conditions != null) { + a.conditions = a.conditions.collect { it.toString() } + } if (System.getProperty("apipath") != null) { From 0eaaf669a5bd0c309f2c544292558051dc927c7f Mon Sep 17 00:00:00 2001 From: "ye.zou" Date: Sun, 16 Aug 2026 04:05:03 +0800 Subject: [PATCH 6/9] [db]: keep concreteResourceType on the INSERT line CheckNotNullFieldCase scans upgrade scripts line by line and requires INSERT INTO ResourceVO/AccountResourceRefVO statements to carry the concreteResourceType column on the same line. Whitespace-only change. Resolves: ZSTAC-82189 Change-Id: I5a0f6cf44577a15ae2afaa2b203e5b1dbdad7503 --- conf/db/upgrade/V5.5.32__schema.sql | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/conf/db/upgrade/V5.5.32__schema.sql b/conf/db/upgrade/V5.5.32__schema.sql index 0d008a89fce..2f7730f8c88 100644 --- a/conf/db/upgrade/V5.5.32__schema.sql +++ b/conf/db/upgrade/V5.5.32__schema.sql @@ -315,8 +315,7 @@ FROM `zstack`.`ModelCenterVO` WHERE `serviceNetworkUuid` IS NOT NULL LIMIT 1; -INSERT INTO `zstack`.`AccountResourceRefVO` - (`accountUuid`, `ownerAccountUuid`, `resourceUuid`, `resourceType`, `concreteResourceType`, +INSERT INTO `zstack`.`AccountResourceRefVO` (`accountUuid`, `ownerAccountUuid`, `resourceUuid`, `resourceType`, `concreteResourceType`, `permission`, `isShared`, `createDate`, `lastOpDate`) SELECT @admin_account_uuid, @admin_account_uuid, From d783bd3cb3e2500cc89029ae4875bcdd4f566ef5 Mon Sep 17 00:00:00 2001 From: "ye.zou" Date: Sun, 16 Aug 2026 06:44:22 +0800 Subject: [PATCH 7/9] [doc]: restore inventory doc titles and field since values The 5.5.32 regeneration rewrote these templates from scratch, resetting hand-maintained titles to the placeholder text and every field since to 5.5.32. Restore the 5.5.32 baseline content and keep since 5.5.32 only for the genuinely new fields (prefixLen, reservedMemorySize, protocol, lastAttachDate). Resolves: ZSTAC-82189 Change-Id: I144cd38ae2f96a1875426837ae9c331bed22fccf --- .../l3/UsedIpInventoryDoc_zh_cn.groovy | 30 +++++----- .../vm/VmInstanceInventoryDoc_zh_cn.groovy | 56 ++++++++++--------- .../header/vm/VmNicInventoryDoc_zh_cn.groovy | 40 ++++++------- .../vm/cdrom/VmCdRomInventoryDoc_zh_cn.groovy | 20 +++---- .../volume/VolumeInventoryDoc_zh_cn.groovy | 42 +++++++------- 5 files changed, 95 insertions(+), 93 deletions(-) diff --git a/header/src/main/java/org/zstack/header/network/l3/UsedIpInventoryDoc_zh_cn.groovy b/header/src/main/java/org/zstack/header/network/l3/UsedIpInventoryDoc_zh_cn.groovy index aa48e37cc85..4a476dc280a 100644 --- a/header/src/main/java/org/zstack/header/network/l3/UsedIpInventoryDoc_zh_cn.groovy +++ b/header/src/main/java/org/zstack/header/network/l3/UsedIpInventoryDoc_zh_cn.groovy @@ -5,43 +5,43 @@ import java.sql.Timestamp doc { - title "在这里输入结构的名称" + title "已使用IP的结构清单" field { name "uuid" desc "资源的UUID,唯一标示该资源" type "String" - since "5.5.32" + since "5.0.0" } field { name "ipRangeUuid" desc "IP段UUID" type "String" - since "5.5.32" + since "5.0.0" } field { name "l3NetworkUuid" desc "三层网络UUID" type "String" - since "5.5.32" + since "5.0.0" } field { name "ipVersion" desc "" type "Integer" - since "5.5.32" + since "5.0.0" } field { name "ip" desc "" type "String" - since "5.5.32" + since "5.0.0" } field { name "netmask" desc "" type "String" - since "5.5.32" + since "5.0.0" } field { name "prefixLen" @@ -53,42 +53,42 @@ doc { name "gateway" desc "" type "String" - since "5.5.32" + since "5.0.0" } field { name "usedFor" - desc "" + desc "分配原因" type "String" - since "5.5.32" + since "5.0.0" } field { name "ipInLong" desc "" type "long" - since "5.5.32" + since "5.0.0" } field { name "ipInBinary" desc "" type "byte[]" - since "5.5.32" + since "5.2.0" } field { name "vmNicUuid" desc "云主机网卡UUID" type "String" - since "5.5.32" + since "5.0.0" } field { name "createDate" desc "创建时间" type "Timestamp" - since "5.5.32" + since "5.0.0" } field { name "lastOpDate" desc "最后一次修改时间" type "Timestamp" - since "5.5.32" + since "5.0.0" } } diff --git a/header/src/main/java/org/zstack/header/vm/VmInstanceInventoryDoc_zh_cn.groovy b/header/src/main/java/org/zstack/header/vm/VmInstanceInventoryDoc_zh_cn.groovy index 50fe1b458e9..42cfa7f1d66 100644 --- a/header/src/main/java/org/zstack/header/vm/VmInstanceInventoryDoc_zh_cn.groovy +++ b/header/src/main/java/org/zstack/header/vm/VmInstanceInventoryDoc_zh_cn.groovy @@ -2,6 +2,8 @@ package org.zstack.header.vm import java.lang.Long import java.lang.Integer +import java.lang.Long +import java.sql.Timestamp import java.sql.Timestamp import org.zstack.header.vm.VmNicInventory import org.zstack.header.volume.VolumeInventory @@ -9,103 +11,103 @@ import org.zstack.header.vm.cdrom.VmCdRomInventory doc { - title "在这里输入结构的名称" + title "云主机实例清单" field { name "uuid" desc "资源的UUID,唯一标示该资源" type "String" - since "5.5.32" + since "0.6" } field { name "name" desc "资源名称" type "String" - since "5.5.32" + since "0.6" } field { name "description" desc "资源的详细描述" type "String" - since "5.5.32" + since "0.6" } field { name "zoneUuid" desc "区域UUID" type "String" - since "5.5.32" + since "0.6" } field { name "clusterUuid" desc "集群UUID" type "String" - since "5.5.32" + since "0.6" } field { name "imageUuid" desc "镜像UUID" type "String" - since "5.5.32" + since "0.6" } field { name "hostUuid" desc "物理机UUID" type "String" - since "5.5.32" + since "0.6" } field { name "lastHostUuid" desc "" type "String" - since "5.5.32" + since "0.6" } field { name "instanceOfferingUuid" desc "计算规格UUID" type "String" - since "5.5.32" + since "0.6" } field { name "rootVolumeUuid" desc "根云盘UUID" type "String" - since "5.5.32" + since "0.6" } field { name "platform" desc "" type "String" - since "5.5.32" + since "0.6" } field { name "architecture" desc "" type "String" - since "5.5.32" + since "0.6" } field { name "defaultL3NetworkUuid" desc "" type "String" - since "5.5.32" + since "0.6" } field { name "type" desc "" type "String" - since "5.5.32" + since "0.6" } field { name "hypervisorType" desc "" type "String" - since "5.5.32" + since "0.6" } field { name "memorySize" desc "" type "Long" - since "5.5.32" + since "0.6" } field { name "reservedMemorySize" @@ -117,44 +119,44 @@ doc { name "cpuNum" desc "" type "Integer" - since "5.5.32" + since "0.6" } field { name "cpuSpeed" desc "" type "Long" - since "5.5.32" + since "0.6" } field { name "allocatorStrategy" desc "" type "String" - since "5.5.32" + since "0.6" } field { name "createDate" desc "创建时间" type "Timestamp" - since "5.5.32" + since "0.6" } field { name "lastOpDate" desc "最后一次修改时间" type "Timestamp" - since "5.5.32" + since "0.6" } field { name "state" desc "" type "String" - since "5.5.32" + since "0.6" } ref { name "vmNics" path "org.zstack.header.vm.VmInstanceInventory.vmNics" desc "null" type "List" - since "5.5.32" + since "0.6" clz VmNicInventory.class } ref { @@ -162,7 +164,7 @@ doc { path "org.zstack.header.vm.VmInstanceInventory.allVolumes" desc "null" type "List" - since "5.5.32" + since "0.6" clz VolumeInventory.class } ref { @@ -170,13 +172,13 @@ doc { path "org.zstack.header.vm.VmInstanceInventory.vmCdRoms" desc "null" type "List" - since "5.5.32" + since "0.6" clz VmCdRomInventory.class } field { name "guestOsType" desc "" type "String" - since "5.5.32" + since "4.1.2" } } diff --git a/header/src/main/java/org/zstack/header/vm/VmNicInventoryDoc_zh_cn.groovy b/header/src/main/java/org/zstack/header/vm/VmNicInventoryDoc_zh_cn.groovy index 3894dc6ec27..9974647a021 100644 --- a/header/src/main/java/org/zstack/header/vm/VmNicInventoryDoc_zh_cn.groovy +++ b/header/src/main/java/org/zstack/header/vm/VmNicInventoryDoc_zh_cn.groovy @@ -6,116 +6,116 @@ import java.sql.Timestamp doc { - title "在这里输入结构的名称" + title "云主机网卡清单" field { name "uuid" desc "资源的UUID,唯一标示该资源" type "String" - since "5.5.32" + since "4.7.13" } field { name "vmInstanceUuid" desc "云主机UUID" type "String" - since "5.5.32" + since "4.7.13" } field { name "l3NetworkUuid" desc "三层网络UUID" type "String" - since "5.5.32" + since "4.7.13" } field { name "ip" desc "" type "String" - since "5.5.32" + since "4.7.13" } field { name "mac" desc "" type "String" - since "5.5.32" + since "4.7.13" } field { name "hypervisorType" desc "" type "String" - since "5.5.32" + since "4.7.13" } field { name "netmask" desc "" type "String" - since "5.5.32" + since "4.7.13" } field { name "gateway" desc "" type "String" - since "5.5.32" + since "4.7.13" } field { name "metaData" desc "" type "String" - since "5.5.32" + since "4.7.13" } field { name "ipVersion" desc "" type "Integer" - since "5.5.32" + since "4.7.13" } field { name "driverType" desc "" type "String" - since "5.5.32" + since "4.7.13" } ref { name "usedIps" path "org.zstack.header.vm.VmNicInventory.usedIps" desc "null" type "List" - since "5.5.32" + since "4.7.13" clz UsedIpInventory.class } field { name "internalName" desc "" type "String" - since "5.5.32" + since "4.7.13" } field { name "deviceId" desc "" type "Integer" - since "5.5.32" + since "4.7.13" } field { name "type" desc "" type "String" - since "5.5.32" + since "4.7.13" } field { name "state" - desc "" + desc "网卡状态" type "String" - since "5.5.32" + since "4.7.13" } field { name "createDate" desc "创建时间" type "Timestamp" - since "5.5.32" + since "4.7.13" } field { name "lastOpDate" desc "最后一次修改时间" type "Timestamp" - since "5.5.32" + since "4.7.13" } } diff --git a/header/src/main/java/org/zstack/header/vm/cdrom/VmCdRomInventoryDoc_zh_cn.groovy b/header/src/main/java/org/zstack/header/vm/cdrom/VmCdRomInventoryDoc_zh_cn.groovy index 1be8d9a2eec..e9d1056db4c 100644 --- a/header/src/main/java/org/zstack/header/vm/cdrom/VmCdRomInventoryDoc_zh_cn.groovy +++ b/header/src/main/java/org/zstack/header/vm/cdrom/VmCdRomInventoryDoc_zh_cn.groovy @@ -5,49 +5,49 @@ import java.sql.Timestamp doc { - title "在这里输入结构的名称" + title "云主机CDROM" field { name "uuid" desc "资源的UUID,唯一标示该资源" type "String" - since "5.5.32" + since "4.7.13" } field { name "vmInstanceUuid" desc "云主机UUID" type "String" - since "5.5.32" + since "4.7.13" } field { name "deviceId" desc "" type "Integer" - since "5.5.32" + since "4.7.13" } field { name "isoUuid" desc "" type "String" - since "5.5.32" + since "4.7.13" } field { name "isoInstallPath" desc "" type "String" - since "5.5.32" + since "4.7.13" } field { name "name" desc "资源名称" type "String" - since "5.5.32" + since "4.7.13" } field { name "description" desc "资源的详细描述" type "String" - since "5.5.32" + since "4.7.13" } field { name "protocol" @@ -59,12 +59,12 @@ doc { name "createDate" desc "创建时间" type "Timestamp" - since "5.5.32" + since "4.7.13" } field { name "lastOpDate" desc "最后一次修改时间" type "Timestamp" - since "5.5.32" + since "4.7.13" } } diff --git a/header/src/main/java/org/zstack/header/volume/VolumeInventoryDoc_zh_cn.groovy b/header/src/main/java/org/zstack/header/volume/VolumeInventoryDoc_zh_cn.groovy index 7174f7fbf15..7da1a423430 100644 --- a/header/src/main/java/org/zstack/header/volume/VolumeInventoryDoc_zh_cn.groovy +++ b/header/src/main/java/org/zstack/header/volume/VolumeInventoryDoc_zh_cn.groovy @@ -13,127 +13,127 @@ doc { name "uuid" desc "资源的UUID,唯一标示该资源" type "String" - since "5.5.32" + since "4.7.13" } field { name "name" desc "资源名称" type "String" - since "5.5.32" + since "4.7.13" } field { name "description" desc "资源的详细描述" type "String" - since "5.5.32" + since "4.7.13" } field { name "primaryStorageUuid" desc "主存储UUID" type "String" - since "5.5.32" + since "4.7.13" } field { name "vmInstanceUuid" desc "云主机UUID" type "String" - since "5.5.32" + since "4.7.13" } field { name "diskOfferingUuid" desc "云盘规格UUID" type "String" - since "5.5.32" + since "4.7.13" } field { name "rootImageUuid" desc "" type "String" - since "5.5.32" + since "4.7.13" } field { name "installPath" desc "" type "String" - since "5.5.32" + since "4.7.13" } field { name "type" desc "" type "String" - since "5.5.32" + since "4.7.13" } field { name "format" desc "" type "String" - since "5.5.32" + since "4.7.13" } field { name "size" desc "" type "Long" - since "5.5.32" + since "4.7.13" } field { name "actualSize" desc "" type "Long" - since "5.5.32" + since "4.7.13" } field { name "deviceId" desc "" type "Integer" - since "5.5.32" + since "4.7.13" } field { name "state" desc "" type "String" - since "5.5.32" + since "4.7.13" } field { name "status" desc "" type "String" - since "5.5.32" + since "4.7.13" } field { name "createDate" desc "创建时间" type "Timestamp" - since "5.5.32" + since "4.7.13" } field { name "lastOpDate" desc "最后一次修改时间" type "Timestamp" - since "5.5.32" + since "4.7.13" } field { name "isShareable" desc "" type "Boolean" - since "5.5.32" + since "4.7.13" } field { name "volumeQos" desc "" type "String" - since "5.5.32" + since "4.7.13" } field { name "lastDetachDate" desc "" type "Timestamp" - since "5.5.32" + since "4.7.13" } field { name "lastVmInstanceUuid" desc "" type "String" - since "5.5.32" + since "4.7.13" } field { name "lastAttachDate" From 8cfcb9332b2a1b0a79e3bccc1e65c4d7165464c5 Mon Sep 17 00:00:00 2001 From: "ye.zou" Date: Sun, 16 Aug 2026 06:44:32 +0800 Subject: [PATCH 8/9] [appliancevm]: validate agent port range in deploy flow getAgentPort accepted any value above zero, so ports beyond 65535 were treated as valid and passed to buildAgentUrl and AnsibleRunner. Fall back to ApplianceVmGlobalProperty.AGENT_PORT unless the configured port is within 1..65535. Resolves: ZSTAC-82189 Change-Id: Ia22c99dd249599e55d5e7a5e43425d22d4cf2feb --- .../org/zstack/appliancevm/ApplianceVmDeployAgentFlow.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugin/applianceVm/src/main/java/org/zstack/appliancevm/ApplianceVmDeployAgentFlow.java b/plugin/applianceVm/src/main/java/org/zstack/appliancevm/ApplianceVmDeployAgentFlow.java index a07a7832899..943d82ad67d 100755 --- a/plugin/applianceVm/src/main/java/org/zstack/appliancevm/ApplianceVmDeployAgentFlow.java +++ b/plugin/applianceVm/src/main/java/org/zstack/appliancevm/ApplianceVmDeployAgentFlow.java @@ -132,7 +132,8 @@ public void handle(ErrorCode errCode, Map data) { private int getAgentPort(String apvmUuid) { ApplianceVmVO avo = dbf.findByUuid(apvmUuid, ApplianceVmVO.class); - return avo != null && avo.getAgentPort() > 0 ? avo.getAgentPort() : ApplianceVmGlobalProperty.AGENT_PORT; + return avo != null && avo.getAgentPort() > 0 && avo.getAgentPort() <= 65535 + ? avo.getAgentPort() : ApplianceVmGlobalProperty.AGENT_PORT; } @Override From 8f212b6eba205bb27dbb850a95d27d8a743b5074 Mon Sep 17 00:00:00 2001 From: "ye.zou" Date: Sun, 16 Aug 2026 06:44:41 +0800 Subject: [PATCH 9/9] [sdk]: keep raw collection type for NoSDK generic elements addToLaterResolvedClassesIfNeed skips NoSDK types, so no SDK class is generated for them, but getSdkTypeName still mapped them to a generated class name. An SDKGeneric collection with a NoSDK element type would reference a class that does not exist and fail compilation. Treat NoSDK element types as unresolved and return the raw collection type instead. Verified with ./runMavenProfile sdk: regenerated SDK output is identical. Resolves: ZSTAC-82189 Change-Id: I4e6e8f10e85306db01a158af9d700eac7a8ea08b --- .../main/resources/scripts/SdkDataStructureGenerator.groovy | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rest/src/main/resources/scripts/SdkDataStructureGenerator.groovy b/rest/src/main/resources/scripts/SdkDataStructureGenerator.groovy index 373a5181bee..ad2e0a2baa8 100755 --- a/rest/src/main/resources/scripts/SdkDataStructureGenerator.groovy +++ b/rest/src/main/resources/scripts/SdkDataStructureGenerator.groovy @@ -408,7 +408,8 @@ ${output.join("\n")} } def getCollectionFieldType(Field field, Class genericType) { - if (!field.isAnnotationPresent(SDKGeneric.class) || genericType == null) { + if (!field.isAnnotationPresent(SDKGeneric.class) || genericType == null + || genericType.isAnnotationPresent(NoSDK.class)) { return field.type.name }