Command Palette

Search for a command to run...

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

huawei-cloud-vpn-connection-list

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

1. Inventory Huawei Cloud VPN gateways and their IPSec connections in one region through KooCLI (hcloud VPN ListVgws — read-only GET…

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

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

Huawei Cloud VPN Gateway & IPSec Connection Inventory

Overview

Inventory the VPN gateways and IPSec connections of a tenant through KooCLI hcloud VPN ListVgws (read-only GET /v5/{project_id}/vpn-gateways) and hcloud VPN ListVpnConnections (read-only GET /v5/{project_id}/vpn-connection). Both endpoints were verified against KooCLI 7.3.12 (hcloud VPN --help) and the official huaweicloudsdkvpn v5 client metadata (_list_vgws_http_info / _list_vpn_connections_http_info).

The skill answers the troubleshooting question "which IPSec connections are DOWN or have not negotiated?": every connection whose state is not a successful one is rendered in a separate, highlighted section, never mixed into the healthy list.

Architecture:

agent → python3 scripts/list_vpn_connections.py → hcloud VPN ListVgws
                                                → hcloud VPN ListVpnConnections (marker-paged)
      → Huawei Cloud VPN OpenAPI (vpn.<region>.myhuaweicloud.com) → parsed JSON
      → compact list / --table (9 gateway cols + 7 connection cols) / --json

(hcloud binary missing) → fallback: huaweicloudsdkvpn v5 VpnClient.list_vgws /
                                   VpnClient.list_vpn_connections

Key properties:

  • Read-only by design — only ListVgws and ListVpnConnections (both GET) are ever constructed. A write-intent guard scans user arguments and validates the operation name; mutating intents are rejected with an explicit message before any command runs.
  • CLI first, SDK fallback — KooCLI is the primary path; when the binary is absent the script falls back to the official huaweicloudsdkvpn v5 SDK. Credentials are always read by the CLI profile / SDK environment — never handled by the script.
  • Non-UP first — ACTIVE / UP are the successful states; every other real state (DOWN, ERROR, PENDING_*, ...) is counted and rendered in a dedicated section (default mode) or a dedicated table (--table).
  • No PSK exposure — the v5 response model carries no PSK, and the script strips any psk* key from every payload as defence in depth. Nothing is written to disk.
  • Offline-testable — paging, filters, error classification, guard, SDK fallback and rendering are covered by unit tests that mock the hcloud subprocess and the SDK client.

Out of scope: creating / updating / deleting VPN gateways or IPSec connections, ResetVpnConnection, PSK updates, customer gateway (CGW) CRUD, SSL VPN (P2C) servers and users, connection monitors, tags, and monitoring metrics. Those need a write-capable skill with explicit user confirmation.

Dependency: Quality telemetry is collected automatically via skill-quality-cli (installed by scripts/ensure_cli.sh if absent).

Prerequisites

  1. KooCLI (hcloud) installed — see references/cli-installation-guide.md. Alternative: pip install huaweicloudsdkcore huaweicloudsdkvpn to enable the SDK fallback path.
  2. Active credential profile — configure credentials out-of-band (run the KooCLI configure command in your terminal, or set 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. project_id (SDK fallback only) — the VPN v5 REST paths are /v5/{project_id}/vpn-gateways and /v5/{project_id}/vpn-connection; when falling back to the SDK, supply the project id via --project-id or the HUAWEICLOUD_SDK_PROJECT_ID / HUAWEI_PROJECT_ID environment variables. The KooCLI path resolves it from the profile automatically.
  4. IAM permission — read-only vpn:vpnGateways:list and vpn:vpnConnections:list; least-privilege policy in references/iam-policies.md.
  5. Python 3.8+ (standard library only — argparse / json / subprocess).
  6. Outbound HTTPS access to vpn.cn-north-4.myhuaweicloud.com.
  • skill-quality-cli — ensured by bash scripts/ensure_cli.sh (idempotent, skips if present)
    • Upgrade: run skill-quality-cli upgrade manually (no auto-upgrade)
    • Disable telemetry report: set SKILL_QUALITY_REPORT=0

Workflow

  1. Confirm the target region (default cn-north-4).
  2. Confirm KooCLI readiness (optional, read-only) by listing the active credential profile.
  3. Run the inventory script with the desired output mode and filters.
  4. Read the result — the compact list for humans, --table when the operator needs every column, --json for downstream tooling.
  5. Act on the non-UP section — inspect the flagged connections first (--status DOWN narrows straight to them), then drill into one gateway with --gateway-id.
  6. Handle the empty / error cases per the Edge Cases table below (the script prints an explicit hint for an empty region, 403, and missing AK/SK).

Core Commands

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

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

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

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

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

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

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

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

FAQ

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

1. Inventory Huawei Cloud VPN gateways and their IPSec connections in one region through KooCLI (hcloud VPN ListVgws — read-only GET /v5/{project_id}/vpn-gateways, and hcloud VPN ListVpnConnections — read-only GET /v5/{project_id}/vpn-connection), with an automatic fallback to the official huaweicloudsdkvpn v5 SDK when hcloud is not installed. 2. Three output modes: a compact per-gateway list (default) that renders every non-UP connection in a dedicated troubleshooting section, --table (two tables: 9 gateway columns and 7 connection columns, non-UP connections split into their own table), and --json. 3. Filters: --name (+ --fuzzy) on gateway or connection names, --gateway-id drilldown (also sent server-side as vgw_id), client-side --status on connection state (e.g. --status DOWN), and --region (default cn-north-4). 4. limit (1-100) plus automatic page_info.next_marker paging for ListVpnConnections; ListVgws is a single unpaged call. 5. Built-in write-intent guard: every mutating intent (create / update / delete a gateway or connection, reset a connection, update the PSK, tag changes, SSL VPN server or user management) is rejected before execution — this skill is strictly read-only. PSK material is never read, printed or persisted. 6. Triggers include: "vpn connection list", "list vpn connections", "VPN网关列表", "查询VPN连接", "哪些VPN连接DOWN", "ipsec connection status", "VPN 隧道未协商", "vpn gateway inventory". 7. Offline unit tests (mocked hcloud subprocess + fake SDK client) cover output modes, filters, marker paging, error classification, the SDK fallback, PSK stripping and the write-intent guard.

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

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

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

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

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

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