Command Palette

Search for a command to run...

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

Huawei Cloud Bms List

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

1. List Huawei Cloud BMS (Bare Metal Server) instances in a tenant region through KooCLI (hcloud BMS ListBareMetalServers — read-only GET…

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

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

Huawei Cloud BMS Bare Metal Server List

Overview

Query the BMS (Bare Metal Server) instance list of a tenant region through KooCLI hcloud BMS ListBareMetalServers (official read-only GET /v1/{project_id}/baremetalservers/detail, verified in the huaweicloudsdkbms v1 client _list_bare_metal_servers_http_info metadata). The skill is aimed at bare-metal inventory inspection, daily operations patrol, resource reconciliation, and as a pre-query step for other BMS tasks that need a server id.

Architecture:

agent → python3 scripts/list_bms.py → hcloud BMS ListBareMetalServers --cli-region=<region>
      → Huawei Cloud BMS OpenAPI (regional endpoint) → parsed JSON → table / --json / --names-only
                                                                  ↘ [--md-file] → Markdown report (.md)

(hcloud binary missing) → fallback: huaweicloudsdkbms v1 BmsClient.list_bare_metal_servers

Key properties:

  • Read-only by design — the only API ever invoked is ListBareMetalServers (GET). A write-intent guard scans user arguments and validates the operation name; mutating intents (create / delete / update / reboot / rebuild / resize / reinstall / reset / attach / detach / change ...) 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 huaweicloudsdkbms v1 SDK (list_bare_metal_servers). 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 ListBareMetalServers, with flavor flattened into flavor_id/flavor_name, image into image_id, and the availability zone normalized.
  • Additive Markdown export — --md-file [PATH] writes an archival report (Region / 查询时间 / 主机总数 + a fixed inventory table 名称 | ID | 状态 | 规格 | 可用区 | IP, empty list → 共 0 个裸金属服务器, active filters listed) in addition to the stdout output, which stays exactly as before. The file is written through a temporary sibling and moved into place, so a failed write never leaves a half file.
  • Offline-testable — every code path (paging, filters, error classification, guard, SDK fallback, Markdown rendering and file write) is covered by unit tests that mock the hcloud subprocess.

Out of scope: every mutating BMS action (create / delete / update / rename / reboot / rebuild / reinstall OS / resize / reset password / attach or detach volume / manage NICs and tags). 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 huaweicloudsdkbms 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 bms:server:list; least-privilege policy in references/iam-policies.md.
  4. Python 3.8+ (standard library only — argparse / json / subprocess).
  5. Outbound HTTPS access to *.myhuaweicloud.com.

Workflow

  1. Confirm the target region (default cn-north-4); every BMS 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; add --md-file when the result must be archived / attached to a ticket (the stdout output is kept unchanged and the generated file path is printed).
  5. Handle the empty / error cases per the Edge Cases table below (the script prints an explicit hint for empty region, 403, missing AK/SK, and Markdown write failure).

Core Commands

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

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

# Compact server-name list only
python3 scripts/list_bms.py --names-only

# Filter by server status (server-side real API parameter)
python3 scripts/list_bms.py --status ACTIVE

# Filter by name (server-side) / by exact server ID (client-side)
python3 scripts/list_bms.py --name bms-demo
python3 scripts/list_bms.py --server-id 6a6f7a3b-2d3b-4b0e-9f3a-0d1f2c3d4e5f

# Combine filters
python3 scripts/list_bms.py --region cn-south-1 --status ACTIVE --names-only

# Also write a Markdown report to an explicit path (stdout output unchanged)
python3 scripts/list_bms.py --md-file /tmp/bms-inventory.md

# D
Полный SKILL.md на ClawHub

Установить Huawei Cloud Bms List в Claude Code и Claude Desktop

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

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

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

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

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

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

FAQ

Что делает скилл Huawei Cloud Bms List?

1. List Huawei Cloud BMS (Bare Metal Server) instances in a tenant region through KooCLI (hcloud BMS ListBareMetalServers — read-only GET /v1/{project_id}/baremetalservers/detail), with an automatic fallback to the official huaweicloudsdkbms v1 SDK when hcloud is not installed.

Как установить скилл Huawei Cloud Bms List?

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

Скилл Huawei Cloud Bms List запускает скрипты?

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

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

Сравнить Huawei Cloud Bms List с