Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

huawei-cloud-sfs-list

БесплатноЗапускает вложенные скриптыНе проверен

1. List Huawei Cloud SFS (Scalable File Service) file systems in a tenant region through KooCLI (`hcloud SFSTurbo ListShares` — read-only), with an automatic…

wlc-devот wlc-dev407 установок в других каталогах

Об этом скилле

Huawei Cloud SFS File System List

Overview

Query the SFS (Scalable File Service) file-system list of a tenant region through KooCLI hcloud SFSTurbo ListShares (read-only), with a fallback to the official huaweicloudsdksfsturbo v1 SDK (SFSTurboClient.list_shares, GET /v1/{project_id}/sfs-turbo/shares/detail). The skill is aimed at storage resource inventory, daily operations patrol, and as a pre-query step for other SFS skills that need a file-system ID.

Architecture:

agent → python3 scripts/list_sfs.py → hcloud SFSTurbo ListShares --cli-region=<region>
      → Huawei Cloud SFS OpenAPI (regional endpoint) → parsed JSON → table / --json / --names-only

(hcloud binary missing) → fallback: huaweicloudsdksfsturbo v1 SFSTurboClient.list_shares

Key properties:

  • Read-only by design — the only API ever invoked is ListShares (GET). A write-intent guard scans the user arguments and validates the operation name; mutating intents (create / delete / expand / shrink / resize / mount / unmount / attach / detach / restore / reboot ...) are rejected with an explicit message before any command runs.
  • CLI first, SDK fallback — KooCLI is the primary execution path; when the hcloud binary is absent, the script falls back to the official huaweicloudsdksfsturbo v1 SDK (list_shares). Credentials are always read by the CLI profile / SDK environment — never handled by the script.
  • Full-field table output — the default table renders the union of all fields returned by ListShares, with availability_zone surfaced explicitly and nested metadata JSON-encoded.
  • Client-side filtering — SFS ListShares accepts only limit / offset, so --name / --id / --status / --share-proto / --az are applied locally after the paged query completes.
  • Offline-testable — every code path (paging, filtering, error classification, guard, SDK fallback) is covered by unit tests that mock the hcloud subprocess.

Scope: this skill lists file systems. It does not list objects inside a file system, does not report quota/usage, and does not list the SFS 3.0 「通用文件系统」 (ListFileSystems) product — those require a separate skill/Issue.

Out of scope: every mutating SFS action (create / delete / expand / shrink / rename / ACL / permission rules / backend binding). Those require a dedicated write-capable skill and explicit user confirmation.

Prerequisites

  1. KooCLI (hcloud) installed — see references/cli-installation-guide.md. Alternative: pip install huaweicloudsdkcore huaweicloudsdksfsturbo to enable the SDK fallback path.
  2. Active credential profile — configure credentials out-of-band (hcloud configure in your terminal, or credential environment variables). Never paste AK/SK into chat; the script never reads, echoes, or stores secrets itself — authentication is delegated entirely to the hcloud profile / SDK environment.
  3. IAM permission — read-only permission for listing SFS file systems; least-privilege policy in references/iam-policies.md.
  4. Python 3.8+ (standard library only — argparse / json / subprocess / re).
  5. Outbound HTTPS access to sfs-turbo.<region>.myhuaweicloud.com.

Workflow

  1. Confirm the target region (default cn-north-4); every SFS call is region-scoped.
  2. Confirm hcloud readiness (optional, read-only): hcloud configure list.
  3. Run the list script with the desired output mode and filters.
  4. Read the result — table for humans, --json for downstream tooling, --names-only for a compact inventory.
  5. Handle the empty / error cases per the Error Handling table below.

Core Commands

# Full-field table (default)
python3 scripts/list_sfs.py --region cn-north-4

# Raw JSON of every returned field
python3 scripts/list_sfs.py --json

# Compact file-system name + ID inventory
python3 scripts/list_sfs.py --names-only

# Just the number of matching file systems
python3 scripts/list_sfs.py --count-only

# Filter by name / id (client-side, case-insensitive substring)
python3 scripts/list_sfs.py --name sfs-prod
python3 scripts/list_sfs.py --id 8be2f1a3

# Filter by status / protocol (client-side, exact)
python3 scripts/list_sfs.py --status available
python3 scripts/list_sfs.py --share-proto NFS

# Filter by availability zone (client-side, case-insensitive substring)
python3 scripts/list_sfs.py --az cn-north-4a

# Combine filters + custom page size
python3 scripts/list_sfs.py --region cn-south-1 --share-proto NFS --az cn-south-1a --names-only --page-size 100

Equivalent direct KooCLI command (the script wraps exactly this call, with paging):

hcloud SFSTurbo ListShares --cli-region=cn-north-4 --limit=200 --offset=0

Parameter Confirmation

Parameter Required Description Example
`--r
Полный SKILL.md на ClawHub

Установить huawei-cloud-sfs-list в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл huawei-cloud-sfs-list?

1. List Huawei Cloud SFS (Scalable File Service) file systems in a tenant region through KooCLI (`hcloud SFSTurbo ListShares` — read-only), with an automatic fallback to the official huaweicloudsdksfsturbo v1 SDK (SFSTurboClient.list_shares) when hcloud is not installed. 2. Output modes: full-field aligned table (default, every returned field including 名称/ID/状态/协议/容量/可用区/类型/企业项目), --json (raw response array), --names-only (compact file-system name + ID inventory) and --count-only (just the number of matching file systems). 3. Supports --region (default cn-north-4), --page-size with automatic limit/offset paging, and client-side --name / --id / --status / --share-proto / --az filtering (the SFS ListShares request itself only accepts limit/offset). 4. Explicit error hints for empty file-system lists (「当前区域无 SFS 文件 系统」), 403 / insufficient IAM permission (「无权限访问 SFS,请检查 IAM 权限」), missing or invalid AK/SK credentials, hcloud not installed, and KooCLI usage errors. 5. Built-in write-intent guard: any mutating intent (create / delete / expand / shrink / resize / mount / unmount / attach / detach / restore / reboot ...) or any operation other than the read-only ListShares is rejected before execution — this skill is strictly read-only. 6. Triggers include: "list SFS file systems", "SFS file system list", "SFS 文件系统列表", "查询SFS文件系统", "查询文件系统列表", "SFS Turbo 列表", "文件存储列表", "SFS inventory", "list file systems", "华为云SFS列表". 7. Offline unit tests (mocked hcloud subprocess) cover output modes, filters, paging, error scenarios, SDK fallback and the write-intent guard.

Как установить скилл huawei-cloud-sfs-list?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл huawei-cloud-sfs-list запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить huawei-cloud-sfs-list с