diff --git a/src/api/admin/kvmService.js b/src/api/admin/kvmService.js new file mode 100644 index 0000000..b524627 --- /dev/null +++ b/src/api/admin/kvmService.js @@ -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 }) +} diff --git a/src/components/admin/ProductGroupSelector.vue b/src/components/admin/ProductGroupSelector.vue new file mode 100644 index 0000000..81c5fbe --- /dev/null +++ b/src/components/admin/ProductGroupSelector.vue @@ -0,0 +1,312 @@ + + + + + diff --git a/src/config/menus.js b/src/config/menus.js index 87c1f83..fb6578d 100644 --- a/src/config/menus.js +++ b/src/config/menus.js @@ -135,6 +135,17 @@ export const menus = [ } ] }, + { + path: '/virtualization', + title: '虚拟化平台管理', + icon: 'Platform', + children: [ + { + path: '/virtualization/kvm-service', + title: '主控服务管理' + } + ] + }, { path: '/system', title: '系统管理', diff --git a/src/router/index.js b/src/router/index.js index 0f8db57..83e39e9 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -389,6 +389,35 @@ const routes = [ } ] }, + // 虚拟化平台管理路由 + { + path: 'virtualization', + name: 'Virtualization', + meta: { + title: '虚拟化平台管理', + icon: 'Platform' + }, + redirect: '/virtualization/kvm-service', + children: [ + { + path: 'kvm-service', + name: 'KvmService', + component: () => import('../views/virtualization/KvmService.vue'), + meta: { + title: '主控服务管理' + } + }, + { + path: 'host-group-mapping', + name: 'HostGroupMapping', + component: () => import('../views/virtualization/HostGroupMapping.vue'), + meta: { + title: '宿主机组映射管理', + activeMenu: '/virtualization/kvm-service' + } + } + ] + }, // 站点审计路由 { path: 'audit', diff --git a/src/views/virtualization/HostGroupMapping.vue b/src/views/virtualization/HostGroupMapping.vue new file mode 100644 index 0000000..583dc9a --- /dev/null +++ b/src/views/virtualization/HostGroupMapping.vue @@ -0,0 +1,707 @@ + + + + + diff --git a/src/views/virtualization/KvmService.vue b/src/views/virtualization/KvmService.vue new file mode 100644 index 0000000..e52c42f --- /dev/null +++ b/src/views/virtualization/KvmService.vue @@ -0,0 +1,461 @@ + + + + + diff --git a/默认模块.openapi.json b/默认模块.openapi.json new file mode 100644 index 0000000..e65ac1e --- /dev/null +++ b/默认模块.openapi.json @@ -0,0 +1,6826 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "默认模块", + "description": "", + "version": "1.0.0" + }, + "tags": [ + { + "name": "admin/微服务管理/虚拟化平台管理/主控服务管理" + }, + { + "name": "KvmService" + }, + { + "name": "admin/微服务管理/虚拟化平台管理/宿主机组映射管理" + }, + { + "name": "KvmServiceHostGroup" + }, + { + "name": "admin/微服务管理/虚拟化平台管理/主控服务接口/宿主机组管理" + }, + { + "name": "Point.HostGroup" + }, + { + "name": "admin/微服务管理/虚拟化平台管理/主控服务接口/宿主机管理" + }, + { + "name": "Point.Host" + }, + { + "name": "admin/微服务管理/虚拟化平台管理/主控服务接口/镜像管理" + }, + { + "name": "Point.Image" + }, + { + "name": "admin/微服务管理/虚拟化平台管理/主控服务接口/网络管理" + }, + { + "name": "Point.Network" + }, + { + "name": "admin/微服务管理/虚拟化平台管理/主控服务接口/数据卷管理" + }, + { + "name": "Point.Volume" + }, + { + "name": "admin/微服务管理/虚拟化平台管理/主控服务接口/虚拟机管理" + }, + { + "name": "Point.VM" + }, + { + "name": "admin/微服务管理/虚拟化平台管理/主控服务接口/安全组管理" + }, + { + "name": "Point.PostGroup" + }, + { + "name": "admin/微服务管理/虚拟化平台管理/主控服务接口/vnc节点管理" + }, + { + "name": "Point.VNC" + } + ], + "paths": { + "/api/v1/admin/server/host_service/list": { + "get": { + "summary": "获取 KVM 主控服务列表", + "deprecated": false, + "description": "", + "operationId": "GetKvmServiceList", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务管理", + "KvmService" + ], + "parameters": [ + { + "name": "page", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "count", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "key", + "in": "query", + "description": "搜索关键字", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/detail": { + "get": { + "summary": "获取 KVM 主控服务详情", + "deprecated": false, + "description": "", + "operationId": "GetKvmServiceDetail", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务管理", + "KvmService" + ], + "parameters": [ + { + "name": "id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/create": { + "post": { + "summary": "创建 KVM 主控服务", + "deprecated": false, + "description": "", + "operationId": "CreateKvmService", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务管理", + "KvmService" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "服务名称", + "example": "", + "type": "string" + }, + "note": { + "description": "备注说明", + "example": "", + "type": "string" + }, + "host": { + "description": "服务地址", + "example": "", + "type": "string" + }, + "port": { + "description": "服务端口", + "example": "", + "type": "string" + }, + "token": { + "description": "认证 Token", + "example": "", + "type": "string" + } + }, + "required": [ + "name", + "host", + "port" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/update": { + "post": { + "summary": "修改 KVM 主控服务", + "deprecated": false, + "description": "", + "operationId": "UpdateKvmService", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务管理", + "KvmService" + ], + "parameters": [ + { + "name": "id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "name": { + "example": "", + "type": "string" + }, + "note": { + "example": "", + "type": "string" + }, + "host": { + "example": "", + "type": "string" + }, + "port": { + "example": "", + "type": "string" + }, + "token": { + "example": "", + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/delete": { + "delete": { + "summary": "删除 KVM 主控服务", + "deprecated": false, + "description": "", + "operationId": "DeleteKvmService", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务管理", + "KvmService" + ], + "parameters": [ + { + "name": "id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/host_group/list": { + "get": { + "summary": "获取本地主机组列表", + "deprecated": false, + "description": "", + "operationId": "GetKvmServiceHostGroupList", + "tags": [ + "admin/微服务管理/虚拟化平台管理/宿主机组映射管理", + "KvmServiceHostGroup" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/host_group/sync": { + "post": { + "summary": "从远程同步主机组到本地", + "deprecated": false, + "description": "", + "operationId": "SyncKvmServiceHostGroup", + "tags": [ + "admin/微服务管理/虚拟化平台管理/宿主机组映射管理", + "KvmServiceHostGroup" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/host_group/bind": { + "post": { + "summary": "绑定主机组到商品组或商品", + "deprecated": false, + "description": "", + "operationId": "BindKvmServiceHostGroup", + "tags": [ + "admin/微服务管理/虚拟化平台管理/宿主机组映射管理", + "KvmServiceHostGroup" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "id": { + "description": "本地主机组 ID", + "example": 0, + "type": "integer" + }, + "good_group_id": { + "description": "绑定的商品分组 ID", + "example": 0, + "type": "integer" + }, + "good_id": { + "description": "绑定的商品 ID", + "example": 0, + "type": "integer" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/host_group/update": { + "post": { + "summary": "修改本地主机组信息", + "deprecated": false, + "description": "", + "operationId": "UpdateKvmServiceHostGroup", + "tags": [ + "admin/微服务管理/虚拟化平台管理/宿主机组映射管理", + "KvmServiceHostGroup" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "id": { + "example": 0, + "type": "integer" + }, + "name": { + "example": "", + "type": "string" + }, + "note": { + "example": "", + "type": "string" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/host_group/generate_goods": { + "post": { + "summary": "根据主机组树自动生成 GoodGroup/Goods/Args", + "deprecated": false, + "description": "", + "operationId": "GenerateGoodsByHostGroup", + "tags": [ + "admin/微服务管理/虚拟化平台管理/宿主机组映射管理", + "KvmServiceHostGroup" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "id": { + "description": "起始 KvmServiceHostGroup ID", + "example": 0, + "type": "integer" + }, + "parent_group_id": { + "description": "挂载到已有 GoodGroup 父级 ID", + "example": 0, + "type": "integer" + }, + "tag_id": { + "description": "根节点 GoodGroup 标签 ID", + "example": 0, + "type": "integer" + }, + "table": { + "description": "Goods 的 Table 标识", + "example": "kvm_service", + "type": "string" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/host_group/list": { + "get": { + "summary": "获取远程主机组列表", + "deprecated": false, + "description": "", + "operationId": "PointHostGroupList", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/宿主机组管理", + "Point.HostGroup" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "主控服务id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "parent_id", + "in": "query", + "description": "筛选父级宿主机组", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "page", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "page_size", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "keyword", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/host_group/detail": { + "get": { + "summary": "获取远程主机组详情", + "deprecated": false, + "description": "", + "operationId": "PointHostGroupGet", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/宿主机组管理", + "Point.HostGroup" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "主控服务id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "id", + "in": "query", + "description": "主机组id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/host_group/tree": { + "get": { + "summary": "获取远程主机组树形结构", + "deprecated": false, + "description": "", + "operationId": "PointHostGroupGetTree", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/宿主机组管理", + "Point.HostGroup" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "主控服务id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/host_group/optimal_host": { + "get": { + "summary": "获取主机组最优主机配置信息", + "deprecated": false, + "description": "", + "operationId": "PointHostGroupGetOptimalHostInfo", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/宿主机组管理", + "Point.HostGroup" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "主控服务id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "host_group_id", + "in": "query", + "description": "主机组id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/host_group/create": { + "post": { + "summary": "创建远程主机组", + "deprecated": false, + "description": "", + "operationId": "PointHostGroupCreate", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/宿主机组管理", + "Point.HostGroup" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "parent_id": { + "description": "筛选父级宿主机组", + "example": 0, + "type": "integer" + }, + "name": { + "example": "", + "type": "string" + }, + "note": { + "example": "", + "type": "string" + } + }, + "required": [ + "service_id", + "name" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/host_group/update": { + "post": { + "summary": "修改远程主机组", + "deprecated": false, + "description": "", + "operationId": "PointHostGroupUpdate", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/宿主机组管理", + "Point.HostGroup" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "id": { + "example": 0, + "type": "integer" + }, + "name": { + "example": "", + "type": "string" + }, + "note": { + "example": "", + "type": "string" + }, + "parent_id": { + "description": "父级宿主机组id", + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id", + "id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/host_group/delete": { + "delete": { + "summary": "删除远程主机组", + "deprecated": false, + "description": "", + "operationId": "PointHostGroupDelete", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/宿主机组管理", + "Point.HostGroup" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "主控服务id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/host/list": { + "get": { + "summary": "获取宿主机列表", + "deprecated": false, + "description": "", + "operationId": "PointHostList", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/宿主机管理", + "Point.Host" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "主控服务id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "page", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "page_size", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "keyword", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "host_group_id", + "in": "query", + "description": "筛选父级宿主机组", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/host/detail": { + "get": { + "summary": "获取宿主机详情", + "deprecated": false, + "description": "", + "operationId": "PointHostGet", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/宿主机管理", + "Point.Host" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "主控服务id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/host/metrics": { + "get": { + "summary": "获取宿主机指标数据", + "deprecated": false, + "description": "", + "operationId": "PointHostGetMetrics", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/宿主机管理", + "Point.Host" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "主控服务id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "host_id", + "in": "query", + "description": "宿主机id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/host/add": { + "post": { + "summary": "新增宿主机", + "deprecated": false, + "description": "", + "operationId": "PointHostAdd", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/宿主机管理", + "Point.Host" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "name": { + "description": "名称", + "example": "", + "type": "string" + }, + "description": { + "description": "介绍", + "example": "", + "type": "string" + }, + "base_url": { + "description": "宿主机服务url", + "example": "", + "type": "string" + }, + "token": { + "description": "宿主机服务Token", + "example": "", + "type": "string" + }, + "ip": { + "description": "宿主机 Ip", + "example": "", + "type": "string" + }, + "port": { + "description": "宿主机 ssh端口", + "example": 0, + "type": "integer" + }, + "user": { + "description": "宿主机 ssh用户名(使用远程专用用户 默认为 tunneluser)", + "example": "", + "type": "string" + }, + "password": { + "description": "宿主机 ssh密码", + "example": "", + "type": "string" + }, + "private_key_path": { + "description": "宿主机 ssh私钥地址", + "example": "", + "type": "string" + }, + "max_cpu": { + "description": "宿主机 最大cpu核心限制(不是真实cpu核心,只是允许开多少核心)", + "example": 0, + "type": "integer" + }, + "max_memory": { + "description": "宿主机 最大内存限制", + "example": 0, + "type": "integer" + }, + "max_disk": { + "description": "宿主机 最大硬盘限制", + "example": 0, + "type": "integer" + }, + "rx_bandwidth": { + "description": "宿主机 最大下行带宽", + "example": 0, + "type": "integer" + }, + "tx_bandwidth": { + "description": "宿主机 最大上行带宽", + "example": 0, + "type": "integer" + }, + "host_group_id": { + "description": "所属宿主机组", + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id", + "name", + "base_url", + "ip" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/host/update": { + "post": { + "summary": "修改宿主机", + "deprecated": false, + "description": "", + "operationId": "PointHostUpdate", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/宿主机管理", + "Point.Host" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "id": { + "example": 0, + "type": "integer" + }, + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "name": { + "description": "名称", + "example": "", + "type": "string" + }, + "description": { + "description": "介绍", + "example": "", + "type": "string" + }, + "base_url": { + "description": "宿主机服务url", + "example": "", + "type": "string" + }, + "token": { + "description": "宿主机服务Token", + "example": "", + "type": "string" + }, + "ip": { + "description": "宿主机 Ip", + "example": "", + "type": "string" + }, + "port": { + "description": "宿主机 ssh端口", + "example": 0, + "type": "integer" + }, + "user": { + "description": "宿主机 ssh用户名(使用远程专用用户 默认为 tunneluser)", + "example": "", + "type": "string" + }, + "password": { + "description": "宿主机 ssh密码", + "example": "", + "type": "string" + }, + "private_key_path": { + "description": "宿主机 ssh私钥地址", + "example": "", + "type": "string" + }, + "max_cpu": { + "description": "宿主机 最大cpu核心限制(不是真实cpu核心,只是允许开多少核心)", + "example": 0, + "type": "integer" + }, + "max_memory": { + "description": "宿主机 最大内存限制", + "example": 0, + "type": "integer" + }, + "max_disk": { + "description": "宿主机 最大硬盘限制", + "example": 0, + "type": "integer" + }, + "rx_bandwidth": { + "description": "宿主机 最大下行带宽", + "example": 0, + "type": "integer" + }, + "tx_bandwidth": { + "description": "宿主机 最大上行带宽", + "example": 0, + "type": "integer" + }, + "host_group_id": { + "description": "所属宿主机组", + "example": 0, + "type": "integer" + } + }, + "required": [ + "id", + "service_id", + "name", + "base_url", + "ip" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/host/delete": { + "delete": { + "summary": "删除宿主机", + "deprecated": false, + "description": "", + "operationId": "PointHostDelete", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/宿主机管理", + "Point.Host" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "主控服务id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/image/list": { + "get": { + "summary": "获取镜像列表", + "deprecated": false, + "description": "", + "operationId": "PointImageList", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/镜像管理", + "Point.Image" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "主控服务id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "page", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "count", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "os_type", + "in": "query", + "description": "筛选系统类型(linux\\windows)", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "type", + "in": "query", + "description": "筛选镜像类型 (system 系统 \\ data 数据)", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "status", + "in": "query", + "description": "筛选状态(pending\\downloading\\ready\\error)", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "keyword", + "in": "query", + "description": "筛选关键词", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/image/detail": { + "get": { + "summary": "获取镜像详情", + "deprecated": false, + "description": "", + "operationId": "PointImageGet", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/镜像管理", + "Point.Image" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "主控服务id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "image_id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/image/host_status": { + "get": { + "summary": "获取在指定宿主机上的状态", + "deprecated": false, + "description": "", + "operationId": "PointImageGetHostStatus", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/镜像管理", + "Point.Image" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "主控服务id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "image_id", + "in": "query", + "description": "镜像id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "host_id", + "in": "query", + "description": "宿主机id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer" + }, + "message": { + "type": "string" + }, + "data": { + "type": "object", + "properties": { + "image": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "os_type": { + "type": "string" + }, + "type": { + "type": "string" + }, + "path": { + "type": "string" + }, + "status": { + "type": "string" + }, + "description": { + "type": "string" + }, + "created_at": { + "type": "object", + "properties": { + "seconds": { + "type": "integer" + }, + "nanos": { + "type": "integer" + } + }, + "required": [ + "seconds", + "nanos" + ] + }, + "updated_at": { + "type": "object", + "properties": { + "seconds": { + "type": "integer" + }, + "nanos": { + "type": "integer" + } + }, + "required": [ + "seconds", + "nanos" + ] + } + }, + "required": [ + "id", + "name", + "os_type", + "type", + "path", + "status", + "description", + "created_at", + "updated_at" + ] + }, + "status": { + "type": "string" + } + }, + "required": [ + "image", + "status" + ] + } + }, + "required": [ + "code", + "message", + "data" + ] + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/image/create": { + "post": { + "summary": "创建镜像", + "deprecated": false, + "description": "", + "operationId": "PointImageCreate", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/镜像管理", + "Point.Image" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "name": { + "description": "名称", + "example": "", + "type": "string" + }, + "path": { + "description": "地址(可以是url也可以是在服务器上的路径)\nhttp://........\n/root/data/...", + "example": "", + "type": "string" + }, + "os_type": { + "description": "系统类型(linux\\windows)", + "example": "", + "type": "string" + }, + "type": { + "description": "镜像类型 (system 系统 \\ data 数据)", + "example": "", + "type": "string" + }, + "description": { + "description": "介绍", + "example": "", + "type": "string" + } + }, + "required": [ + "service_id", + "name", + "path" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/image/update": { + "post": { + "summary": "修改镜像", + "deprecated": false, + "description": "", + "operationId": "PointImageUpdate", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/镜像管理", + "Point.Image" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "image_id": { + "description": "镜像id", + "example": 0, + "type": "integer" + }, + "status": { + "description": "镜像状态(pending\\downloading\\ready\\error)", + "example": "", + "type": "string" + }, + "size": { + "description": "镜像大小", + "example": 0, + "type": "integer" + }, + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "image_name": { + "description": "名称", + "example": "", + "type": "string" + }, + "path": { + "description": "地址(可以是url也可以是在服务器上的路径)\nhttp://........\n/root/data/...", + "example": "", + "type": "string" + }, + "os_type": { + "description": "系统类型(linux\\windows)", + "example": "", + "type": "string" + }, + "type": { + "description": "镜像类型 (system 系统 \\ data 数据)", + "example": "", + "type": "string" + }, + "description": { + "description": "介绍", + "example": "", + "type": "string" + } + }, + "required": [ + "image_id", + "service_id", + "image_name", + "path" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/image/delete": { + "delete": { + "summary": "删除镜像", + "deprecated": false, + "description": "", + "operationId": "PointImageDelete", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/镜像管理", + "Point.Image" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "image_id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/image/reload": { + "post": { + "summary": "重新下载镜像", + "deprecated": false, + "description": "", + "operationId": "PointImageReload", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/镜像管理", + "Point.Image" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "example": 0, + "type": "integer" + }, + "image_id": { + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id", + "image_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/image/sync": { + "post": { + "summary": "向宿主机同步镜像", + "deprecated": false, + "description": "", + "operationId": "PointImageSync", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/镜像管理", + "Point.Image" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "host_id": { + "description": "宿主机id", + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id", + "host_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/image/reload_host": { + "post": { + "summary": "指定宿主机重新下载指定镜像", + "deprecated": false, + "description": "", + "operationId": "PointImageReloadHost", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/镜像管理", + "Point.Image" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "image_id": { + "description": "镜像id", + "example": 0, + "type": "integer" + }, + "host_id": { + "description": "宿主机id", + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id", + "image_id", + "host_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer" + }, + "message": { + "type": "string" + }, + "data": { + "type": "object", + "properties": { + "image": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "os_type": { + "type": "string" + }, + "type": { + "type": "string" + }, + "path": { + "type": "string" + }, + "status": { + "type": "string" + }, + "description": { + "type": "string" + }, + "created_at": { + "type": "object", + "properties": { + "seconds": { + "type": "integer" + }, + "nanos": { + "type": "integer" + } + }, + "required": [ + "seconds", + "nanos" + ] + }, + "updated_at": { + "type": "object", + "properties": { + "seconds": { + "type": "integer" + }, + "nanos": { + "type": "integer" + } + }, + "required": [ + "seconds", + "nanos" + ] + } + }, + "required": [ + "id", + "name", + "os_type", + "type", + "path", + "status", + "description", + "created_at", + "updated_at" + ] + }, + "status": { + "type": "string" + } + }, + "required": [ + "image", + "status" + ] + } + }, + "required": [ + "code", + "message", + "data" + ] + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/network/list": { + "get": { + "summary": "获取网络列表", + "deprecated": false, + "description": "", + "operationId": "PointNetworkList", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/网络管理", + "Point.Network" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "主控服务id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "page", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "count", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "key", + "in": "query", + "description": "关键字筛选", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "type", + "in": "query", + "description": "网络类型(bridge(网桥) \\ nat(内网))", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "host_id", + "in": "query", + "description": "宿主机id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer" + }, + "message": { + "type": "string" + }, + "data": { + "type": "object", + "properties": { + "meta": { + "type": "object", + "properties": { + "count": { + "type": "integer" + } + }, + "required": [ + "count" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "address": { + "type": "string" + }, + "gateway": { + "type": "string" + }, + "nameservers": { + "type": "string" + }, + "type": { + "type": "string" + }, + "mac_address": { + "type": "string" + }, + "bridge_name": { + "type": "string" + }, + "ls_bridge_name": { + "type": "string" + }, + "ls_name": { + "type": "string" + }, + "target_device": { + "type": "string" + }, + "host_id": { + "type": "integer" + }, + "created_at": { + "type": "object", + "properties": { + "seconds": { + "type": "integer" + }, + "nanos": { + "type": "integer" + } + }, + "required": [ + "seconds", + "nanos" + ] + }, + "updated_at": { + "type": "object", + "properties": { + "seconds": { + "type": "integer" + }, + "nanos": { + "type": "integer" + } + }, + "required": [ + "seconds", + "nanos" + ] + } + }, + "required": [ + "id", + "name", + "address", + "gateway", + "nameservers", + "type", + "mac_address", + "bridge_name", + "ls_bridge_name", + "ls_name", + "target_device", + "host_id", + "created_at", + "updated_at" + ] + } + } + }, + "required": [ + "meta", + "data" + ] + } + }, + "required": [ + "code", + "message", + "data" + ] + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/network/detail": { + "get": { + "summary": "获取网络详情", + "deprecated": false, + "description": "", + "operationId": "PointNetworkGet", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/网络管理", + "Point.Network" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "主控服务id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "network_id", + "in": "query", + "description": "网络id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "host_id", + "in": "query", + "description": "宿主机id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer" + }, + "message": { + "type": "string" + }, + "data": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "address": { + "type": "string" + }, + "gateway": { + "type": "string" + }, + "nameservers": { + "type": "string" + }, + "type": { + "type": "string" + }, + "mac_address": { + "type": "string" + }, + "bridge_name": { + "type": "string" + }, + "ls_bridge_name": { + "type": "string" + }, + "ls_name": { + "type": "string" + }, + "target_device": { + "type": "string" + }, + "host_id": { + "type": "integer" + }, + "created_at": { + "type": "object", + "properties": { + "seconds": { + "type": "integer" + }, + "nanos": { + "type": "integer" + } + }, + "required": [ + "seconds", + "nanos" + ] + }, + "updated_at": { + "type": "object", + "properties": { + "seconds": { + "type": "integer" + }, + "nanos": { + "type": "integer" + } + }, + "required": [ + "seconds", + "nanos" + ] + } + }, + "required": [ + "id", + "name", + "address", + "gateway", + "nameservers", + "type", + "mac_address", + "bridge_name", + "ls_bridge_name", + "ls_name", + "target_device", + "host_id", + "created_at", + "updated_at" + ] + } + }, + "required": [ + "data" + ] + } + }, + "required": [ + "code", + "message", + "data" + ] + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/network/create": { + "post": { + "summary": "创建网络", + "deprecated": false, + "description": "", + "operationId": "PointNetworkCreate", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/网络管理", + "Point.Network" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "name": { + "description": "名称", + "example": "", + "type": "string" + }, + "address": { + "description": "ip地址 CIDR类型 192.168.1.1/24", + "example": "", + "type": "string" + }, + "gateway": { + "description": "网关地址 如 192.168.1.1", + "example": "", + "type": "string" + }, + "nameservers": { + "description": "dns服务器(不填默认114.114.114.114,8.8.8.8) ", + "example": "", + "type": "string" + }, + "type": { + "description": "网络类型 bridge(网桥|外网) \\ nat(内网)", + "example": "", + "type": "string" + }, + "mac_address": { + "description": "虚拟网卡MAC地址(不填随机)", + "example": "", + "type": "string" + }, + "bridge_name": { + "description": "虚拟网桥名称(不填默认)", + "example": "", + "type": "string" + }, + "ls_bridge_name": { + "description": "宿主机逻辑网桥名称(不填默认)", + "example": "", + "type": "string" + }, + "ls_name": { + "description": "宿主机逻辑端口名称(不填默认)", + "example": "", + "type": "string" + }, + "host_id": { + "description": "宿主机id", + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id", + "name", + "address", + "gateway", + "type", + "host_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer" + }, + "message": { + "type": "string" + }, + "data": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "address": { + "type": "string" + }, + "gateway": { + "type": "string" + }, + "nameservers": { + "type": "string" + }, + "type": { + "type": "string" + }, + "mac_address": { + "type": "string" + }, + "bridge_name": { + "type": "string" + }, + "ls_bridge_name": { + "type": "string" + }, + "ls_name": { + "type": "string" + }, + "target_device": { + "type": "string" + }, + "host_id": { + "type": "integer" + }, + "created_at": { + "type": "object", + "properties": { + "seconds": { + "type": "integer" + }, + "nanos": { + "type": "integer" + } + }, + "required": [ + "seconds", + "nanos" + ] + }, + "updated_at": { + "type": "object", + "properties": { + "seconds": { + "type": "integer" + }, + "nanos": { + "type": "integer" + } + }, + "required": [ + "seconds", + "nanos" + ] + } + }, + "required": [ + "id", + "name", + "address", + "gateway", + "nameservers", + "type", + "mac_address", + "bridge_name", + "ls_bridge_name", + "ls_name", + "target_device", + "host_id", + "created_at", + "updated_at" + ] + } + }, + "required": [ + "data" + ] + } + }, + "required": [ + "code", + "message", + "data" + ] + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/network/update": { + "post": { + "summary": "修改网络", + "deprecated": false, + "description": "", + "operationId": "PointNetworkUpdate", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/网络管理", + "Point.Network" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "id": { + "example": 0, + "type": "integer" + }, + "name": { + "description": "名称", + "example": "", + "type": "string" + }, + "address": { + "description": "ip地址 CIDR类型 192.168.1.1/24", + "example": "", + "type": "string" + }, + "gateway": { + "description": "网关地址 如 192.168.1.1", + "example": "", + "type": "string" + }, + "nameservers": { + "description": "dns服务器(不填默认114.114.114.114,8.8.8.8)", + "example": "", + "type": "string" + }, + "type": { + "description": "网络类型 bridge(网桥) \\ nat(内网)", + "example": "", + "type": "string" + }, + "mac_address": { + "description": "虚拟网卡MAC地址(不填随机)", + "example": "", + "type": "string" + }, + "bridge_name": { + "description": "虚拟网桥名称(不填默认)", + "example": "", + "type": "string" + }, + "ls_bridge_name": { + "description": "宿主机逻辑网桥名称(不填默认)", + "example": "", + "type": "string" + }, + "ls_name": { + "description": "宿主机逻辑端口名称(不填默认)", + "example": "", + "type": "string" + }, + "host_id": { + "description": "宿主机id", + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id", + "id", + "host_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/network/delete": { + "delete": { + "summary": "删除网络", + "deprecated": false, + "description": "", + "operationId": "PointNetworkDelete", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/网络管理", + "Point.Network" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "主控服务id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "network_id", + "in": "query", + "description": "网络id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "host_id", + "in": "query", + "description": "宿主机id", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/volume/list": { + "get": { + "summary": "获取数据卷列表", + "deprecated": false, + "description": "", + "operationId": "PointVolumeList", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/数据卷管理", + "Point.Volume" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "主控服务id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "page", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "count", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "status", + "in": "query", + "description": "筛选数据卷状态( pending \\ ready \\ error \\ unknown)", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "host_id", + "in": "query", + "description": "宿主机id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "vm_id", + "in": "query", + "description": "筛选所属虚拟机id", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "image_id", + "in": "query", + "description": "筛选镜像id", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/volume/detail": { + "get": { + "summary": "获取数据卷详情", + "deprecated": false, + "description": "", + "operationId": "PointVolumeGet", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/数据卷管理", + "Point.Volume" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "主控服务id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "volume_id", + "in": "query", + "description": "数据卷id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer" + }, + "message": { + "type": "string" + }, + "data": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "is_system": { + "type": "boolean" + }, + "path": { + "type": "string" + }, + "status": { + "type": "string" + }, + "host_id": { + "type": "integer" + }, + "host_volume_id": { + "type": "integer" + }, + "created_at": { + "type": "object", + "properties": { + "seconds": { + "type": "integer" + }, + "nanos": { + "type": "integer" + } + }, + "required": [ + "seconds", + "nanos" + ] + }, + "updated_at": { + "type": "object", + "properties": { + "seconds": { + "type": "integer" + }, + "nanos": { + "type": "integer" + } + }, + "required": [ + "seconds", + "nanos" + ] + } + }, + "required": [ + "id", + "name", + "size", + "is_system", + "path", + "status", + "host_id", + "host_volume_id", + "created_at", + "updated_at" + ] + } + }, + "required": [ + "data" + ] + } + }, + "required": [ + "code", + "message", + "data" + ] + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/volume/create": { + "post": { + "summary": "创建数据卷", + "deprecated": false, + "description": "", + "operationId": "PointVolumeCreate", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/数据卷管理", + "Point.Volume" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "name": { + "description": "名称", + "example": "", + "type": "string" + }, + "size": { + "description": "数据卷大小 GB", + "example": 0, + "type": "integer" + }, + "is_system": { + "description": "是否系统镜像", + "example": "", + "type": "boolean" + }, + "target_device": { + "description": "挂载虚拟机目标设备名称(不填自动生成)", + "example": "", + "type": "string" + }, + "vm_id": { + "description": "挂载的虚拟机id", + "example": 0, + "type": "integer" + }, + "image_id": { + "description": "所属镜像id", + "example": 0, + "type": "integer" + }, + "host_id": { + "description": "宿主机id", + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id", + "name", + "size", + "host_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer" + }, + "message": { + "type": "string" + }, + "data": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "path": { + "type": "string" + }, + "status": { + "type": "string" + }, + "host_id": { + "type": "integer" + }, + "host_volume_id": { + "type": "integer" + }, + "created_at": { + "type": "object", + "properties": { + "seconds": { + "type": "integer" + }, + "nanos": { + "type": "integer" + } + }, + "required": [ + "seconds", + "nanos" + ] + }, + "updated_at": { + "type": "object", + "properties": { + "seconds": { + "type": "integer" + }, + "nanos": { + "type": "integer" + } + }, + "required": [ + "seconds", + "nanos" + ] + } + }, + "required": [ + "id", + "name", + "size", + "path", + "status", + "host_id", + "host_volume_id", + "created_at", + "updated_at" + ] + } + }, + "required": [ + "data" + ] + } + }, + "required": [ + "code", + "message", + "data" + ] + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/volume/resize": { + "post": { + "summary": "调整数据卷大小", + "deprecated": false, + "description": "", + "operationId": "PointVolumeResize", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/数据卷管理", + "Point.Volume" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "volume_id": { + "description": "数据卷id", + "example": 0, + "type": "integer" + }, + "size": { + "description": "大小 GB", + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id", + "volume_id", + "size" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer" + }, + "message": { + "type": "string" + }, + "data": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "host_id": { + "type": "integer" + }, + "created_at": { + "type": "object", + "properties": { + "seconds": { + "type": "integer" + } + }, + "required": [ + "seconds" + ] + }, + "updated_at": { + "type": "object", + "properties": { + "seconds": { + "type": "integer" + } + }, + "required": [ + "seconds" + ] + } + }, + "required": [ + "id", + "host_id", + "created_at", + "updated_at" + ] + }, + "task": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "task_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "status": { + "type": "string" + }, + "tag": { + "type": "string" + }, + "message": { + "type": "string" + }, + "host_id": { + "type": "integer" + }, + "created_at": { + "type": "object", + "properties": { + "seconds": { + "type": "integer" + }, + "nanos": { + "type": "integer" + } + }, + "required": [ + "seconds", + "nanos" + ] + }, + "updated_at": { + "type": "object", + "properties": { + "seconds": { + "type": "integer" + }, + "nanos": { + "type": "integer" + } + }, + "required": [ + "seconds", + "nanos" + ] + } + }, + "required": [ + "id", + "task_id", + "name", + "status", + "tag", + "message", + "host_id", + "created_at", + "updated_at" + ] + } + }, + "required": [ + "data", + "task" + ] + } + }, + "required": [ + "code", + "message", + "data" + ] + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/volume/mount": { + "post": { + "summary": "挂载卷到虚拟机", + "deprecated": false, + "description": "", + "operationId": "PointVolumeMount", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/数据卷管理", + "Point.Volume" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "volume_id": { + "description": "数据卷id", + "example": 0, + "type": "integer" + }, + "vm_id": { + "description": "虚拟机id", + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id", + "volume_id", + "vm_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/volume/unmount": { + "post": { + "summary": "卸载卷", + "deprecated": false, + "description": "", + "operationId": "PointVolumeUnmount", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/数据卷管理", + "Point.Volume" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "volume_id": { + "description": "数据卷id", + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id", + "volume_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/volume/transfer": { + "post": { + "summary": "迁移卷", + "deprecated": false, + "description": "", + "operationId": "PointVolumeTransfer", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/数据卷管理", + "Point.Volume" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "volume_id": { + "description": "数据卷id", + "example": 0, + "type": "integer" + }, + "vm_id": { + "description": "目标虚拟机id", + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id", + "volume_id", + "vm_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/volume/delete": { + "delete": { + "summary": "删除卷", + "deprecated": false, + "description": "", + "operationId": "PointVolumeDelete", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/数据卷管理", + "Point.Volume" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "volume_id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/vm/list": { + "get": { + "summary": "获取虚拟机列表", + "deprecated": false, + "description": "", + "operationId": "PointVMList", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/虚拟机管理", + "Point.VM" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "主控服务id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "page", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "count", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "key", + "in": "query", + "description": "筛选关键词", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "host_id", + "in": "query", + "description": "宿主机id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "image_id", + "in": "query", + "description": "筛选镜像", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "port_group_id", + "in": "query", + "description": "筛选安全组", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "status", + "in": "query", + "description": "筛选状态 (pending \\ creating \\ ready \\ running \\ stopped \\ error \\ paused \\ reboot \\ poweroff \\ unknown)", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "user_id", + "in": "query", + "description": "筛选用户", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/vm/detail": { + "get": { + "summary": "获取虚拟机详情", + "deprecated": false, + "description": "", + "operationId": "PointVMGet", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/虚拟机管理", + "Point.VM" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "主控服务id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "vm_id", + "in": "query", + "description": "虚拟机id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/vm/status": { + "get": { + "summary": "获取虚拟机状态", + "deprecated": false, + "description": "", + "operationId": "PointVMGetStatus", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/虚拟机管理", + "Point.VM" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "主控服务id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "vm_id", + "in": "query", + "description": "虚拟机id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/vm/metrics": { + "get": { + "summary": "获取虚拟机状态指标数据", + "deprecated": false, + "description": "", + "operationId": "PointVMGetMetrics", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/虚拟机管理", + "Point.VM" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "主控服务id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "vm_name", + "in": "query", + "description": "虚拟机名称", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/vm/create": { + "post": { + "summary": "创建虚拟机", + "deprecated": false, + "description": "", + "operationId": "PointVMCreate", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/虚拟机管理", + "Point.VM" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "name": { + "description": "名称(不传随机)", + "example": "", + "type": "string" + }, + "memory": { + "description": "内存 (KB)", + "example": 0, + "type": "integer" + }, + "vcpu": { + "description": "虚拟 CPU 核数", + "example": 0, + "type": "integer" + }, + "system_size": { + "description": "系统盘大小 (MB)", + "example": 0, + "type": "integer" + }, + "rx_bandwidth": { + "description": "入向带宽", + "example": 0, + "type": "integer" + }, + "tx_bandwidth": { + "description": "出向带宽", + "example": 0, + "type": "integer" + }, + "image_id": { + "description": "镜像id", + "example": 0, + "type": "integer" + }, + "host_id": { + "description": "宿主机id", + "example": 0, + "type": "integer" + }, + "host_group_id": { + "description": "安全组id", + "example": 0, + "type": "integer" + }, + "user_id": { + "description": "用户id", + "example": 0, + "type": "integer" + }, + "ip_num": { + "description": "ip数量", + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id", + "name", + "memory", + "vcpu", + "system_size", + "image_id", + "host_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/vm/update": { + "post": { + "summary": "修改虚拟机", + "deprecated": false, + "description": "", + "operationId": "PointVMUpdate", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/虚拟机管理", + "Point.VM" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "vm_id": { + "description": "虚拟机id", + "example": 0, + "type": "integer" + }, + "rx_bandwidth": { + "description": "入向带宽", + "example": 0, + "type": "integer" + }, + "tx_bandwidth": { + "description": "出向带宽", + "example": 0, + "type": "integer" + }, + "root_password": { + "description": "root密码", + "example": "", + "type": "string" + }, + "ssh_port": { + "description": "ssh端口", + "example": 0, + "type": "integer" + }, + "network_ids": { + "description": "网络id列表(使用 , 分割)", + "example": "", + "type": "array" + }, + "internet_network_id": { + "description": "内网id", + "example": 0, + "type": "integer" + }, + "port_group_id": { + "description": "安全组id", + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id", + "vm_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/vm/rebuild": { + "post": { + "summary": "重建虚拟机", + "deprecated": false, + "description": "", + "operationId": "PointVMRebuild", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/虚拟机管理", + "Point.VM" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "vm_id": { + "description": "虚拟机id", + "example": 0, + "type": "integer" + }, + "image_id": { + "description": "镜像id", + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id", + "vm_id", + "image_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/vm/refactor": { + "post": { + "summary": "重构虚拟机", + "deprecated": false, + "description": "", + "operationId": "PointVMRefactor", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/虚拟机管理", + "Point.VM" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "vm_id": { + "description": "虚拟机id", + "example": 0, + "type": "integer" + }, + "memory": { + "description": "内存 KB", + "example": 0, + "type": "integer" + }, + "vcpu": { + "description": "cpu数量", + "example": 0, + "type": "integer" + }, + "rx_bandwidth": { + "description": "入向带宽", + "example": 0, + "type": "integer" + }, + "tx_bandwidth": { + "description": "出向带宽", + "example": 0, + "type": "integer" + }, + "root_password": { + "description": "root密码", + "example": "", + "type": "string" + }, + "uuid": { + "description": "虚拟机uuid(不填随机)", + "example": "", + "type": "string" + }, + "mate_data_id": { + "description": "虚拟机元数据uuid(不填随机)", + "example": "", + "type": "string" + }, + "physical_name": { + "description": "物理网卡名称(不填默认)", + "example": "", + "type": "string" + }, + "config_path": { + "description": "配置文件保存地址(不填默认)", + "example": "", + "type": "string" + }, + "ssh_port": { + "description": "ssh端口(不填默认)", + "example": 0, + "type": "integer" + }, + "vnc_port": { + "description": "vnc端口(不填默认)", + "example": 0, + "type": "integer" + }, + "vnc_password": { + "description": "vnc密码(不填随机)", + "example": "", + "type": "string" + }, + "network_ids": { + "description": "网络id列表(使用 , 分割)", + "example": "", + "type": "array" + }, + "internet_network_id": { + "description": "内网网络id", + "example": 0, + "type": "integer" + }, + "port_group_id": { + "description": "安全组id", + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id", + "vm_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/vm/update_traffic": { + "post": { + "summary": "修改虚拟机带宽", + "deprecated": false, + "description": "", + "operationId": "PointVMUpdateTraffic", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/虚拟机管理", + "Point.VM" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "vm_id": { + "description": "虚拟机id", + "example": 0, + "type": "integer" + }, + "rx_bandwidth": { + "description": "入向带宽", + "example": 0, + "type": "integer" + }, + "tx_bandwidth": { + "description": "出向带宽", + "example": 0, + "type": "integer" + }, + "traffic_max": { + "description": "每月最大流量 KB", + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id", + "vm_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/vm/start": { + "post": { + "summary": "启动虚拟机", + "deprecated": false, + "description": "", + "operationId": "PointVMStart", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/虚拟机管理", + "Point.VM" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "vm_id": { + "description": "虚拟机id", + "example": 0, + "type": "integer" + }, + "force": { + "description": "是否强制", + "example": "", + "type": "boolean" + } + }, + "required": [ + "service_id", + "vm_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/vm/stop": { + "post": { + "summary": "停止虚拟机", + "deprecated": false, + "description": "", + "operationId": "PointVMStop", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/虚拟机管理", + "Point.VM" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "vm_id": { + "description": "虚拟机id", + "example": 0, + "type": "integer" + }, + "force": { + "description": "是否强制", + "example": "", + "type": "boolean" + } + }, + "required": [ + "service_id", + "vm_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/vm/reboot": { + "post": { + "summary": "重启虚拟机", + "deprecated": false, + "description": "", + "operationId": "PointVMReboot", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/虚拟机管理", + "Point.VM" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "vm_id": { + "description": "虚拟机id", + "example": 0, + "type": "integer" + }, + "force": { + "description": "是否强制", + "example": "", + "type": "boolean" + } + }, + "required": [ + "service_id", + "vm_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/vm/suspend": { + "post": { + "summary": "暂停虚拟机", + "deprecated": false, + "description": "", + "operationId": "PointVMSuspend", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/虚拟机管理", + "Point.VM" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "vm_id": { + "description": "虚拟机id", + "example": 0, + "type": "integer" + }, + "force": { + "description": "主控服务id", + "example": "", + "type": "boolean" + } + }, + "required": [ + "service_id", + "vm_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/vm/resume": { + "post": { + "summary": "恢复虚拟机", + "deprecated": false, + "description": "", + "operationId": "PointVMResume", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/虚拟机管理", + "Point.VM" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "vm_id": { + "description": "虚拟机id", + "example": 0, + "type": "integer" + }, + "force": { + "description": "是否强制", + "example": "", + "type": "boolean" + } + }, + "required": [ + "service_id", + "vm_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/vm/rescue": { + "post": { + "summary": "虚拟机进入救援系统", + "deprecated": false, + "description": "", + "operationId": "PointVMRescue", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/虚拟机管理", + "Point.VM" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "vm_id": { + "description": "虚拟机id", + "example": 0, + "type": "integer" + }, + "force": { + "description": "是否强制", + "example": "", + "type": "boolean" + } + }, + "required": [ + "service_id", + "vm_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/vm/exit_rescue": { + "post": { + "summary": "虚拟机退出救援系统", + "deprecated": false, + "description": "", + "operationId": "PointVMExitRescue", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/虚拟机管理", + "Point.VM" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "vm_id": { + "description": "虚拟机id", + "example": 0, + "type": "integer" + }, + "force": { + "description": "是否强制", + "example": "", + "type": "boolean" + } + }, + "required": [ + "service_id", + "vm_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/vm/delete": { + "delete": { + "summary": "删除虚拟机", + "deprecated": false, + "description": "", + "operationId": "PointVMDelete", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/虚拟机管理", + "Point.VM" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "vm_id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/post_group/list": { + "get": { + "summary": "获取安全组列表", + "deprecated": false, + "description": "", + "operationId": "PointPostGroupList", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/安全组管理", + "Point.PostGroup" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "主控服务id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "page", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "page_size", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "keyword", + "in": "query", + "description": "关键词筛选", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "lock", + "in": "query", + "description": "筛选是否锁定(锁定后用户无法修改)", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "drop_all", + "in": "query", + "description": "筛选是否开启白名单模式", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/post_group/detail": { + "get": { + "summary": "获取安全组详情", + "deprecated": false, + "description": "", + "operationId": "PointPostGroupGet", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/安全组管理", + "Point.PostGroup" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/post_group/create": { + "post": { + "summary": "创建安全组", + "deprecated": false, + "description": "", + "operationId": "PointPostGroupCreate", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/安全组管理", + "Point.PostGroup" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "name": { + "description": "名称", + "example": "", + "type": "string" + }, + "direction": { + "description": "介绍", + "example": "", + "type": "string" + }, + "lock": { + "description": "是否锁定(锁定后用户无法修改)", + "example": "", + "type": "boolean" + }, + "drop_all": { + "description": "是否开启白名单模式", + "example": "", + "type": "boolean" + }, + "host_id": { + "description": "所属宿主机id", + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id", + "name", + "host_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/post_group/sync": { + "post": { + "summary": "同步安全组", + "deprecated": false, + "description": "", + "operationId": "PointPostGroupSync", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/安全组管理", + "Point.PostGroup" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "id": { + "example": 0, + "type": "integer" + }, + "host_id": { + "description": "同步到的宿主机id", + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id", + "id", + "host_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/post_group/bind": { + "post": { + "summary": "绑定安全组到虚拟机", + "deprecated": false, + "description": "", + "operationId": "PointPostGroupBind", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/安全组管理", + "Point.PostGroup" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "id": { + "example": 0, + "type": "integer" + }, + "vm_id": { + "description": "虚拟机id", + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id", + "id", + "vm_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/post_group/unbind": { + "post": { + "summary": "解绑安全组", + "deprecated": false, + "description": "", + "operationId": "PointPostGroupUnbind", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/安全组管理", + "Point.PostGroup" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "example": 0, + "type": "integer" + }, + "id": { + "example": 0, + "type": "integer" + }, + "vm_id": { + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id", + "id", + "vm_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/post_group/delete": { + "delete": { + "summary": "删除安全组", + "deprecated": false, + "description": "", + "operationId": "PointPostGroupDelete", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/安全组管理", + "Point.PostGroup" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/post_group/enable_whitelist": { + "post": { + "summary": "开启安全组白名单", + "deprecated": false, + "description": "", + "operationId": "PointPostGroupEnableWhitelist", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/安全组管理", + "Point.PostGroup" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "example": 0, + "type": "integer" + }, + "id": { + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id", + "id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/post_group/disable_whitelist": { + "post": { + "summary": "关闭安全组白名单", + "deprecated": false, + "description": "", + "operationId": "PointPostGroupDisableWhitelist", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/安全组管理", + "Point.PostGroup" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "example": 0, + "type": "integer" + }, + "id": { + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id", + "id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/post_group/create_rule": { + "post": { + "summary": "新增安全组规则", + "deprecated": false, + "description": "", + "operationId": "PointPostGroupCreateRule", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/安全组管理", + "Point.PostGroup" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "group_id": { + "description": "所属安全组", + "example": 0, + "type": "integer" + }, + "priority": { + "description": "优先级", + "example": 0, + "type": "integer" + }, + "protocol": { + "description": "协议(tcp \\ udp)", + "example": "", + "type": "string" + }, + "action": { + "description": "动作 (allow \\ deny)", + "example": "", + "type": "string" + }, + "port_range": { + "description": "端口范围,两种写法: 80-90(范围写法) \\ 80(指定写法)", + "example": "", + "type": "string" + }, + "ip_range": { + "description": "ip范围 192.168.1.1/24 ", + "example": "", + "type": "string" + } + }, + "required": [ + "service_id", + "group_id", + "protocol", + "action" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/post_group/update_rule": { + "post": { + "summary": "修改安全组规则", + "deprecated": false, + "description": "", + "operationId": "PointPostGroupUpdateRule", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/安全组管理", + "Point.PostGroup" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "example": 0, + "type": "integer" + }, + "id": { + "example": 0, + "type": "integer" + }, + "port_group_id": { + "example": 0, + "type": "integer" + }, + "priority": { + "example": 0, + "type": "integer" + }, + "protocol": { + "example": "", + "type": "string" + }, + "action": { + "example": "", + "type": "string" + }, + "port_range": { + "example": "", + "type": "string" + }, + "ip_range": { + "example": "", + "type": "string" + } + }, + "required": [ + "service_id", + "id", + "port_group_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/post_group/delete_rule": { + "delete": { + "summary": "删除安全组规则", + "deprecated": false, + "description": "", + "operationId": "PointPostGroupDeleteRule", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/安全组管理", + "Point.PostGroup" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/post_group/apply": { + "post": { + "summary": "应用安全组", + "deprecated": false, + "description": "", + "operationId": "PointPostGroupApply", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/安全组管理", + "Point.PostGroup" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "example": 0, + "type": "integer" + }, + "id": { + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id", + "id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/vnc/list": { + "get": { + "summary": "获取 VNC 节点列表", + "deprecated": false, + "description": "", + "operationId": "PointVNCGetNodeList", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/vnc节点管理", + "Point.VNC" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "page", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "page_size", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "keyword", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/vnc/vm_vnc": { + "get": { + "summary": "获取虚拟机 VNC 连接信息", + "deprecated": false, + "description": "", + "operationId": "PointVNCGetVmVNC", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/vnc节点管理", + "Point.VNC" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "vm_id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/vnc/add": { + "post": { + "summary": "新增 VNC 节点", + "deprecated": false, + "description": "", + "operationId": "PointVNCAddNode", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/vnc节点管理", + "Point.VNC" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "name": { + "description": "名称", + "example": "", + "type": "string" + }, + "ip": { + "description": "服务ip", + "example": "", + "type": "string" + }, + "port": { + "description": "服务端口", + "example": "", + "type": "string" + }, + "token": { + "description": "服务token", + "example": "", + "type": "string" + } + }, + "required": [ + "service_id", + "name", + "ip", + "port" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/vnc/test": { + "post": { + "summary": "测试 VNC 节点连接", + "deprecated": false, + "description": "", + "operationId": "PointVNCTestNode", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/vnc节点管理", + "Point.VNC" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "id": { + "example": 0, + "type": "integer" + }, + "host_id": { + "description": "测试的宿主机id", + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id", + "id", + "host_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/vnc/update": { + "post": { + "summary": "修改 VNC 节点", + "deprecated": false, + "description": "", + "operationId": "PointVNCUpdateNode", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/vnc节点管理", + "Point.VNC" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "example": 0, + "type": "integer" + }, + "id": { + "example": 0, + "type": "integer" + }, + "name": { + "example": "", + "type": "string" + }, + "ip": { + "example": "", + "type": "string" + }, + "port": { + "example": "", + "type": "string" + }, + "token": { + "example": "", + "type": "string" + } + }, + "required": [ + "service_id", + "id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/vnc/delete": { + "delete": { + "summary": "删除 VNC 节点", + "deprecated": false, + "description": "", + "operationId": "PointVNCDeleteNode", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/vnc节点管理", + "Point.VNC" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + } + }, + "security": [] + } + } + }, + "components": { + "schemas": { + "Success": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "example": 200 + }, + "message": { + "type": "string", + "example": "Success" + }, + "data": { + "type": "object", + "properties": {} + }, + "error": { + "type": "string" + } + } + } + }, + "responses": {}, + "securitySchemes": {} + }, + "servers": [], + "security": [] +} \ No newline at end of file