Skip to content

<feature>[sdk]: add shared block LV range descriptor SDK - #4672

Open
ZStack-Robot wants to merge 1 commit into
zsv_5.1.0from
sync/tao.gan/ZSV-12867@@3
Open

<feature>[sdk]: add shared block LV range descriptor SDK#4672
ZStack-Robot wants to merge 1 commit into
zsv_5.1.0from
sync/tao.gan/ZSV-12867@@3

Conversation

@ZStack-Robot

Copy link
Copy Markdown
Collaborator

Resolves: ZSV-12867

Change-Id: I727974746b646768656f766e617579687378686f

sync from gitlab !10680

Resolves: ZSV-12867

Change-Id: I796f6b717671746f6775797361617765676f7562
@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 3d37ae33-42f9-4a63-9c1d-6cda1414a3e3

📥 Commits

Reviewing files that changed from the base of the PR and between 9f0b59d and c1fc562.

📒 Files selected for processing (9)
  • sdk/src/main/java/org/zstack/sdk/GetSharedBlockVolumeSnapshotLanFreeLayoutAction.java
  • sdk/src/main/java/org/zstack/sdk/GetSharedBlockVolumeSnapshotLanFreeLayoutResult.java
  • sdk/src/main/java/org/zstack/sdk/SharedBlockLunDescriptor.java
  • sdk/src/main/java/org/zstack/sdk/SharedBlockLvRange.java
  • sdk/src/main/java/org/zstack/sdk/SharedBlockVolumeSnapshotLanFreeLayer.java
  • sdk/src/main/java/org/zstack/sdk/SharedBlockVolumeSnapshotLanFreeLayout.java
  • sdk/src/main/java/org/zstack/sdk/SharedBlockVolumeSnapshotLanFreePair.java
  • sdk/src/main/java/org/zstack/sdk/SourceClassMap.java
  • testlib/src/main/java/org/zstack/testlib/ApiHelper.groovy

Walkthrough

Changes

新增共享块卷快照无代理布局 SDK。变更包括请求与响应数据模型、同步和异步 API Action、类型双向映射,以及 ApiHelper 调用方法。

共享块卷快照无代理布局

Layer / File(s) Summary
布局数据模型
sdk/src/main/java/org/zstack/sdk/SharedBlock*.java, sdk/src/main/java/org/zstack/sdk/GetSharedBlockVolumeSnapshotLanFreeLayoutResult.java
新增卷快照配对、LUN、LV 范围、快照层、布局和结果数据类,并提供 getter/setter。
布局 API 操作
sdk/src/main/java/org/zstack/sdk/GetSharedBlockVolumeSnapshotLanFreeLayoutAction.java
新增 POST API Action。Action 支持请求参数校验、会话认证、错误转换、响应解析,以及同步和异步调用。
类型映射与测试辅助集成
sdk/src/main/java/org/zstack/sdk/SourceClassMap.java, testlib/src/main/java/org/zstack/testlib/ApiHelper.groovy
新增五组 SharedBlock 类型的双向映射,并提供 getSharedBlockVolumeSnapshotLanFreeLayout 辅助方法。

Estimated code review effort: 3 (Moderate) | ~20 minutes

Mergeability Score: ⚪ Minimal · up to c1fc5

This SDK-only change adds shared block volume layout descriptors without any identified merge-blocking risk; it is ready to merge after normal checks and review.

Sequence Diagram(s)

sequenceDiagram
  participant TestHelper as ApiHelper
  participant Action as GetSharedBlockVolumeSnapshotLanFreeLayoutAction
  participant Client as ZSClient
  participant API as Layout API
  TestHelper->>Action: 配置卷快照配对和标签
  Action->>Client: 执行 POST 请求
  Client->>API: 提交布局请求
  API-->>Client: 返回错误或布局结果
  Client-->>Action: 转换为 Result
  Action-->>TestHelper: 返回调用结果
Loading

Poem

我是小兔,抱来布局图,
LUN 与层级排成队。
API 轻跳越过网络,
同步异步都相随。
映射齐全,结果明,
胡萝卜旁庆功会。

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive 描述仅包含问题编号、Change-Id 和同步信息,未说明本次 SDK 变更内容。 补充变更摘要,明确新增的 API、数据类及 Volume Snapshot LAN-free layout SDK 支持。
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed 标题与变更相关,但仅突出 SharedBlock LV range descriptor,未准确概括 Volume Snapshot LAN-free layout SDK 支持这一主要变更。
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch sync/tao.gan/ZSV-12867@@3

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants