Skip to content

[refactor][volumeCache]: align REST URLs with new class names (zstack)#3867

Open
MatheMatrix wants to merge 1 commit intofeature-5.5.6-local-cachefrom
sync/haidong.pang/refactor/volumeCache-api-url-rename@@2
Open

[refactor][volumeCache]: align REST URLs with new class names (zstack)#3867
MatheMatrix wants to merge 1 commit intofeature-5.5.6-local-cachefrom
sync/haidong.pang/refactor/volumeCache-api-url-rename@@2

Conversation

@MatheMatrix
Copy link
Copy Markdown
Owner

背景

跟进 zstack!9674 / premium!13604(HostCacheStore/VolumeCache 重命名)。Java/SDK 类名已全部迁移,但 REST URL 仍保留旧 local-volume-cache-pools / local-volume-cache 路径,文档/URL 视觉不一致。

主要改动

对齐到新资源命名 + ZStack REST 复数惯例(image-stores、primary-storages):

/hosts/{hostUuid}/local-volume-cache-pools[/{uuid}[/actions]]
  -> /hosts/{hostUuid}/host-cache-stores[/{uuid}[/actions]]
/hosts/local-volume-cache-pools[/{uuid}]
  -> /hosts/host-cache-stores[/{uuid}]
/volumes/{volumeUuid}/local-volume-cache/actions
  -> /volumes/{volumeUuid}/volume-cache/actions

本仓只动 SDK Action 文件(10 个)。@RestRequest 注解 + Doc groovy 在配对的 premium MR。

关联仓库 MR

  • premium:同名分支 refactor/volumeCache-api-url-rename@@2

验证

  • grep -rn 'local-volume-cache' sdk/ 已清零
  • 新 URL 已更新到所有 SDK Action 的 info.path

Jira

ZSTAC-81715

Note

替代 !9740(source branch 加 @@2 以与 premium 配对)。

sync from gitlab !9742

Follow-up of zstack!9674 / premium!13604. Class names already
migrated to HostCacheStore/VolumeCache, but REST URLs still used
the old local-volume-cache-pools / local-volume-cache paths.
Align URLs to new resource naming and ZStack REST plural
convention (image-stores, primary-storages):

  /hosts/{hostUuid}/local-volume-cache-pools[/{uuid}[/actions]]
    -> /hosts/{hostUuid}/host-cache-stores[/{uuid}[/actions]]
  /hosts/local-volume-cache-pools[/{uuid}]
    -> /hosts/host-cache-stores[/{uuid}]
  /volumes/{volumeUuid}/local-volume-cache/actions
    -> /volumes/{volumeUuid}/volume-cache/actions

This commit only touches generated SDK Action files. Matching
@RestRequest annotations and Doc groovy files updated in the
paired premium MR.

Resolves: ZSTAC-81715

Change-Id: I7acd945e1ab297cc2d28a04cbb933c8c9721d63f
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 27, 2026

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (10)
  • sdk/src/main/java/org/zstack/sdk/ChangeHostCacheStoreStateAction.java is excluded by !sdk/**
  • sdk/src/main/java/org/zstack/sdk/CreateHostCacheStoreAction.java is excluded by !sdk/**
  • sdk/src/main/java/org/zstack/sdk/DeleteHostCacheStoreAction.java is excluded by !sdk/**
  • sdk/src/main/java/org/zstack/sdk/DisableVolumeCacheAction.java is excluded by !sdk/**
  • sdk/src/main/java/org/zstack/sdk/EnableVolumeCacheAction.java is excluded by !sdk/**
  • sdk/src/main/java/org/zstack/sdk/ExtendHostCacheStoreAction.java is excluded by !sdk/**
  • sdk/src/main/java/org/zstack/sdk/QueryHostCacheStoreAction.java is excluded by !sdk/**
  • sdk/src/main/java/org/zstack/sdk/ReconnectHostCacheStoreAction.java is excluded by !sdk/**
  • sdk/src/main/java/org/zstack/sdk/SyncHostCacheStoreCapacityAction.java is excluded by !sdk/**
  • sdk/src/main/java/org/zstack/sdk/UpdateHostCacheStoreAction.java is excluded by !sdk/**

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

Configuration used: Path: http://open.zstack.ai:20001/code-reviews/zstack-cloud.yaml (via .coderabbit.yaml)

Review profile: CHILL

Plan: Pro

Run ID: df78f2bc-8475-416d-b585-1c30c01074e5

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch sync/haidong.pang/refactor/volumeCache-api-url-rename@@2

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

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.

1 participant