Update API specification
This commit is contained in:
parent
fb0fcc0597
commit
e9aa545e9b
|
@ -447,15 +447,41 @@ class API_Status(Resource):
|
||||||
schema:
|
schema:
|
||||||
type: object
|
type: object
|
||||||
id: ClusterStatus
|
id: ClusterStatus
|
||||||
|
properties:
|
||||||
|
cluster_health:
|
||||||
|
type: object
|
||||||
properties:
|
properties:
|
||||||
health:
|
health:
|
||||||
|
type: integer
|
||||||
|
description: The overall health (%) of the cluster
|
||||||
|
example: 100
|
||||||
|
messages:
|
||||||
|
type: array
|
||||||
|
description: A list of health event strings
|
||||||
|
items:
|
||||||
type: string
|
type: string
|
||||||
description: The overall cluster health
|
example: "hv1: plugin 'nics': bond0 DEGRADED with 1 active slaves, bond0 OK at 10000 Mbps"
|
||||||
example: Optimal
|
node_health:
|
||||||
storage_health:
|
type: object
|
||||||
|
properties:
|
||||||
|
hvX:
|
||||||
|
type: object
|
||||||
|
description: A node entry for per-node health details, one per node in the cluster
|
||||||
|
properties:
|
||||||
|
health:
|
||||||
|
type: integer
|
||||||
|
description: The health (%) of the node
|
||||||
|
example: 100
|
||||||
|
messages:
|
||||||
|
type: array
|
||||||
|
description: A list of health event strings
|
||||||
|
items:
|
||||||
type: string
|
type: string
|
||||||
description: The overall storage cluster health
|
example: "'nics': bond0 DEGRADED with 1 active slaves, bond0 OK at 10000 Mbps"
|
||||||
example: Optimal
|
maintenance:
|
||||||
|
type: string
|
||||||
|
description: Whether the cluster is in maintenance mode or not (string boolean)
|
||||||
|
example: true
|
||||||
primary_node:
|
primary_node:
|
||||||
type: string
|
type: string
|
||||||
description: The current primary coordinator node
|
description: The current primary coordinator node
|
||||||
|
@ -605,6 +631,32 @@ class API_Node_Root(Resource):
|
||||||
arch:
|
arch:
|
||||||
type: string
|
type: string
|
||||||
description: The architecture of the CPU
|
description: The architecture of the CPU
|
||||||
|
health:
|
||||||
|
type: integer
|
||||||
|
description: The overall health (%) of the node
|
||||||
|
example: 100
|
||||||
|
health_details:
|
||||||
|
type: array
|
||||||
|
description: A list of health plugin results
|
||||||
|
items:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
description: The name of the health plugin
|
||||||
|
example: nics
|
||||||
|
last_run:
|
||||||
|
type: integer
|
||||||
|
description: The UNIX timestamp (s) of the last plugin run
|
||||||
|
example: 1676786078
|
||||||
|
health_delta:
|
||||||
|
type: integer
|
||||||
|
description: The health delta (negatively applied to the health percentage) of the plugin's current state
|
||||||
|
example: 10
|
||||||
|
message:
|
||||||
|
type: string
|
||||||
|
description: The output message of the plugin
|
||||||
|
example: "bond0 DEGRADED with 1 active slaves, bond0 OK at 10000 Mbps"
|
||||||
load:
|
load:
|
||||||
type: number
|
type: number
|
||||||
format: float
|
format: float
|
||||||
|
|
|
@ -14,16 +14,58 @@
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"ClusterStatus": {
|
"ClusterStatus": {
|
||||||
|
"properties": {
|
||||||
|
"cluster_health": {
|
||||||
"properties": {
|
"properties": {
|
||||||
"health": {
|
"health": {
|
||||||
"description": "The overall cluster health",
|
"description": "The overall health (%) of the cluster",
|
||||||
"example": "Optimal",
|
"example": 100,
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"messages": {
|
||||||
|
"description": "A list of health event strings",
|
||||||
|
"items": {
|
||||||
|
"example": "hv1: plugin 'nics': bond0 DEGRADED with 1 active slaves, bond0 OK at 10000 Mbps",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"type": "array"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
"maintenance": {
|
||||||
|
"description": "Whether the cluster is in maintenance mode or not (string boolean)",
|
||||||
|
"example": true,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"networks": {
|
"networks": {
|
||||||
"description": "The total number of networks in the cluster",
|
"description": "The total number of networks in the cluster",
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
|
"node_health": {
|
||||||
|
"properties": {
|
||||||
|
"hvX": {
|
||||||
|
"description": "A node entry for per-node health details, one per node in the cluster",
|
||||||
|
"properties": {
|
||||||
|
"health": {
|
||||||
|
"description": "The health (%) of the node",
|
||||||
|
"example": 100,
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"messages": {
|
||||||
|
"description": "A list of health event strings",
|
||||||
|
"items": {
|
||||||
|
"example": "'nics': bond0 DEGRADED with 1 active slaves, bond0 OK at 10000 Mbps",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"type": "array"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "object"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"properties": {
|
"properties": {
|
||||||
"state-combination": {
|
"state-combination": {
|
||||||
|
@ -65,11 +107,6 @@
|
||||||
"description": "The total number of snapshots in the storage cluster",
|
"description": "The total number of snapshots in the storage cluster",
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
"storage_health": {
|
|
||||||
"description": "The overall storage cluster health",
|
|
||||||
"example": "Optimal",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"upstream_ip": {
|
"upstream_ip": {
|
||||||
"description": "The cluster upstream IP address in CIDR format",
|
"description": "The cluster upstream IP address in CIDR format",
|
||||||
"example": "10.0.0.254/24",
|
"example": "10.0.0.254/24",
|
||||||
|
@ -456,6 +493,40 @@
|
||||||
"description": "The number of running domains (VMs)",
|
"description": "The number of running domains (VMs)",
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
|
"health": {
|
||||||
|
"description": "The overall health (%) of the node",
|
||||||
|
"example": 100,
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"health_details": {
|
||||||
|
"description": "A list of health plugin results",
|
||||||
|
"items": {
|
||||||
|
"properties": {
|
||||||
|
"health_delta": {
|
||||||
|
"description": "The health delta (negatively applied to the health percentage) of the plugin's current state",
|
||||||
|
"example": 10,
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"last_run": {
|
||||||
|
"description": "The UNIX timestamp (s) of the last plugin run",
|
||||||
|
"example": 1676786078,
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"message": {
|
||||||
|
"description": "The output message of the plugin",
|
||||||
|
"example": "bond0 DEGRADED with 1 active slaves, bond0 OK at 10000 Mbps",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"description": "The name of the health plugin",
|
||||||
|
"example": "nics",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
"type": "array"
|
||||||
|
},
|
||||||
"kernel": {
|
"kernel": {
|
||||||
"desription": "The running kernel version from uname",
|
"desription": "The running kernel version from uname",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
@ -6177,7 +6248,7 @@
|
||||||
"description": "The selector used to determine candidate nodes during migration; see 'target_selector' in the node daemon configuration reference",
|
"description": "The selector used to determine candidate nodes during migration; see 'target_selector' in the node daemon configuration reference",
|
||||||
"enum": [
|
"enum": [
|
||||||
"mem",
|
"mem",
|
||||||
"memfree",
|
"memprov",
|
||||||
"vcpus",
|
"vcpus",
|
||||||
"load",
|
"load",
|
||||||
"vms",
|
"vms",
|
||||||
|
@ -6336,7 +6407,7 @@
|
||||||
"description": "The selector used to determine candidate nodes during migration; see 'target_selector' in the node daemon configuration reference",
|
"description": "The selector used to determine candidate nodes during migration; see 'target_selector' in the node daemon configuration reference",
|
||||||
"enum": [
|
"enum": [
|
||||||
"mem",
|
"mem",
|
||||||
"memfree",
|
"memprov",
|
||||||
"vcpus",
|
"vcpus",
|
||||||
"load",
|
"load",
|
||||||
"vms",
|
"vms",
|
||||||
|
@ -6597,7 +6668,7 @@
|
||||||
"description": "The selector used to determine candidate nodes during migration; see 'target_selector' in the node daemon configuration reference",
|
"description": "The selector used to determine candidate nodes during migration; see 'target_selector' in the node daemon configuration reference",
|
||||||
"enum": [
|
"enum": [
|
||||||
"mem",
|
"mem",
|
||||||
"memfree",
|
"memprov",
|
||||||
"vcpus",
|
"vcpus",
|
||||||
"load",
|
"load",
|
||||||
"vms",
|
"vms",
|
||||||
|
|
Loading…
Reference in New Issue