Install
openclaw skills install @erickeyhu-hug/huawei-cloud-cce-queryQuery Huawei Cloud CCE (Cloud Container Engine) clusters and report their names, IDs, statuses, versions, and node information across a project. Use when listing CCE clusters, looking up a cluster name, showing cluster detail, or inspecting cluster status and nodes. Provides read-only inspection for daily operations, inventory reporting, and troubleshooting. Triggers include: CCE query, list CCE clusters, query CCE cluster names, CCE cluster inventory, show CCE cluster, list CCE nodes, check cluster status, CCE集群查询, 查询CCE集群, CCE集群名称, CCE集群列表, 查看CCE集群.
openclaw skills install @erickeyhu-hug/huawei-cloud-cce-queryThis skill provides read-only query capabilities for Huawei Cloud CCE (Cloud Container Engine, the managed Kubernetes service). It lists all clusters in a project with their names, IDs, status, version and flavor, shows a single cluster's detail, and lists nodes for a given cluster. It is designed for inventory reporting, daily inspection, and quick name lookups.
Architecture:
Agent → hcloud CLI (primary) → Huawei Cloud CCE API
↘ Python SDK (fallback) ↗
Applicable Scenarios:
references/cli-installation-guide.mdhuaweicloudsdkcce package (SDK fallback)hcloud configure setCCE ReadOnlyAccess or finer-grained policy — See references/iam-policies.md| Purpose | Command |
|---|---|
| List all CCE clusters (names, IDs, status) | hcloud CCE ListClusters --cli-region={region} |
| List clusters with a status filter | hcloud CCE ListClusters --cli-region={region} --status={status} |
| List clusters of a given type | hcloud CCE ListClusters --cli-region={region} --type={type} |
| List clusters with node/addon detail | hcloud CCE ListClusters --cli-region={region} --detail=true |
| Show a single cluster's detail | hcloud CCE ShowCluster --cli-region={region} --cluster_id={cluster_id} |
| Purpose | Command |
|---|---|
| List nodes in a cluster | hcloud CCE ListNodes --cli-region={region} --cluster_id={cluster_id} |
| Show a single node's detail | hcloud CCE ShowNode --cli-region={region} --cluster_id={cluster_id} --node_id={node_id} |
To extract just the cluster names:
hcloud CCE ListClusters --cli-region={region} | jq -r '.items[].metadata.name'
When the CLI is unavailable, use the Python SDK:
import os
from huaweicloudsdkcore.auth.credentials import BasicCredentials
from huaweicloudsdkcce.v3.region.cce_region import CceRegion
from huaweicloudsdkcce.v3 import CceClient, ListClustersRequest
credentials = BasicCredentials() \
.with_ak(os.getenv("HUAWEI_ACCESS_KEY")) \
.with_sk(os.getenv("HUAWEI_SECRET_KEY")) \
.with_project_id("{project_id}")
client = CceClient.new_builder() \
.with_credentials(credentials) \
.with_region(CceRegion.value_of("{region}")) \
.build()
request = ListClustersRequest()
response = client.list_clusters(request)
for cluster in response.items:
print(cluster.metadata.name, cluster.status.phase)
| Parameter | Required | Description | Example |
|---|---|---|---|
{region} | Yes | Huawei Cloud region | cn-north-4 |
{cluster_id} | Conditional | CCE cluster ID (required for ShowCluster/ListNodes) | 0ef72478-4e7e-11f1-a40f-0255ac100246 |
{node_id} | Conditional | CCE node ID (required for ShowNode) | d4f16c73-... |
{status} | No | Cluster status filter | Available |
{type} | No | Cluster type filter | VirtualMachine |
{project_id} | Conditional | Project ID (required for SDK/API) | 0a1234b56c78d9ef |
hcloud CCE <Operation> --cli-region=<region> [--key=value ...]
| Feature | Description | Example |
|---|---|---|
| Service name | CCE | hcloud CCE ListClusters |
| Operation name | PascalCase | ListClusters, ShowCluster, ListNodes |
| Region parameter | --cli-region=<value> | --cli-region=cn-north-4 |
| Simple parameter | --key=value | --cluster_id=xxx |