pcpool/models/compute_node.json

129 lines
2.4 KiB
JSON

{
"summary": [
{
"name": "compute_node",
"title": "算力节点",
"primary": [
"id"
],
"catelog": "entity"
}
],
"fields": [
{
"name": "id",
"title": "id",
"type": "str",
"length": 32,
"nullable": "no"
},
{
"name": "pool_id",
"title": "所属算力池",
"type": "str",
"length": 32
},
{
"name": "name",
"title": "节点名称",
"type": "str",
"length": 128,
"nullable": "no"
},
{
"name": "ip_address",
"title": "IP地址",
"type": "str",
"length": 64,
"nullable": "no"
},
{
"name": "ssh_port",
"title": "SSH端口",
"type": "int",
"default": 22
},
{
"name": "ssh_user",
"title": "SSH用户",
"type": "str",
"length": 64
},
{
"name": "cpu_cores",
"title": "CPU核数",
"type": "int",
"default": 0
},
{
"name": "memory_gb",
"title": "内存GB",
"type": "int",
"default": 0
},
{
"name": "gpu_count",
"title": "GPU数量",
"type": "int",
"default": 0
},
{
"name": "gpu_type",
"title": "GPU型号",
"type": "str",
"length": 64
},
{
"name": "node_type",
"title": "节点类型(control/compute/storage)",
"type": "char",
"length": 16
},
{
"name": "status",
"title": "状态(available/allocated/maintenance/offline)",
"type": "char",
"length": 16,
"default": "available"
},
{
"name": "last_heartbeat",
"title": "最后心跳",
"type": "timestamp"
},
{
"name": "created_at",
"title": "创建时间",
"type": "timestamp",
"nullable": "no"
},
{
"name": "updated_at",
"title": "更新时间",
"type": "timestamp",
"nullable": "no"
}
],
"codes": [
{
"field": "pool_id",
"table": "compute_pool",
"valuefield": "id",
"textfield": "name"
},
{
"field": "node_type",
"table": "appcodes_kv",
"valuefield": "k",
"textfield": "v",
"cond": "parentid='node_type'"
},
{
"field": "status",
"table": "appcodes_kv",
"valuefield": "k",
"textfield": "v",
"cond": "parentid='node_status'"
}
]
}