Rechercher

PythonReactSEOPDF
OpenClaw

volcengine-storage-tos-test

Minimal TOS smoke tests. Validate AK/SK config, list buckets, and upload/download with Volcengine TOS. Supports both tosutil CLI and tos_manage.py script.

day2530 installations selon la source☆ 0 Étoiles du dépôt

Installation

Suivez les instructions du dépôt pour votre agent. Consultez les fichiers et dépendances avant l’installation.

SkillHub CLI

skillhub install day253/day253-volcengine-storage-tos-test

Examinez la source et la compatibilité, puis suivez les étapes d’installation.

Donnez le lien à votre agent et demandez-lui d’examiner instructions et dépendances avant d’expliquer les étapes.

Voir la source ↗Guides

Instructions

Category: test

TOS 对象存储最小可行性测试

Goals

  • 验证 AK/SK/Region/Endpoint 配置正确。
  • 验证 TOS 访问(列桶、上传、下载)。

Prerequisites

  • 已配置 AK/SK(环境变量或 .env)。
  • 已准备一个可读写的 TOS Bucket。

方式一:使用 tos_manage.py 脚本(推荐)

依赖:pip install tos

1) 列出 Bucket
python skills/storage/tos/volcengine-storage-tos/scripts/tos_manage.py list-buckets --print-json
2) 列出对象
python skills/storage/tos/volcengine-storage-tos/scripts/tos_manage.py list-objects \
  --bucket <bucket> --prefix "" --max-keys 20 --print-json
3) 上传小文件
echo "tos-manage-test-$(date +%s)" > /tmp/tos-test.txt
python skills/storage/tos/volcengine-storage-tos/scripts/tos_manage.py upload \
  --bucket <bucket> --key tests/tos-test.txt --file /tmp/tos-test.txt --print-json
4) 获取元数据
python skills/storage/tos/volcengine-storage-tos/scripts/tos_manage.py head \
  --bucket <bucket> --key tests/tos-test.txt --print-json
5) 下载并校验
python skills/storage/tos/volcengine-storage-tos/scripts/tos_manage.py download \
  --bucket <bucket> --key tests/tos-test.txt --file /tmp/tos-test-down.txt
diff /tmp/tos-test.txt /tmp/tos-test-down.txt && echo "PASS: content matches" || echo "FAIL: content mismatch"
6) 生成预签名 URL
python skills/storage/tos/volcengine-storage-tos/scripts/tos_manage.py presign \
  --bucket <bucket> --key tests/tos-test.txt --expires 300 --print-json
7) 清理测试文件
python skills/storage/tos/volcengine-storage-tos/scripts/tos_manage.py delete \
  --bucket <bucket> --key tests/tos-test.txt --confirm

方式二:使用 tosutil CLI

tosutil 是火山引擎官方 TOS 命令行工具,需单独下载安装。 参考:https://www.volcengine.com/docs/6349/148772

1) 查看配置
tosutil config
2) 列出 Bucket
tosutil ls
3) 列出对象(指定 bucket)
tosutil ls tos://<bucket> -s --limited-num 20
```...

Informations sur la source

Source
github
Repository
openclaw/skills
Path
skills/day253/day253-volcengine-storage-tos-test
Version
—
Commit
c6fea134d49f18fb97edca772e057edafcaf7224
Source de classification
rules
Statut
active
Visibilité
public

Ces informations proviennent de l’analyse indexée et peuvent être anciennes. Vérifiez les fichiers actuels.

Contenu extrait

SKILL.md
Category: test

# TOS 对象存储最小可行性测试

## Goals

- 验证 AK/SK/Region/Endpoint 配置正确。
- 验证 TOS 访问(列桶、上传、下载)。

## Prerequisites

- 已配置 AK/SK(环境变量或 `.env`)。
- 已准备一个可读写的 TOS Bucket。

---

## 方式一:使用 tos_manage.py 脚本(推荐)

依赖:`pip install tos`

### 1) 列出 Bucket

```bash
python skills/storage/tos/volcengine-storage-tos/scripts/tos_manage.py list-buckets --print-json
```

### 2) 列出对象

```bash
python skills/storage/tos/volcengine-storage-tos/scripts/tos_manage.py list-objects \
  --bucket <bucket> --prefix "" --max-keys 20 --print-json
```

### 3) 上传小文件

```bash
echo "tos-manage-test-$(date +%s)" > /tmp/tos-test.txt
python skills/storage/tos/volcengine-storage-tos/scripts/tos_manage.py upload \
  --bucket <bucket> --key tests/tos-test.txt --file /tmp/tos-test.txt --print-json
```

### 4) 获取元数据

```bash
python skills/storage/tos/volcengine-storage-tos/scripts/tos_manage.py head \
  --bucket <bucket> --key tests/tos-test.txt --print-json
```

### 5) 下载并校验

```bash
python skills/storage/tos/volcengine-storage-tos/scripts/tos_manage.py download \
  --bucket <bucket> --key tests/tos-test.txt --file /tmp/tos-test-down.txt
diff /tmp/tos-test.txt /tmp/tos-test-down.txt && echo "PASS: content matches" || echo "FAIL: content mismatch"
```

### 6) 生成预签名 URL

```bash
python skills/storage/tos/volcengine-storage-tos/scripts/tos_manage.py presign \
  --bucket <bucket> --key tests/tos-test.txt --expires 300 --print-json
```

### 7) 清理测试文件

```bash
python skills/storage/tos/volcengine-storage-tos/scripts/tos_manage.py delete \
  --bucket <bucket> --key tests/tos-test.txt --confirm
```

---

## 方式二:使用 tosutil CLI

tosutil 是火山引擎官方 TOS 命令行工具,需单独下载安装。
参考:https://www.volcengine.com/docs/6349/148772

### 1) 查看配置

```bash
tosutil config
```

### 2) 列出 Bucket

```bash
tosutil ls
```

### 3) 列出对象(指定 bucket)

```bash
tosutil ls tos://<bucket> -s --limited-num 20
```...

Skills associés

OpenClaw

1password

daggerkun007

Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.