<fix>[baremetal2]: ZSTAC-87803 add DPU network validation error codes - #4705
Conversation
Root Cause: Baremetal2 DPU network parameter validation reuses an IP-version-specific error code for invalid parameter combinations, missing L3 networks, and network parameters unsupported by non-DPU chassis, producing incorrect error semantics and translations. Solution: Add dedicated error codes for invalid DPU network parameter combinations, nonexistent L3 networks, and unsupported create-network parameters, with mappings for all supported languages. Test: Not run as requested. Verified all mapping files parse successfully, each new code is present in all ten language files, no duplicate constants exist, and git diff --check passes. Resolves: ZSTAC-87803 Change-Id: I256bbd56d6374f1d7d9b753b5192adc24dbe38aa
|
Warning
|
| Layer / File(s) | Summary |
|---|---|
错误码常量声明 utils/src/main/java/org/zstack/utils/clouderrorcode/CloudOperationsErrorCode.java |
新增三个 BareMetal2 实例错误码 public 字符串常量。 |
Estimated code review effort: 1 (Trivial) | ~2 minutes
Merge Risk: ⚪ Minimal · up to 7e342
This PR adds dedicated DPU network validation error codes and localized messages without any identified merge-blocking correctness or production risk; it is merge-ready after normal checks and review.
Suggested reviewers: ruansteve
Poem
我是兔子,蹦过代码田,
三枚错误码排成线。
10099、10100、10101,
BareMetal2 更齐全。
胡萝卜旁,测试安眠。
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
| Check name | Status | Explanation |
|---|---|---|
| Title check | ✅ Passed | 标题清晰说明了新增 Baremetal2 DPU 网络校验错误码的主要变更,并包含关联问题编号。 |
| Description check | ✅ Passed | 描述说明了根因、解决方案、语言映射验证结果和测试状态,与变更内容直接相关。 |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 too large.) |
| 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
📝 Generate docstrings
- Create stacked PR
- Commit on current branch
🧪 Generate unit tests (beta)
- Create PR with unit tests
- Commit unit tests in branch
sync/xiangheng.zhao/fix/feature-5.5.38-dpu2/ZSTAC-87803@@2
Warning
There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.
🔧 ast-grep (0.45.1)
utils/src/main/java/org/zstack/utils/clouderrorcode/CloudOperationsErrorCode.java
ast-grep timed out on this file
Comment @coderabbitai help to get the list of available commands.
Root Cause:
Baremetal2 DPU network parameter validation reuses an IP-version-specific error code for invalid parameter combinations, missing L3 networks, and network parameters unsupported by non-DPU chassis, producing incorrect error semantics and translations.
Solution:
Add dedicated error codes for invalid DPU network parameter combinations, nonexistent L3 networks, and unsupported create-network parameters, with mappings for all supported languages.
Test:
Not run as requested. Verified all mapping files parse successfully, each new code is present in all ten language files, no duplicate constants exist, and git diff --check passes.
Resolves: ZSTAC-87803
Change-Id: I256bbd56d6374f1d7d9b753b5192adc24dbe38aa
sync from gitlab !10756