Fix api-ref doc for GET /infra-optim/v1/data_model

Some response parameters from GET /infra-optim/v1/data_model
endpoint are missing from api-ref documentation. This patch
updates the doc to include them.
For more details see, LP #2117726

Closes-Bug: #2117726

Change-Id: Iaa775f56bb8167d9c6b458cd07f1ec3cefaf70fe
Signed-off-by: Douglas Viroel <viroel@gmail.com>
This commit is contained in:
Douglas Viroel
2025-07-23 13:22:07 -03:00
parent 4080d5767d
commit 37faf614e2
4 changed files with 114 additions and 27 deletions

View File

@@ -420,12 +420,24 @@ links:
type: array
# Data Model Node
node_disabled_reason:
description: |
The Disabled Reason of the node.
in: body
required: true
type: string
node_disk:
description: |
The Disk of the node(in GiB).
in: body
required: true
type: integer
node_disk_gb_reserved:
description: |
The Disk Reserved of the node (in GiB).
in: body
required: true
type: integer
node_disk_ratio:
description: |
The Disk Ratio of the node.
@@ -444,6 +456,12 @@ node_memory:
in: body
required: true
type: integer
node_memory_mb_reserved:
description: |
The Memory Reserved of the node(in MiB).
in: body
required: true
type: integer
node_memory_ratio:
description: |
The Memory Ratio of the node.
@@ -456,6 +474,12 @@ node_state:
in: body
required: true
type: string
node_status:
description: |
The Status of the node.
in: body
required: true
type: string
node_uuid:
description: |
The Unique UUID of the node.
@@ -468,13 +492,18 @@ node_vcpu_ratio:
in: body
required: true
type: float
node_vcpu_reserved:
description: |
The Vcpu Reserved of the node.
in: body
required: true
type: integer
node_vcpus:
description: |
The Vcpu of the node.
in: body
required: true
type: integer
# Scoring Engine
scoring_engine_description:
description: |
@@ -502,18 +531,36 @@ server_disk:
in: body
required: true
type: integer
server_locked:
description: |
Whether the server is locked.
in: body
required: true
type: boolean
server_memory:
description: |
The Memory of server.
in: body
required: true
type: integer
server_metadata:
description: |
The metadata associated with the server.
in: body
required: true
type: JSON
server_name:
description: |
The Name of the server.
in: body
required: true
type: string
server_project_id:
description: |
The project ID of the server.
in: body
required: true
type: string
server_state:
description: |
The State of the server.
@@ -532,6 +579,12 @@ server_vcpus:
in: body
required: true
type: integer
server_watcher_exclude:
description: |
Whether the server is excluded from the scope.
in: body
required: true
type: boolean
# Service
service_host:
description: |

View File

@@ -1,38 +1,56 @@
{
"context": [
{
"server_uuid": "1bf91464-9b41-428d-a11e-af691e5563bb",
"server_watcher_exclude": false,
"server_name": "chenke-test1",
"server_vcpus": "1",
"server_state": "active",
"server_memory": "512",
"server_disk": "1",
"server_state": "active",
"node_uuid": "253e5dd0-9384-41ab-af13-4f2c2ce26112",
"server_vcpus": "1",
"server_metadata": {},
"server_project_id": "baea342fc74b4a1785b4a40c69a8d958",
"server_locked":false,
"server_uuid": "1bf91464-9b41-428d-a11e-af691e5563bb",
"node_hostname": "localhost.localdomain",
"node_vcpus": "4",
"node_vcpu_ratio": "16.0",
"node_status": "enabled",
"node_disabled_reason": null,
"node_state": "up",
"node_memory": "16383",
"node_memory_ratio": "1.5",
"node_memory_mb_reserved": "512",
"node_disk": "37",
"node_disk_gb_reserved": "0",
"node_vcpus": "4",
"node_vcpu_reserved": "0",
"node_memory_ratio": "1.5",
"node_vcpu_ratio": "16.0",
"node_disk_ratio": "1.0",
"node_state": "up"
"node_uuid": "253e5dd0-9384-41ab-af13-4f2c2ce26112"
},
{
"server_uuid": "e2cb5f6f-fa1d-4ba2-be1e-0bf02fa86ba4",
"server_watcher_exclude": false,
"server_name": "chenke-test2",
"server_vcpus": "1",
"server_state": "active",
"server_memory": "512",
"server_disk": "1",
"server_state": "active",
"node_uuid": "253e5dd0-9384-41ab-af13-4f2c2ce26112",
"server_vcpus": "1",
"server_metadata": {},
"server_project_id": "baea342fc74b4a1785b4a40c69a8d958",
"server_locked": false,
"server_uuid": "e2cb5f6f-fa1d-4ba2-be1e-0bf02fa86ba4",
"node_hostname": "localhost.localdomain",
"node_vcpus": "4",
"node_vcpu_ratio": "16.0",
"node_status": "enabled",
"node_disabled_reason": null,
"node_state": "up",
"node_memory": "16383",
"node_memory_ratio": "1.5",
"node_memory_mb_reserved": "512",
"node_disk": "37",
"node_disk_gb_reserved": "0",
"node_vcpus": "4",
"node_vcpu_reserved": "0",
"node_memory_ratio": "1.5",
"node_vcpu_ratio": "16.0",
"node_disk_ratio": "1.0",
"node_state": "up"
"node_uuid": "253e5dd0-9384-41ab-af13-4f2c2ce26112"
}
]
}

View File

@@ -35,21 +35,30 @@ Response
.. rest_parameters:: parameters.yaml
- server_uuid: server_uuid
- server_watcher_exclude: server_watcher_exclude
- server_name: server_name
- server_vcpus: server_vcpus
- server_state: server_state
- server_memory: server_memory
- server_disk: server_disk
- server_state: server_state
- node_uuid: node_uuid
- server_vcpus: server_vcpus
- server_metadata: server_metadata
- server_project_id: server_project_id
- server_locked: server_locked
- server_uuid: server_uuid
- node_hostname: node_hostname
- node_vcpus: node_vcpus
- node_vcpu_ratio: node_vcpu_ratio
- node_memory: node_memory
- node_memory_ratio: node_memory_ratio
- node_disk: node_disk
- node_disk_ratio: node_disk_ratio
- node_status: node_status
- node_disabled_reason: node_disabled_reason
- node_state: node_state
- node_memory: node_memory
- node_memory_mb_reserved: node_memory_mb_reserved
- node_disk: node_disk
- node_disk_gb_reserved: node_disk_gb_reserved
- node_vcpus: node_vcpus
- node_vcpu_reserved: node_vcpu_reserved
- node_memory_ratio: node_memory_ratio
- node_vcpu_ratio: node_vcpu_ratio
- node_disk_ratio: node_disk_ratio
- node_uuid: node_uuid
**Example JSON representation of a Data Model:**

View File

@@ -0,0 +1,7 @@
---
fixes:
- |
Fix API reference documentation for ``GET /infra-optim/v1/data_model``,
to include all missing fields from the response body. Please see
`Bug 2117726 <https://bugs.launchpad.net/watcher/+bug/2117726>`_ for
more details.