Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

更改卷操作中文文档 #46

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 1 addition & 77 deletions docs/source/admin-api/master/volume.rst
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ ChubaoFS以 **Owner** 参数作为用户ID。在创建卷时,如果集群中

"name", "string", "卷名称", "是"
"authKey", "string", "计算vol的所有者字段的32位MD5值作为认证信息", "是"
"capacity", "int", "扩充后卷的配额,单位是GB", "是"
"capacity", "int", "扩充后卷的配额,必须大于已用空间的1.2倍,单位是GB", "是"
"zoneName", "string", "更新后所在区域,若不设置将被更新至default区域", "是"
"enableToken", "bool", "是否开启token控制读写权限,默认设为``false``", "否"
"followerRead", "bool", "允许从follower读取数据", "否"
Expand Down Expand Up @@ -274,79 +274,3 @@ ChubaoFS以 **Owner** 参数作为用户ID。在创建卷时,如果集群中
}
]

添加token
----------

.. code-block:: bash

curl -v "http://10.196.59.198:17010/token/add?name=test&tokenType=1&authKey=md5(owner)"

添加控制读写权限的token。

.. csv-table:: 参数列表
:header: "参数", "类型", "描述"

"name", "string", "卷名称"
"authKey", "string", "计算vol的所有者字段的32位MD5值作为认证信息"
"tokenType", "int", "1代表只读token,2代表读写token"


更新token
----------

.. code-block:: bash

curl -v "http://10.196.59.198:17010/token/update?name=test&token=xx&tokenType=1&authKey=md5(owner)"

更新token类型。

.. csv-table:: 参数列表
:header: "参数", "类型", "描述"

"name", "string", "卷名称"
"authKey", "string", "计算vol的所有者字段的32位MD5值作为认证信息"
"tokenType", "int", "1代表只读token,2代表读写token"
"token", "string", "token值"


删除token
----------

.. code-block:: bash

curl -v "http://10.196.59.198:17010/token/delete?name=test&token=xx&authKey=md5(owner)"

删除指定token。

.. csv-table:: 参数列表
:header: "参数", "类型", "描述"

"name", "string", "卷名称"
"authKey", "string", "计算vol的所有者字段的32位MD5值作为认证信息"
"token", "string", "待删除的token值"


获取token类型
--------------

.. code-block:: bash

curl -v "http://10.196.59.198:17010/token/get?name=test&token=xx"

获取指定token的类型。

.. csv-table:: 参数列表
:header: "参数", "类型", "描述"

"name", "string", "卷名称"
"token", "string", "token值"

响应示例

.. code-block:: json

{
"TokenType":2,
"Value":"siBtuF9hbnNqXzJfMTU48si3nzU4MzE1Njk5MDM1NQ==",
"VolName":"test"
}