通过上传文件发现主机
接口URL
/api/v1/resource/discovery/file
请求方式
GET
Content-Type
form-data
请求Header参数
参数名 | 示例值 | 参数类型 | 是否必填 | 参数描述 |
---|---|---|---|---|
Accept | application/json | Text | 是 | - |
Content-Type | application/json | Text | 是 | - |
请求Body参数
参数名 | 示例值 | 参数类型 | 是否必填 | 参数描述 |
---|---|---|---|---|
file | ["/Users/wq/Downloads/主机模板.xlsx"] | Null | 否 | - |
认证方式
Bearer auth
成功响应示例
{
"Data":[
{
"IP":"172.17.0.15",
"UserName":"root",
"Password":"tem",
"SSHPort":22,
"CpuArch":"aarch64",
"CpuModel":"Kunpeng-920",
"CpuCores":64,
"OS":"CentOS Linux 8",
"Memory":190,
"Storage":7375,
"DiskType":"SSD",
"State":"OK",
"ErrorDescription":"[30118]host already exists in the resource pool\thost 172.17.0.15 is already exist"
}
],
"Success":true
}
参数名 | 示例值 | 参数类型 | 参数描述 |
---|---|---|---|
Data | - | Array | - |
Data.IP | 172.17.0.15 | String | IP 地址 |
Data.UserName | root | String | 用户名 |
Data.Password | password | String | 密码 |
Data.SSHPort | 22 | Integer | SSH 端口 |
Data.CpuArch | aarch64 | String | CPU 架构 [x86_64/aarch64] |
Data.CpuModel | Kunpeng-920 | String | CPU 型号 |
Data.CpuCores | 64 | Integer | CPU 核心数量 |
Data.OS | CentOS Linux 8 | String | 操作系统 |
Data.Memory | 190 | Integer | 内存容量,单位 GB |
Data.Storage | 7375 | Integer | 存储容量,单位 GB |
Data.DiskType | SSD | String | 磁盘类型 [HDD/SSD] |
Data.State | OK | String | 主机状态 [OK/ERROR] |
Data.ErrorDescription | [30118]host already exists in the resource pool host 172.17.0.15 is already exist | String | 主机错误信息 |
Success | true | Boolean | - |