Command Palette

Search for a command to run...

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

huawei-cloud-eip-bandwidth-list

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

1. Query Huawei Cloud EIP bandwidth resources in a tenant region through KooCLI `hcloud EIP ListBandwidths` (read-only GET /v3/{project_id}/eip/bandwidths)…

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

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

Huawei Cloud EIP Bandwidth List

Overview

Inventory the Elastic IP bandwidth resources of a tenant region (shared / dedicated bandwidths, distinguished by share_type) through the read-only KooCLI operations:

agent → python3 scripts/list_bandwidths.py
      → hcloud EIP ListBandwidths  --cli-region=<region> [--share_type=] [--enterprise_project_id=] [--limit=] [--marker=]
      → hcloud EIP ShowBandwidth   --cli-region=<region> --bandwidth_id=<id>
      → Huawei Cloud EIP OpenAPI (vpc.<region>.myhuaweicloud.com) → parsed JSON
      → table / --json / --format md -o <file>

(hcloud binary missing) → fallback: huaweicloudsdkeip v3 EipClient.list_bandwidths / show_bandwidth

Key properties:

  • Read-only by design — only ListBandwidths and ShowBandwidth (both GET) are ever constructed. A write-intent guard scans user arguments and the operation name; create / update / delete / change charge mode / bind / unbind intents are rejected before any command runs.
  • Bandwidth-resource dimension — one row per bandwidth, with the number of attached public IPs derived from publicip_info; this is different from a public-IP-dimension list.
  • Filter + paging — --share-type and --enterprise-project-id are real server-side query parameters; --limit defaults to 10 and marker paging collects every page automatically.
  • Three output modes — fixed-header table (default), raw --json, and an archivable Markdown report via --format md -o <path>.
  • Offline-testable — every code path (guard, filters, marker paging, rendering, Markdown export, error classification, SDK fallback) is covered by unit tests that mock the hcloud subprocess.

Out of scope: every mutating bandwidth action (create / update / delete a bandwidth, change the charge mode, bind / unbind a public IP) and the public-IP-dimension inventory handled elsewhere in the repository.

Prerequisites

  1. KooCLI (hcloud) installed — see references/cli-installation-guide.md. Alternative: pip install huaweicloudsdkeip for the SDK fallback path.
  2. Active credential profile — configure credentials out-of-band (KooCLI configure in your terminal, or credential environment variables). Never paste AK/SK into chat; the script never reads, echoes, or stores secrets itself.
  3. project_id (SDK fallback only) — the bandwidth REST paths are /v3/{project_id}/eip/bandwidths[/*]; the SDK fallback needs the project id via --project-id or HUAWEICLOUD_SDK_PROJECT_ID / HUAWEI_PROJECT_ID. The KooCLI path resolves it from the profile automatically.
  4. IAM permission — eip:bandwidths:list and eip:bandwidths:get; least privilege policy in references/iam-policies.md.
  5. Python 3.8+ (standard library only for the CLI path).
  6. Outbound HTTPS access to vpc.<region>.myhuaweicloud.com.

Workflow

  1. Confirm the target region (default cn-north-4).
  2. Optionally confirm KooCLI readiness (read-only) by listing the active credential profile.
  3. Run the list script with the desired filters and output mode.
  4. Optional detail — pass --bandwidth-id <id> to query one bandwidth and see its public IPs and bandwidth rules.
  5. Read the result — fixed table for humans, --json for downstream tooling, --format md -o <path.md> for an archivable report.
  6. Handle empty / error cases per the tables below (empty region, filtered-empty, 403, missing AK/SK, hcloud missing). Empty queries still produce a valid Markdown file marked 「无数据」 with exit 0.

Core Commands

# List (default table)
python3 scripts/list_bandwidths.py --region cn-north-4

# Raw JSON array of bandwidth records
python3 scripts/list_bandwidths.py --region cn-north-4 --json

# Filter by share type (server-side): PER 独占 / WHOLE 共享
python3 scripts/list_bandwidths.py --share-type WHOLE

# Filter by enterprise project (server-side)
python3 scripts/list_bandwidths.py --enterprise-project-id 0

# Combine filters and change the page size (default 10)
python3 scripts/list_bandwidths.py --share-type PER --enterprise-project-id 0 --limit 50

# Single-bandwidth detail (switches to ShowBandwidth)
# Use an ID returned by the list command above; IDs are region/account specific.
python3 scripts/list_bandwidths.py --bandwidth-id <bandwidth-id>

# Detail as raw JSON
python3 scripts/list_bandwidths.py --bandwidth-id <bandwidth-id> --json

# Markdown export (default filename eip_bandwidth_list_<region>_<timestamp>.md)
python3 scripts/list_bandwidths.py --format md -o /data/reports/bandwidths.md

# Markdown export of a filtered empty result (header + 「无数据」)
python3 scripts/list_bandwidths.py --share-type WHOLE --format md -o bandwidth_whole.md

# Markdown detail export
python3 scripts/list_bandwidths.py --bandwidth-id <bandwidth-id> --format md -o bandwidth_detail.md

Equivalent direct KooCLI commands

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

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

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

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

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

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

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

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

FAQ

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

1. Query Huawei Cloud EIP bandwidth resources in a tenant region through KooCLI `hcloud EIP ListBandwidths` (read-only GET /v3/{project_id}/eip/bandwidths), with an automatic fallback to the official `huaweicloudsdkeip` v3 SDK (`list_bandwidths`) when hcloud is not installed. 2. Inspect a single bandwidth by `--bandwidth-id`, switching to `hcloud EIP ShowBandwidth` (read-only GET /v3/{project_id}/eip/bandwidths/{bandwidth_id}) and additionally listing each public IP (`publicip_address` / `publicip_type` / `ip_version`) and the `bandwidth_rules` / `rule_quota` fields. 3. List output carries 带宽名称 / 带宽 ID / 大小(Mbit/s) / share_type (PER 独占, WHOLE 共享) / charge_mode (bandwidth 按带宽, traffic 按流量) / 关联公网 IP 数 / 状态 / 企业项目 ID / 创建时间. 4. Server-side filters `--share-type {PER,WHOLE}` and `--enterprise-project-id`; `--limit` defaults to 10 (the Huawei Cloud list lower bound) and marker paging automatically aggregates all pages. 5. Three output modes: default fixed-header terminal table, `--json` (raw list array / detail object), and `--format md -o <file>` (archivable Markdown report; an empty list still writes the header plus 「无数据」). 6. Explicit error hints for empty results (distinguishing 「整体无带宽」 from 「按 share_type 过滤后为空」), 403 / insufficient IAM permission (`eip:bandwidths:list` / `eip:bandwidths:get`), missing AK/SK, hcloud not installed, missing project_id on the SDK fallback, and a 404 when the requested bandwidth does not exist. 7. Built-in write guard: only `ListBandwidths` / `ShowBandwidth` (both GET) are allowed; any mutating intent (create / update / delete a bandwidth, change charge mode, bind / unbind a public IP) is rejected before execution. This skill is strictly read-only. 8. Triggers include: "EIP 带宽列表", "带宽列表", "共享带宽盘点", "独占带宽查询", "EIP 带宽巡检", "查询带宽", "带宽明细", "EIP bandwidth list", "list bandwidths", "show bandwidth", "shared bandwidth inventory", "带宽计费模式核查", "导出带宽 Markdown".

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

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

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

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

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

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