+ [task#121513] Add the method to get the volumes of the app.

This commit is contained in:
dingguodong
2024-06-27 16:00:39 +08:00
committed by 李阳
parent 16b10bee13
commit 3ef9e6a95e
+23
View File
@@ -552,6 +552,29 @@ class cneModel extends model
return $this->apiGet($apiUrl, $apiParams, $this->config->CNE->api->headers);
}
/**
* 查询应用的数据卷。
* Get app volumes.
*
* @link https://yapi.qc.oop.cc/project/21/interface/api/168
* @param object $instance
* @return object|false
*/
public function getAppVolumes(object $instance): object|false
{
$apiParams = new stdclass();
$apiParams->cluster = '';
$apiParams->namespace = $instance->spaceData->k8space;
$apiParams->name = $instance->k8name;
$apiParams->channel = $this->config->CNE->api->channel;
$apiUrl = "/api/cne/app/volumes";
$result = $this->apiGet($apiUrl, $apiParams, $this->config->CNE->api->headers);
if(!$result || $result->code != 200) return false;
return $result->data;
}
/**
* 按实例获取设置映射。
* Get settings mapping by instance.