验证对象存储服务的操作。
注解
在控制节点上执行这些步骤。
在每个客户端脚本中,配置对象存储服务客户端使用版本3的认证API:
$ echo "export OS_AUTH_VERSION=3" \
| tee -a admin-openrc.sh demo-openrc.sh
执行``demo``凭证:
$ source demo-openrc.sh
显示服务状态:
$ swift stat
Account: AUTH_ed0b60bf607743088218b0a533d5943f
Containers: 0
Objects: 0
Bytes: 0
Containers in policy "policy-0": 0
Objects in policy "policy-0": 0
Bytes in policy "policy-0": 0
X-Account-Project-Domain-Id: default
X-Timestamp: 1444143887.71539
X-Trans-Id: tx1396aeaf17254e94beb34-0056143bde
Content-Type: text/plain; charset=utf-8
Accept-Ranges: bytes
上传一个测试文件:
$ swift upload container1 FILE
FILE
用本地要上传到 container1 容器的文件名替换 FILE。
列出容器:
$ swift list
container1
下载一个测试文件:
$ swift download container1 FILE
FILE [auth 0.295s, headers 0.339s, total 0.339s, 0.005 MB/s]
用上传到 container1 容器的文件名替换 FILE。
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.