Add PostgreSQL checkpoint functionality and update related database operations
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2026-02-16 09:21:00 +11:00
parent ff1ec3f4aa
commit 6da2da3e82
8 changed files with 412 additions and 34 deletions

View File

@@ -288,6 +288,36 @@ definitions:
status:
type: string
type: object
models.VcenterCacheRebuildResponse:
properties:
failed:
type: integer
results:
items:
$ref: '#/definitions/models.VcenterCacheRebuildResult'
type: array
status:
type: string
succeeded:
type: integer
total:
type: integer
type: object
models.VcenterCacheRebuildResult:
properties:
duration_seconds:
type: number
error:
type: string
folder_entries:
type: integer
host_entries:
type: integer
resource_pool_entries:
type: integer
vcenter:
type: string
type: object
info:
contact: {}
paths:
@@ -548,7 +578,8 @@ paths:
post:
consumes:
- application/json
description: Imports existing VM inventory data in bulk.
deprecated: true
description: 'Deprecated: Imports existing VM inventory data in bulk.'
parameters:
- description: Bulk import payload
in: body
@@ -567,12 +598,14 @@ paths:
description: Server error
schema:
$ref: '#/definitions/models.ErrorResponse'
summary: Import VMs
summary: Import VMs (deprecated)
tags:
- inventory
/api/inventory/vm/delete:
delete:
description: Removes a VM inventory entry by VM ID and datacenter name.
deprecated: true
description: 'Deprecated: Removes a VM inventory entry by VM ID and datacenter
name.'
parameters:
- description: VM ID
in: query
@@ -595,12 +628,14 @@ paths:
description: Invalid request
schema:
$ref: '#/definitions/models.ErrorResponse'
summary: Cleanup VM inventory entry
summary: Cleanup VM inventory entry (deprecated)
tags:
- inventory
/api/inventory/vm/update:
post:
description: Queries vCenter and updates inventory records with missing details.
deprecated: true
description: 'Deprecated: Queries vCenter and updates inventory records with
missing details.'
produces:
- application/json
responses:
@@ -612,7 +647,7 @@ paths:
description: Server error
schema:
$ref: '#/definitions/models.ErrorResponse'
summary: Refresh VM details
summary: Refresh VM details (deprecated)
tags:
- inventory
/api/report/inventory:
@@ -807,6 +842,38 @@ paths:
summary: Run full snapshot repair suite
tags:
- snapshots
/api/vcenters/cache/rebuild:
post:
description: Rebuilds cached folder/resource-pool/host(cluster+datacenter) references
from vCenter and rewrites the database cache tables.
parameters:
- description: Optional single vCenter URL to rebuild; defaults to all configured
vCenters
in: query
name: vcenter
type: string
produces:
- application/json
responses:
"200":
description: Cache rebuild summary
schema:
$ref: '#/definitions/models.VcenterCacheRebuildResponse'
"400":
description: Invalid request
schema:
$ref: '#/definitions/models.ErrorResponse'
"405":
description: Method not allowed
schema:
$ref: '#/definitions/models.ErrorResponse'
"500":
description: All rebuild attempts failed
schema:
$ref: '#/definitions/models.VcenterCacheRebuildResponse'
summary: Rebuild vCenter object cache
tags:
- vcenters
/metrics:
get:
description: Exposes Prometheus metrics for vctp.