卷组 REST API

可使用此 REST API 来管理卷组。

创建卷组

URI /deployment/resources/volume_groups
方法 (method) POST
返回 200 已创建卷组,并且它包括在响应主体中。
400 如果解析请求中的 JSON 数据时出现问题,那么将返回此代码。
403 如果请求者没有足够的许可权来创建卷组,那么将返回此代码。
500 Platform System Manager 在处理请求时遇到内部错误。

创建卷组。

请求主体

{
     "name":"test",
     "description":"",
     "vdc":{"uri":"/deployment/resources/vdcs/75e3d73b-94e9-44c8-ba5a-45e42619bcd5"},
}

获取所有卷组

URI /admin/resources/volume_groups
方法 (method) GET
返回 200 返回所有卷组的列表。
404 找不到卷组列表。
500 Platform System Manager 在处理请求时遇到内部错误。

返回卷组的列表。

可使用可选参数来修改来自 REST API 调用的响应。 有关更多信息,请参阅相关信息部分。

created_time
创建对象的时间
描述
卷组的描述
id
对象在系统中的唯一标识
label_key
用于检索卷组的标签的关键字
label_text
卷组的缺省标签
名称
卷组的名称
state
对象的一般可用性。 如果是“pending”,那么表示对象已创建,但尚未激活。 如果是“available”,那么表示对象在系统中处于活动状态。
vdc
与卷相关联的 VDC

子代:

storage_volumesstorage_volume_statistics事件

获取特定卷组

URI /admin/resources/volume_groups/{id}
方法 (method) GET
返回 200 返回卷组。
404 找不到卷组。
500 Platform System Manager 在处理请求时遇到内部错误。

返回由 {id} 标识的单个卷组。

可使用可选参数来修改来自 REST API 调用的响应。 有关更多信息,请参阅相关信息部分。

导出卷组

URI /admin/resources/volume_groups/{id}
方法 (method) PUT
返回 202 正在导出卷组。
404 找不到卷组。
500 Platform System Manager 在处理请求时遇到内部错误。

导出卷组。

可使用可选参数来修改来自 REST API 调用的响应。 有关更多信息,请参阅相关信息部分。

请求主体

{
     "action":"export",
     "options": 
     {
	      "file.protocol": "scp",
        "file.username": "username",
        "file.password": "password",
        "file.host": "hostname",
        "file.port": 22,
        "file.path": "/tmp"
     }
}

导入卷组

URI admin/resources/volume_groups
方法 (method) POST
返回 202 已创建卷组,并且正在执行导入。
404 找不到卷组。
500 Platform System Manager 在处理请求时遇到内部错误。

导入卷组。

可使用可选参数来修改来自 REST API 调用的响应。 有关更多信息,请参阅相关信息部分。

请求主体

{
     "name": "importedVG",
     "action":"import",
     "options": 
     {
	      "file.protocol": "scp",
        "file.username": "root",
        "file.password": "password",
        "file.host": "hostname",
        "file.port": 22,
        "file.path": "/tmp//svg/svg1.json"
      }
}

克隆卷组

URI admin/resources/volume_groups/{id}
方法 (method) PUT
返回 202 已克隆卷组。
404 找不到卷组。
500 Platform System Manager 在处理请求时遇到内部错误。

克隆卷组。

可使用可选参数来修改来自 REST API 调用的响应。 有关更多信息,请参阅相关信息部分。

请求主体

{
"name": "clone",
"description": "clone my volume group",
"action": "clone",
"target_vdc": "cloud group id",
"volumes": [{"id": "75e3d73b-94e9-44c8-ba5a-45e42619bcd5", "name": "newname"}]
}