标准化接口参数详情-资源计费与日志

查计量计费/账单/报警/机器/存储/日志六个模型字段(机器 worker_type、存储 storage_type/config 等)时读这篇

06-二次开发 / API参考 / 标准化接口参数详情
计量计费pod账单bill报警消息message机器资源node存储资源storagenfscos日志logs

资源计费与日志 参数详情

字段「默认值/必填/可选值」为后端表单(add/edit_form_extra_fields)静态快照,运行时可能随用户、配置或 _info 接口动态变化,联调时以 $view/api/_info 返回为准。通用调用约定见 README标准化接口

计量计费

/pod_modelview/api,表名:pod,视图:Pod_ModelView_Api,模型:Pod

源码:myapp/views/view_pod.pymyapp/models/model_pod.py

新增参数

无。

修改参数

无。

查看参数

无。

账单管理

/bill_modelview/api,表名:bill,视图:Bill_ModelView_Api,模型:Bill

源码:myapp/views/view_bill.pymyapp/models/model_bill.py

新增参数

无。

修改参数

无。

查看参数

参数 名称 类型 必填 默认值 唯一 说明 校验/可选值
details_url details_url computed

报警消息

/message_modelview/api,表名:message,视图:Message_ModelView_Api,模型:Message

源码:myapp/views/view_message.pymyapp/models/model_message.py

新增参数

无。

修改参数

无。

查看参数

无。

机器资源

/node_modelview/api,表名:node,视图:Node_ModelView_Api,模型:Node

源码:myapp/views/view_resource_node.pymyapp/models/model_node.py

新增参数

无。

修改参数

参数 名称 类型 必填 默认值 唯一 说明 校验/可选值
enable_cpu enable_cpu string(enum) true 是否允许调度cpu任务 choices=[['true', 'true'], ['false', 'false']]
enable_gpu enable_gpu string(enum) true 是否允许调度gpu任务 choices=[['true', 'true'], ['false', 'false']]
enable_vgpu enable_vgpu string(enum) false 是否允许调度vgpu任务 choices=[['true', 'true'], ['false', 'false']]
enable_rdma enable_rdma string(enum) false 是否允许调度rdma任务 choices=[['true', 'true'], ['false', 'false']]
gpu_type gpu_type string(enum) T4 gpu卡的类型 Regexp('^[A-Z0-9]*$'); choices=[['T4', 'T4'], ['V100', 'V100'], ['A10', 'A10'], ['A100', 'A100'], ['A800', 'A800'], ['H100', 'H100'], ['H...
org org string public 划分资源组,一台机器只能归属于一个资源组,字母、数字、减号 DataRequired(); Regexp('^[a-z0-9\-]*$')
worker_type worker_type array ['notebook', 'train', 'service'] 机器允许的任务类型 DataRequired(); choices=[[x, x] for x in ['notebook', 'train', 'service']]

查看参数

无。

存储资源

/storage_modelview/api,表名:storage,视图:Storage_ModelView_Api,模型:Storage

源码:myapp/views/view_resource_storage.pymyapp/models/model_storage.py

新增参数

参数 名称 类型 必填 默认值 唯一 说明 校验/可选值
storage_type storage_type string(enum) nfs 分布式文件存储类型 DataRequired(); choices=[['nfs', 'nfs'], ['cfs', 'tencent cloud cfs'], ['cos', 'tencent cloud cos'], ['nas', 'ali cloud nas'], ['oss', 'a...
name name string 英文名(小写字母、数字、- 组成),最长50个字符 DataRequired(); Regexp('^[a-z][a-z0-9\-]*[a-z0-9]$')
describe describe string 存储的描述 DataRequired()
config 配置 string '\nnfs:\n server: nfs-server-ip\n path: /path/to/nfs/shar... 参数配置,yaml格式 DataRequired()
clusters clusters array 可用集群 DataRequired(); choices=[[x, x] for x in list(conf.get('CLUSTERS', {}).keys())]

修改参数

参数 名称 类型 必填 默认值 唯一 说明 校验/可选值
storage_type storage_type string(enum) nfs 分布式文件存储类型 DataRequired(); choices=[['nfs', 'nfs'], ['cfs', 'tencent cloud cfs'], ['cos', 'tencent cloud cos'], ['nas', 'ali cloud nas'], ['oss', 'a...
name name string 英文名(小写字母、数字、- 组成),最长50个字符 DataRequired(); Regexp('^[a-z][a-z0-9\-]*[a-z0-9]$')
describe describe string 存储的描述 DataRequired()
config 配置 string '\nnfs:\n server: nfs-server-ip\n path: /path/to/nfs/shar... 参数配置,yaml格式 DataRequired()
clusters clusters array 可用集群 DataRequired(); choices=[[x, x] for x in list(conf.get('CLUSTERS', {}).keys())]

查看参数

无。

日志列表

/log_modelview/api,表名:logs,视图:LOG_ModelView_Api,模型:Log

源码:myapp/views/view_log.pymyapp/models/log.py

新增参数

无。

修改参数

无。

查看参数

无。

最后更新 2026-06-30完整文档以官方仓库为准:GitHub Wiki