feat: 对接宿主机组映射管理
This commit is contained in:
@@ -0,0 +1,141 @@
|
||||
import { http2 } from '@/utils/request.js'
|
||||
|
||||
/**
|
||||
* ================================
|
||||
* 主控服务管理 API
|
||||
* ================================
|
||||
*/
|
||||
|
||||
/** 获取 KVM 主控服务列表 */
|
||||
export const getKvmServiceList = (params) => {
|
||||
return http2.get('/api/v1/admin/server/host_service/list', { params })
|
||||
}
|
||||
|
||||
/** 获取 KVM 主控服务详情 */
|
||||
export const getKvmServiceDetail = (params) => {
|
||||
return http2.get('/api/v1/admin/server/host_service/detail', { params })
|
||||
}
|
||||
|
||||
/** 创建 KVM 主控服务 */
|
||||
export const createKvmService = (data) => {
|
||||
return http2.post('/api/v1/admin/server/host_service/create', data, {
|
||||
headers: { 'Content-Type': 'multipart/form-data' }
|
||||
})
|
||||
}
|
||||
|
||||
/** 修改 KVM 主控服务 */
|
||||
export const updateKvmService = (id, data) => {
|
||||
return http2.post(`/api/v1/admin/server/host_service/update?id=${id}`, data, {
|
||||
headers: { 'Content-Type': 'multipart/form-data' }
|
||||
})
|
||||
}
|
||||
|
||||
/** 删除 KVM 主控服务 */
|
||||
export const deleteKvmService = (params) => {
|
||||
return http2.delete('/api/v1/admin/server/host_service/delete', { params })
|
||||
}
|
||||
|
||||
/**
|
||||
* ================================
|
||||
* 宿主机组映射管理 API
|
||||
* ================================
|
||||
*/
|
||||
|
||||
/** 获取本地主机组列表 */
|
||||
export const getHostGroupList = (params) => {
|
||||
return http2.get('/api/v1/admin/server/host_service/host_group/list', { params })
|
||||
}
|
||||
|
||||
/** 从远程同步主机组到本地 */
|
||||
export const syncHostGroup = (data) => {
|
||||
return http2.post('/api/v1/admin/server/host_service/host_group/sync', data, {
|
||||
headers: { 'Content-Type': 'multipart/form-data' }
|
||||
})
|
||||
}
|
||||
|
||||
/** 绑定主机组到商品组或商品 */
|
||||
export const bindHostGroup = (data) => {
|
||||
return http2.post('/api/v1/admin/server/host_service/host_group/bind', data, {
|
||||
headers: { 'Content-Type': 'multipart/form-data' }
|
||||
})
|
||||
}
|
||||
|
||||
/** 修改本地主机组信息 */
|
||||
export const updateHostGroup = (data) => {
|
||||
return http2.post('/api/v1/admin/server/host_service/host_group/update', data, {
|
||||
headers: { 'Content-Type': 'multipart/form-data' }
|
||||
})
|
||||
}
|
||||
|
||||
/** 根据主机组树自动生成 GoodGroup/Goods/Args */
|
||||
export const generateGoodsByHostGroup = (data) => {
|
||||
return http2.post('/api/v1/admin/server/host_service/host_group/generate_goods', data, {
|
||||
headers: { 'Content-Type': 'multipart/form-data' }
|
||||
})
|
||||
}
|
||||
|
||||
/** 删除本地主机组 */
|
||||
export const deleteHostGroup = (params) => {
|
||||
return http2.delete('/api/v1/admin/server/host_service/host_group/delete', { params })
|
||||
}
|
||||
|
||||
/**
|
||||
* ================================
|
||||
* 主控服务接口 - 远程宿主机组管理
|
||||
* ================================
|
||||
*/
|
||||
|
||||
/** 获取远程主机组列表 */
|
||||
export const getRemoteHostGroupList = (params) => {
|
||||
return http2.get('/api/v1/admin/server/host_service/point/host_group/list', { params })
|
||||
}
|
||||
|
||||
/** 获取远程主机组详情 */
|
||||
export const getRemoteHostGroupDetail = (params) => {
|
||||
return http2.get('/api/v1/admin/server/host_service/point/host_group/detail', { params })
|
||||
}
|
||||
|
||||
/** 获取远程主机组树形结构 */
|
||||
export const getRemoteHostGroupTree = (params) => {
|
||||
return http2.get('/api/v1/admin/server/host_service/point/host_group/tree', { params })
|
||||
}
|
||||
|
||||
/** 获取主机组最优主机配置信息 */
|
||||
export const getOptimalHostInfo = (params) => {
|
||||
return http2.get('/api/v1/admin/server/host_service/point/host_group/optimal_host', { params })
|
||||
}
|
||||
|
||||
/** 创建远程主机组 */
|
||||
export const createRemoteHostGroup = (data) => {
|
||||
return http2.post('/api/v1/admin/server/host_service/point/host_group/create', data, {
|
||||
headers: { 'Content-Type': 'multipart/form-data' }
|
||||
})
|
||||
}
|
||||
|
||||
/** 修改远程主机组 */
|
||||
export const updateRemoteHostGroup = (data) => {
|
||||
return http2.post('/api/v1/admin/server/host_service/point/host_group/update', data, {
|
||||
headers: { 'Content-Type': 'multipart/form-data' }
|
||||
})
|
||||
}
|
||||
|
||||
/** 删除远程主机组 */
|
||||
export const deleteRemoteHostGroup = (params) => {
|
||||
return http2.delete('/api/v1/admin/server/host_service/point/host_group/delete', { params })
|
||||
}
|
||||
|
||||
/**
|
||||
* ================================
|
||||
* 主控服务接口 - 远程宿主机管理
|
||||
* ================================
|
||||
*/
|
||||
|
||||
/** 获取宿主机列表 */
|
||||
export const getRemoteHostList = (params) => {
|
||||
return http2.get('/api/v1/admin/server/host_service/point/host/list', { params })
|
||||
}
|
||||
|
||||
/** 获取宿主机详情 */
|
||||
export const getRemoteHostDetail = (params) => {
|
||||
return http2.get('/api/v1/admin/server/host_service/point/host/detail', { params })
|
||||
}
|
||||
Reference in New Issue
Block a user