Merge pull request #3620 from yousong/feature/yousong-docs-lb-backend-status

docs: lb: 添加backend-status接口
This commit is contained in:
yunion-ci-robot
2019-11-13 17:44:18 +08:00
committed by GitHub
10 changed files with 215 additions and 5 deletions
+9
View File
@@ -321,6 +321,15 @@ paths:
$ref: "./loadbalancer/loadbalancerlisteners.yaml"
/loadbalancerlisteners/{loadbalancerlistenerId}:
$ref: "./loadbalancer/loadbalancerlistener.yaml"
/loadbalancerlisteners/{loadbalancerlistenerId}/backend-status:
$ref: "./loadbalancer/loadbalancerlistener-backend-status.yaml"
/loadbalancerlistenerrules:
$ref: "./loadbalancer/loadbalancerlistenerrules.yaml"
/loadbalancerlistenerrules/{loadbalancerlistenerruleId}:
$ref: "./loadbalancer/loadbalancerlistenerrule.yaml"
/loadbalancerlistenerrules/{loadbalancerlistenerruleId}/backend-status:
$ref: "./loadbalancer/loadbalancerlistenerrule-backend-status.yaml"
/loadbalancerbackendgroups:
$ref: "./loadbalancer/loadbalancerbackendgroups.yaml"
@@ -0,0 +1,11 @@
get:
summary: 获取指定loadbalancer监听后端服务器的健康检查状态
parameters:
- $ref: "../parameters/loadbalancer.yaml#/loadbalancerlistenerId"
responses:
200:
description: 后端状态列表
schema:
$ref: "../schemas/loadbalancer.yaml#/LoadbalancerListenerBackendStatusResponse"
tags:
- loadbalancerlisteners
@@ -0,0 +1,11 @@
get:
summary: 获取指定loadbalancer转发策略后端服务器的健康检查状态
parameters:
- $ref: "../parameters/loadbalancer.yaml#/loadbalancerlistenerruleId"
responses:
200:
description: 后端状态列表
schema:
$ref: "../schemas/loadbalancer.yaml#/LoadbalancerListenerRuleBackendStatusResponse"
tags:
- loadbalancerlistenerrules
@@ -0,0 +1,22 @@
get:
summary: 获取指定loadbalancer转发策略实例信息
parameters:
- $ref: "../parameters/loadbalancer.yaml#/loadbalancerlistenerruleId"
responses:
200:
description: 实例信息
schema:
$ref: "../schemas/loadbalancer.yaml#/LoadbalancerListenerRuleResponse"
tags:
- loadbalancerlistenerrules
delete:
summary: 删除指定loadbalancer转发策略实例
parameters:
- $ref: "../parameters/loadbalancer.yaml#/loadbalancerlistenerruleId"
responses:
200:
description: 被删除实例的信息
schema:
$ref: "../schemas/loadbalancer.yaml#/LoadbalancerListenerRuleResponse"
tags:
- loadbalancerlistenerrules
@@ -0,0 +1,29 @@
get:
summary: 按指定条件列出loadbalancer转发规则实例
parameters:
- $ref: "../parameters/loadbalancer.yaml#/listener"
- $ref: "../parameters/loadbalancer.yaml#/backend_group"
- $ref: "../parameters/loadbalancer.yaml#/domain"
- $ref: "../parameters/loadbalancer.yaml#/path"
responses:
200:
description: 转发规则实例信息列表
schema:
$ref: "../schemas/loadbalancer.yaml#/LoadbalancerListenerRuleListResponse"
tags:
- loadbalancerlistenerrules
post:
summary: 创建loadbalancer转发规则实例
parameters:
- name: loadbalancerlistenerrule
in: body
required: true
schema:
$ref: "../schemas/loadbalancer.yaml#/LoadbalancerListenerRuleCreateRequest"
responses:
200:
description: 新创建的实例信息
schema:
$ref: "../schemas/loadbalancer.yaml#/LoadbalancerListenerRuleResponse"
tags:
- loadbalancerlistenerrules
+21
View File
@@ -8,6 +8,11 @@ loadbalancerlistenerId:
type: string
in: path
required: true
loadbalancerlistenerruleId:
name: loadbalancerlistenerruleId
type: string
in: path
required: true
loadbalancerbackendgroupId:
name: loadbalancerbackendgroupId
type: string
@@ -90,6 +95,22 @@ certificate_id:
type: string
description: 指定loadbalaner本地证书id
listener:
name: listener
in: query
type: string
description: 指定loadbalancer监听id
domain:
name: domain
in: query
type: string
description: 指定转发规则匹配的域名
path:
name: path
in: query
type: string
description: 指定转发规则匹配的路径
cluster:
name: cluster
in: query
+1 -1
View File
@@ -204,7 +204,7 @@ DBInstanceChangeConfig:
example: 6
description: 更改CPU大小
vmem_size_mb:
type: int
type: integer
example: 1024
description: 更改内存大小
storage_type:
+108 -1
View File
@@ -38,6 +38,28 @@ LoadbalancerListener:
description: 调度算法
readOnly: true
LoadbalancerListenerRule:
type: object
description: Loadbalancer转发规则实例
properties:
id:
type: string
description: 实例uuid
readOnly: true
listener_id:
type: string
description: 所属的loadbalancer监听uuid
readOnly: true
domain:
type: string
description: 转发规则匹配的域名
path:
type: string
description: 转发规则匹配的路径
backend_group_id:
type: string
description: 转发规则对应的后端服务器组
LoadbalancerBackendGroup:
type: object
description: Loadbalancer后端服务器组实例
@@ -145,6 +167,41 @@ LoadbalancerListenerResponse:
type: object
$ref: "#/LoadbalancerListener"
LoadbalancerListenerRuleCreateRequest:
type: object
properties:
loadbalancerlistenerrule:
type: object
required:
- listener
- backend_group
properties:
listener:
type: string
description: 所属的loadbalancer监听id
backend_group:
type: string
description: 规则应对的后端服务器组uuid
domain:
type: string
description: 转发规则匹配的域名
path:
type: string
description: 转发规则匹配的路径
LoadbalancerListenerRuleListResponse:
type: object
properties:
loadbalancerlistenerrules:
type: array
items:
$ref: "#/LoadbalancerListenerRule"
LoadbalancerListenerRuleResponse:
type: object
properties:
loadbalancer:
type: object
$ref: "#/LoadbalancerListenerRule"
LoadbalancerBackendGroupListResponse:
type: object
properties:
@@ -314,7 +371,7 @@ LoadbalancerCachedCertificateResponse:
description: 公钥算法
readOnly: true
publicKey_bitLen:
type: int
type: integer
description: 公钥长度
readOnly: true
signature_algorithm:
@@ -653,3 +710,53 @@ LoadbalancerAgentDeployRequest:
proj: system
repo_base_url: https://10.168.222.136/yumrepo
deploy_method: yum
LoadbalancerBackendStatus:
allOf:
- $ref: '#/LoadbalancerBackend'
- description: 后端及其健康检查状态描述
properties:
check_time:
type: string
format: date-time
description: 上一次检查时间
check_code:
type: integer
description: HTTP检查时,报端返回时的http状态码
check_status:
type: string
description: |
状态描述
{
"UNK": "未知",
"INI": "启动中",
"SOCKERR": "socket错误",
"L4OK": "L4正常",
"L4TOUT": "L4超时",
"L4CON": "L4连接错误",
"L6OK": "L6正常",
"L6TOUT": "L6超时",
"L6RSP": "L6协议错误",
"L7OK": "L7正常",
"L7OKC": "L7正常",
"L7TOUT": "L7超时",
"L7RSP": "L7协议错误",
"L7STS": "L7响应错误"
}
LoadbalancerListenerBackendStatusResponse:
type: object
properties:
loadbalancerlistener:
type: array
items:
$ref: "#/LoadbalancerBackendStatus"
LoadbalancerListenerRuleBackendStatusResponse:
type: object
properties:
loadbalancerlistener:
type: array
items:
$ref: "#/LoadbalancerBackendStatus"
+1 -1
View File
@@ -124,7 +124,7 @@ SecgroupAddRule:
type: object
properties:
priority:
type: int
type: integer
example: 10
min: 1
max: 100
+2 -2
View File
@@ -2,7 +2,7 @@ SecgroupRuleCreate:
type: object
properties:
priority:
type: int
type: integer
example: 10
min: 1
max: 100
@@ -54,7 +54,7 @@ SecgroupRule:
example: 37617a8d-0265-4385-8002-2ad685bd2024
description: 安全组规则ID
priority:
type: int
type: integer
example: 10
description: 规则优先级
protocol: