ModelArts Skill
Huawei Cloud ModelArts platform integration skill, featuring modular design, OBS as Notebook primary storage, and environment variable auto-authentication.
🔐 Security Model (CRITICAL)
All credentials handled internally, never returned to LLM:
┌─────────────────────────────────────────────────────────────┐
│ LLM / OpenClaw │
│ ❌ NEVER sees: AK, SK, Security Token, raw credentials │
│ ✅ ONLY sees: Masked status, API results, resource IDs │
└─────────────────────────────────────────────────────────────┘
↕ (Safe data only)
┌─────────────────────────────────────────────────────────────┐
│ auth_manager.py (Secure Vault) │
│ 🔒 Credentials stored in memory only │
│ ✅ Only masked data exposed externally │
└─────────────────────────────────────────────────────────────┘
↕ (Secure session)
┌─────────────────────────────────────────────────────────────┐
│ Module Functions (Secure SDK Wrapper) │
│ Unified pattern: access.sdk().execute(api_func, ...) │
│ Returns: Standard format API responses only │
└─────────────────────────────────────────────────────────────┘
🔑 Authentication Methods
| Mode |
How It Works |
| Notebook Mode |
Auto-detects ModelArts environment, zero configuration |
| Local Mode |
Reads MODELARTS_AK/SK/PROJECT_ID/REGION environment variables |
📚 Module Routing
Use keywords to find the corresponding reference file for function index and locations.
| Keyword | Reference File |
|---------|----------------|---------------|--------|
| notebook, jupyter, image, obs, flavor, cluster, auth | references/notebook.md |
| pool, resource pool, dedicated pool, node, workload, os network, plugin | references/pool.md |
| node pool, nodepool, scale node, node group, plugin, config template | references/node_pool.md |
| train, training job, 训练任务 | references/train.md |
| infer1.0, inference, service, 旧版推理服务,旧版在线服务 | references/infer_v1.md |
| infer2.0, inference, service, 新版推理服务,在线服务,新版在线服务 | references/infer_v2.md |
| management, workspace, authmode, authorization, quota, tag, scheduled event | references/management.md |
| swr, image repo, 镜像仓库 | references/swr.md |
| vpc, virtual private, subnet, security group, 虚拟私有云 | references/vpc.md |
| kms, key management, 密钥管理 | references/kms.md |
| liteserver, dev server, hyper cluster, hyperinstance, eip, roce | references/liteserver.md |
| common, auth, api helper, format result, decorator | references/common.md |
📦 Module Architecture
modelarts/
├── scripts/
│ ├── common_module/ # 跨模块共享基础设施
│ │ ├── __init__.py
│ │ ├── _bootstrap.py # 统一引导
│ │ ├── auth.py # 认证管理
│ │ ├── api_helper.py # API 调用封装
│ │ └── result.py # 返回格式统一
│ │
│ ├── notebook_module/ # Notebook & 镜像管理
│ ├── pool_module/ # 资源池管理
│ ├── node_pool_module/ # 节点池管理
│ ├── train_module/ # 训练任务管理
│ ├── infer_v1_module/ # 旧版推理服务管理
│ ├── infer_v2_module/ # 新版推理服务管理
│ ├── management_module/ # 平台管理: 工作空间/授权/配额/事件
│ ├── swr_module/ # SWR 镜像仓库
│ ├── vpc_module/ # VPC 虚拟私有云
│ ├── kms_module/ # KMS 密钥管理服务
│ ├── liteserver_module/ # Lite Server 轻量计算节点管理 (含 HPS/超节点完整支持)
│ └── __pycache__/
│
└── references/
├── notebook.md
├── pool.md
├── node_pool.md
├── train.md
├── infer_v1.md
├── infer_v2.md
├── management.md
├── swr.md
├── vpc.md
├── kms.md
└── common.md
✅ Design Features
- Modular Design - One file per function, clean structure, easy to maintain
- OBS as Primary Storage - Notebook can use OBS buckets directly as root filesystem
- OBS Bucket Management - Built-in create/delete/list OBS bucket functions
- Environment Variable Auth - Zero configuration for local/CI environments
- Unified API Pattern - All functions use consistent calling pattern
- Clean Deliverables - No temp scripts, no debug code, no redundant files
- Node Pool Management - Independent node pool lifecycle management
- Plugin Management - Resource pool plugin listing and creation (ListPoolPlugins, CreatePoolPlugin)
- Node Configuration Template Query - Query node configuration template details (ShowNodeConfigTemplate)
- Common Infrastructure - Extracted shared infrastructure, improved code reuse
- Training Job Management - Full lifecycle: create/list/stop/delete training jobs
- Inference Service Management - Old v1 API: create/list/start/stop/update/delete inference services
- Workspace & Authorization - Workspace CRUD, auth mode, IAM authorization, quotas, scheduled events
- SWR Image Repository - Query training images from SWR
- VPC Virtual Private Cloud - Query VPCs, Subnets, Security Groups from Huawei Cloud VPC service
- KMS Key Management Service - Query SSH keypairs from Huawei Cloud KMS
- Lite Server Management - Full lifecycle management of lightweight compute nodes (51 APIs covering Chapter 22)
- Hyper Cluster Management - Create, list, delete hyper clusters for high-performance computing
- Hyperinstance Operations - Scale, start, stop, and manage hyper instances
- Batch Operations - Bulk actions on multiple Lite Server instances (start/stop/reboot/changeOS/reinstallOS/delete)
- Job Management - Create, list, delete jobs on Lite Server instances
🎯 Quick Reference by Use Case
| What You Want To Do |
Go To Module |
| Start/Stop/Create/Delete Notebook |
notebook_module |
| Save Notebook to Image |
notebook_module |
| Attach/Detach OBS Storage |
notebook_module |
| Create/Delete OBS Buckets |
notebook_module |
| Create/Delete Dedicated Resource Pool |
pool_module |
| Batch Node Operations (Reboot/Delete/Lock/Resize) |
pool_module |
| Scale Node Pool Size |
node_pool_module |
| Create Additional Node Pools (different flavors) |
node_pool_module |
| List Resource Pool Plugins (ListPoolPlugins) |
node_pool_module |
| Create Plugin in Resource Pool (CreatePoolPlugin) |
node_pool_module |
| Query Node Configuration Template (ShowNodeConfigTemplate) |
node_pool_module |
| Create/Stop/Delete Training Job |
train_module |
| List Training Jobs (running/pending/completed) |
train_module |
| Create/Start/Stop/Delete Inference Service |
infer_v1_module |
| List/Get Inference Service Details |
infer_v1_module |
| List Models (custom/subscription) |
infer_v1_module |
| Create/Start/Stop/Delete Inference Service (新版) |
infer_v2_module |
| List/Get Inference Service Details (新版) |
infer_v2_module |
| Query Dedicated Pools & Flavors (新版) |
infer_v2_module |
| Get Service Exec Login Info (新版) |
infer_v2_module |
| Batch Delete Inference Services (新版) |
infer_v2_module |
| Service Version Management (新版) |
infer_v2_module |
| Service Events & Health Monitoring (新版) |
infer_v2_module |
| Region Detection & Consistency (新版) |
infer_v2_module |
| Create/Update/Delete Workspace |
management_module |
| Manage Authorization (add/delete/list) |
management_module |
| Query/Update Auth Mode |
management_module |
| List Quotas & Scheduled Events |
management_module |
| Query SWR Training Images |
swr_module |
| Query VPC/Subnet/SecurityGroup |
vpc_module |
| Query SSH Keypairs |
kms_module |
| Create/Start/Stop Lite Server Instances |
liteserver_module |
| Manage Hyper Clusters & Hyperinstances |
liteserver_module |
| Batch Operations on Lite Servers |
liteserver_module |
| Attach/Detach Volumes & EIPs |
liteserver_module |
| Query Flavors & Images for Lite Server |
liteserver_module |
| Create/Manage Jobs on Lite Server |
liteserver_module |
| Infrastructure / Internal Tools |
common_module |
1---2name: modelarts-skill3description: Huawei Cloud ModelArts platform integration. Modular design, OBS as primary storage support, environment variable authentication, includes pool plugin management and node configuration template queries.4---5
6# ModelArts Skill
7
8Huawei Cloud ModelArts platform integration skill, featuring modular design, OBS as Notebook primary storage, and environment variable auto-authentication.
9
10---
11
12## 🔐 Security Model (CRITICAL)
13
14All credentials handled internally, never returned to LLM:
15
16```
17┌─────────────────────────────────────────────────────────────┐
18│ LLM / OpenClaw │
19│ ❌ NEVER sees: AK, SK, Security Token, raw credentials │
20│ ✅ ONLY sees: Masked status, API results, resource IDs │
21└─────────────────────────────────────────────────────────────┘
22 ↕ (Safe data only)
23┌─────────────────────────────────────────────────────────────┐
24│ auth_manager.py (Secure Vault) │
25│ 🔒 Credentials stored in memory only │
26│ ✅ Only masked data exposed externally │
27└─────────────────────────────────────────────────────────────┘
28 ↕ (Secure session)
29┌─────────────────────────────────────────────────────────────┐
30│ Module Functions (Secure SDK Wrapper) │
31│ Unified pattern: access.sdk().execute(api_func, ...) │
32│ Returns: Standard format API responses only │
33└─────────────────────────────────────────────────────────────┘
34```
35
36---
37
38## 🔑 Authentication Methods
39
40| Mode | How It Works |
41|------|-------------|
42| **Notebook Mode** | Auto-detects ModelArts environment, zero configuration |
43| **Local Mode** | Reads `MODELARTS_AK/SK/PROJECT_ID/REGION` environment variables |
44
45---
46
47## 📚 Module Routing
48
49Use keywords to find the corresponding reference file for function index and locations.
50
51| Keyword | Reference File |
52|---------|----------------|---------------|--------|
53| **notebook, jupyter, image, obs, flavor, cluster, auth** | [`references/notebook.md`](references/notebook.md) |
54| **pool, resource pool, dedicated pool, node, workload, os network, plugin** | [`references/pool.md`](references/pool.md) |
55| **node pool, nodepool, scale node, node group, plugin, config template** | [`references/node_pool.md`](references/node_pool.md) |
56| **train, training job, 训练任务** | [`references/train.md`](references/train.md) |
57| **infer1.0, inference, service, 旧版推理服务,旧版在线服务** | [`references/infer_v1.md`](references/infer_v1.md) |
58| **infer2.0, inference, service, 新版推理服务,在线服务,新版在线服务** | [`references/infer_v2.md`](references/infer_v2.md) |
59| **management, workspace, authmode, authorization, quota, tag, scheduled event** | [`references/management.md`](references/management.md) |
60| **swr, image repo, 镜像仓库** | [`references/swr.md`](references/swr.md) |
61| **vpc, virtual private, subnet, security group, 虚拟私有云** | [`references/vpc.md`](references/vpc.md) |
62| **kms, key management, 密钥管理** | [`references/kms.md`](references/kms.md) |
63| **liteserver, dev server, hyper cluster, hyperinstance, eip, roce** | [`references/liteserver.md`](references/liteserver.md) |
64| **common, auth, api helper, format result, decorator** | [`references/common.md`](references/common.md) |
65
66---
67
68## 📦 Module Architecture
69
70```
71modelarts/
72├── scripts/
73│ ├── common_module/ # 跨模块共享基础设施
74│ │ ├── __init__.py
75│ │ ├── _bootstrap.py # 统一引导
76│ │ ├── auth.py # 认证管理
77│ │ ├── api_helper.py # API 调用封装
78│ │ └── result.py # 返回格式统一
79│ │
80│ ├── notebook_module/ # Notebook & 镜像管理
81│ ├── pool_module/ # 资源池管理
82│ ├── node_pool_module/ # 节点池管理
83│ ├── train_module/ # 训练任务管理
84│ ├── infer_v1_module/ # 旧版推理服务管理
85│ ├── infer_v2_module/ # 新版推理服务管理
86│ ├── management_module/ # 平台管理: 工作空间/授权/配额/事件
87│ ├── swr_module/ # SWR 镜像仓库
88│ ├── vpc_module/ # VPC 虚拟私有云
89│ ├── kms_module/ # KMS 密钥管理服务
90│ ├── liteserver_module/ # Lite Server 轻量计算节点管理 (含 HPS/超节点完整支持)
91│ └── __pycache__/
92│
93└── references/
94 ├── notebook.md
95 ├── pool.md
96 ├── node_pool.md
97 ├── train.md
98 ├── infer_v1.md
99 ├── infer_v2.md
100 ├── management.md
101 ├── swr.md
102 ├── vpc.md
103 ├── kms.md
104 └── common.md
105```
106
107---
108
109## ✅ Design Features
110
1111. **Modular Design** - One file per function, clean structure, easy to maintain
1122. **OBS as Primary Storage** - Notebook can use OBS buckets directly as root filesystem
1133. **OBS Bucket Management** - Built-in create/delete/list OBS bucket functions
1144. **Environment Variable Auth** - Zero configuration for local/CI environments
1155. **Unified API Pattern** - All functions use consistent calling pattern
1166. **Clean Deliverables** - No temp scripts, no debug code, no redundant files
1177. **Node Pool Management** - Independent node pool lifecycle management
1188. **Plugin Management** - Resource pool plugin listing and creation (ListPoolPlugins, CreatePoolPlugin)
1199. **Node Configuration Template Query** - Query node configuration template details (ShowNodeConfigTemplate)
12010. **Common Infrastructure** - Extracted shared infrastructure, improved code reuse
12111. **Training Job Management** - Full lifecycle: create/list/stop/delete training jobs
12212. **Inference Service Management** - Old v1 API: create/list/start/stop/update/delete inference services
12313. **Workspace & Authorization** - Workspace CRUD, auth mode, IAM authorization, quotas, scheduled events
12414. **SWR Image Repository** - Query training images from SWR
12515. **VPC Virtual Private Cloud** - Query VPCs, Subnets, Security Groups from Huawei Cloud VPC service
12616. **KMS Key Management Service** - Query SSH keypairs from Huawei Cloud KMS
12717. **Lite Server Management** - Full lifecycle management of lightweight compute nodes (51 APIs covering Chapter 22)
12818. **Hyper Cluster Management** - Create, list, delete hyper clusters for high-performance computing
12919. **Hyperinstance Operations** - Scale, start, stop, and manage hyper instances
13020. **Batch Operations** - Bulk actions on multiple Lite Server instances (start/stop/reboot/changeOS/reinstallOS/delete)
13121. **Job Management** - Create, list, delete jobs on Lite Server instances
132
133---
134
135## 🎯 Quick Reference by Use Case
136
137| What You Want To Do | Go To Module |
138|---------------------|-------------|
139| Start/Stop/Create/Delete Notebook | notebook_module |
140| Save Notebook to Image | notebook_module |
141| Attach/Detach OBS Storage | notebook_module |
142| Create/Delete OBS Buckets | notebook_module |
143| Create/Delete Dedicated Resource Pool | pool_module |
144| Batch Node Operations (Reboot/Delete/Lock/Resize) | pool_module |
145| Scale Node Pool Size | node_pool_module |
146| Create Additional Node Pools (different flavors) | node_pool_module |
147| List Resource Pool Plugins (ListPoolPlugins) | node_pool_module |
148| Create Plugin in Resource Pool (CreatePoolPlugin) | node_pool_module |
149| Query Node Configuration Template (ShowNodeConfigTemplate) | node_pool_module |
150| Create/Stop/Delete Training Job | train_module |
151| List Training Jobs (running/pending/completed) | train_module |
152| Create/Start/Stop/Delete Inference Service | infer_v1_module |
153| List/Get Inference Service Details | infer_v1_module |
154| List Models (custom/subscription) | infer_v1_module |
155| Create/Start/Stop/Delete Inference Service (新版) | infer_v2_module |
156| List/Get Inference Service Details (新版) | infer_v2_module |
157| Query Dedicated Pools & Flavors (新版) | infer_v2_module |
158| Get Service Exec Login Info (新版) | infer_v2_module |
159| Batch Delete Inference Services (新版) | infer_v2_module |
160| Service Version Management (新版) | infer_v2_module |
161| Service Events & Health Monitoring (新版) | infer_v2_module |
162| Region Detection & Consistency (新版) | infer_v2_module |
163| Create/Update/Delete Workspace | management_module |
164| Manage Authorization (add/delete/list) | management_module |
165| Query/Update Auth Mode | management_module |
166| List Quotas & Scheduled Events | management_module |
167| Query SWR Training Images | swr_module |
168| Query VPC/Subnet/SecurityGroup | vpc_module |
169| Query SSH Keypairs | kms_module |
170| Create/Start/Stop Lite Server Instances | liteserver_module |
171| Manage Hyper Clusters & Hyperinstances | liteserver_module |
172| Batch Operations on Lite Servers | liteserver_module |
173| Attach/Detach Volumes & EIPs | liteserver_module |
174| Query Flavors & Images for Lite Server | liteserver_module |
175| Create/Manage Jobs on Lite Server | liteserver_module |
176| Infrastructure / Internal Tools | common_module |