All checks were successful
continuous-integration/drone/push Build is passing
688 lines
17 KiB
YAML
688 lines
17 KiB
YAML
definitions:
|
|
models.CloudEventReceived:
|
|
properties:
|
|
cloudEvent:
|
|
properties:
|
|
data:
|
|
properties:
|
|
ChainId:
|
|
type: integer
|
|
ChangeTag:
|
|
type: string
|
|
ComputeResource:
|
|
properties:
|
|
ComputeResource:
|
|
properties:
|
|
Type:
|
|
type: string
|
|
Value:
|
|
type: string
|
|
type: object
|
|
Name:
|
|
type: string
|
|
type: object
|
|
CreatedTime:
|
|
description: Modified from time.Time
|
|
type: string
|
|
Datacenter:
|
|
properties:
|
|
Datacenter:
|
|
properties:
|
|
Type:
|
|
type: string
|
|
Value:
|
|
type: string
|
|
type: object
|
|
Name:
|
|
type: string
|
|
type: object
|
|
Ds: {}
|
|
Dvs: {}
|
|
FullFormattedMessage:
|
|
type: string
|
|
Host:
|
|
properties:
|
|
Host:
|
|
properties:
|
|
Type:
|
|
type: string
|
|
Value:
|
|
type: string
|
|
type: object
|
|
Name:
|
|
type: string
|
|
type: object
|
|
Key:
|
|
type: integer
|
|
Net: {}
|
|
NewParent:
|
|
$ref: '#/definitions/models.CloudEventResourcePool'
|
|
OldParent:
|
|
$ref: '#/definitions/models.CloudEventResourcePool'
|
|
SrcTemplate:
|
|
$ref: '#/definitions/models.CloudEventVm'
|
|
Template:
|
|
type: boolean
|
|
UserName:
|
|
type: string
|
|
Vm:
|
|
properties:
|
|
Name:
|
|
type: string
|
|
Vm:
|
|
properties:
|
|
Type:
|
|
type: string
|
|
Value:
|
|
type: string
|
|
type: object
|
|
type: object
|
|
configChanges:
|
|
allOf:
|
|
- $ref: '#/definitions/models.ConfigChangesReceived'
|
|
description: Modified to separate struct
|
|
configSpec:
|
|
type: object
|
|
type: object
|
|
id:
|
|
type: string
|
|
source:
|
|
type: string
|
|
specversion:
|
|
type: string
|
|
time:
|
|
description: Modified from time.Time
|
|
type: string
|
|
type:
|
|
type: string
|
|
type: object
|
|
type: object
|
|
models.CloudEventResourcePool:
|
|
properties:
|
|
Name:
|
|
type: string
|
|
ResourcePool:
|
|
properties:
|
|
Type:
|
|
type: string
|
|
Value:
|
|
type: string
|
|
type: object
|
|
type: object
|
|
models.CloudEventVm:
|
|
properties:
|
|
Name:
|
|
type: string
|
|
Vm:
|
|
properties:
|
|
Type:
|
|
type: string
|
|
Value:
|
|
type: string
|
|
type: object
|
|
type: object
|
|
models.ConfigChangesReceived:
|
|
properties:
|
|
modified:
|
|
type: string
|
|
type: object
|
|
models.ImportReceived:
|
|
properties:
|
|
Cluster:
|
|
type: string
|
|
CreationTime:
|
|
type: integer
|
|
Datacenter:
|
|
type: string
|
|
Folder:
|
|
type: string
|
|
InitialRam:
|
|
type: integer
|
|
InitialVcpus:
|
|
type: integer
|
|
Name:
|
|
type: string
|
|
PowerState:
|
|
type: integer
|
|
ProvisionedDisk:
|
|
type: number
|
|
ResourcePool:
|
|
type: string
|
|
Vcenter:
|
|
type: string
|
|
VmId:
|
|
type: string
|
|
type: object
|
|
info:
|
|
contact: {}
|
|
paths:
|
|
/:
|
|
get:
|
|
description: Renders the main UI page.
|
|
produces:
|
|
- text/html
|
|
responses:
|
|
"200":
|
|
description: HTML page
|
|
schema:
|
|
type: string
|
|
"500":
|
|
description: Render failed
|
|
schema:
|
|
type: string
|
|
summary: Home page
|
|
tags:
|
|
- ui
|
|
/api/cleanup/updates:
|
|
delete:
|
|
deprecated: true
|
|
description: 'Deprecated: Removes update records that are no longer associated
|
|
with a VM.'
|
|
produces:
|
|
- text/plain
|
|
responses:
|
|
"200":
|
|
description: Cleanup completed
|
|
schema:
|
|
type: string
|
|
"500":
|
|
description: Server error
|
|
schema:
|
|
type: string
|
|
summary: Cleanup updates (deprecated)
|
|
tags:
|
|
- maintenance
|
|
/api/cleanup/vcenter:
|
|
delete:
|
|
deprecated: true
|
|
description: 'Deprecated: Removes all inventory entries associated with a vCenter
|
|
URL.'
|
|
parameters:
|
|
- description: vCenter URL
|
|
in: query
|
|
name: vc_url
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Cleanup completed
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"400":
|
|
description: Invalid request
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
summary: Cleanup vCenter inventory (deprecated)
|
|
tags:
|
|
- maintenance
|
|
/api/encrypt:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Encrypts a plaintext value and returns the ciphertext.
|
|
parameters:
|
|
- description: Plaintext payload
|
|
in: body
|
|
name: payload
|
|
required: true
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Ciphertext response
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"500":
|
|
description: Server error
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
summary: Encrypt data
|
|
tags:
|
|
- crypto
|
|
/api/event/vm/create:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
deprecated: true
|
|
description: 'Deprecated: Parses a VM create CloudEvent and stores the event
|
|
data.'
|
|
parameters:
|
|
- description: CloudEvent payload
|
|
in: body
|
|
name: event
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/models.CloudEventReceived'
|
|
produces:
|
|
- text/plain
|
|
responses:
|
|
"200":
|
|
description: Create event processed
|
|
schema:
|
|
type: string
|
|
"400":
|
|
description: Invalid request
|
|
schema:
|
|
type: string
|
|
"500":
|
|
description: Server error
|
|
schema:
|
|
type: string
|
|
summary: Record VM create event (deprecated)
|
|
tags:
|
|
- events
|
|
/api/event/vm/delete:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
deprecated: true
|
|
description: 'Deprecated: Parses a VM delete CloudEvent and marks the VM as
|
|
deleted in inventory.'
|
|
parameters:
|
|
- description: CloudEvent payload
|
|
in: body
|
|
name: event
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/models.CloudEventReceived'
|
|
produces:
|
|
- text/plain
|
|
responses:
|
|
"200":
|
|
description: Delete event processed
|
|
schema:
|
|
type: string
|
|
"400":
|
|
description: Invalid request
|
|
schema:
|
|
type: string
|
|
"500":
|
|
description: Server error
|
|
schema:
|
|
type: string
|
|
summary: Record VM delete event (deprecated)
|
|
tags:
|
|
- events
|
|
/api/event/vm/modify:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
deprecated: true
|
|
description: 'Deprecated: Parses a VM modify CloudEvent and creates an update
|
|
record when relevant changes are detected.'
|
|
parameters:
|
|
- description: CloudEvent payload
|
|
in: body
|
|
name: event
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/models.CloudEventReceived'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Modify event processed
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"202":
|
|
description: No relevant changes
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"500":
|
|
description: Server error
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
summary: Record VM modify event (deprecated)
|
|
tags:
|
|
- events
|
|
/api/event/vm/move:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
deprecated: true
|
|
description: 'Deprecated: Parses a VM move CloudEvent and creates an update
|
|
record.'
|
|
parameters:
|
|
- description: CloudEvent payload
|
|
in: body
|
|
name: event
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/models.CloudEventReceived'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Move event processed
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"400":
|
|
description: Invalid request
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"500":
|
|
description: Server error
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
summary: Record VM move event (deprecated)
|
|
tags:
|
|
- events
|
|
/api/import/vm:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Imports existing VM inventory data in bulk.
|
|
parameters:
|
|
- description: Bulk import payload
|
|
in: body
|
|
name: import
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/models.ImportReceived'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Import processed
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"500":
|
|
description: Server error
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
summary: Import VMs
|
|
tags:
|
|
- inventory
|
|
/api/inventory/vm/delete:
|
|
delete:
|
|
description: Removes a VM inventory entry by VM ID and datacenter name.
|
|
parameters:
|
|
- description: VM ID
|
|
in: query
|
|
name: vm_id
|
|
required: true
|
|
type: string
|
|
- description: Datacenter name
|
|
in: query
|
|
name: datacenter_name
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Cleanup completed
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"400":
|
|
description: Invalid request
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
summary: Cleanup VM inventory entry
|
|
tags:
|
|
- inventory
|
|
/api/inventory/vm/update:
|
|
post:
|
|
description: Queries vCenter and updates inventory records with missing details.
|
|
produces:
|
|
- text/plain
|
|
responses:
|
|
"200":
|
|
description: Update completed
|
|
schema:
|
|
type: string
|
|
"500":
|
|
description: Server error
|
|
schema:
|
|
type: string
|
|
summary: Refresh VM details
|
|
tags:
|
|
- inventory
|
|
/api/report/inventory:
|
|
get:
|
|
description: Generates an inventory XLSX report and returns it as a file download.
|
|
produces:
|
|
- application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
|
|
responses:
|
|
"200":
|
|
description: Inventory XLSX report
|
|
schema:
|
|
type: file
|
|
"500":
|
|
description: Report generation failed
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
summary: Download inventory report
|
|
tags:
|
|
- reports
|
|
/api/report/snapshot:
|
|
get:
|
|
description: Downloads a snapshot table as an XLSX file.
|
|
parameters:
|
|
- description: Snapshot table name
|
|
in: query
|
|
name: table
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
|
|
responses:
|
|
"200":
|
|
description: Snapshot XLSX report
|
|
schema:
|
|
type: file
|
|
"400":
|
|
description: Invalid request
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"500":
|
|
description: Server error
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
summary: Download snapshot report
|
|
tags:
|
|
- snapshots
|
|
/api/report/updates:
|
|
get:
|
|
description: Generates an updates XLSX report and returns it as a file download.
|
|
produces:
|
|
- application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
|
|
responses:
|
|
"200":
|
|
description: Updates XLSX report
|
|
schema:
|
|
type: file
|
|
"500":
|
|
description: Report generation failed
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
summary: Download updates report
|
|
tags:
|
|
- reports
|
|
/api/snapshots/aggregate:
|
|
post:
|
|
description: Forces regeneration of a daily or monthly summary table for a specified
|
|
date or month.
|
|
parameters:
|
|
- description: 'Aggregation type: daily or monthly'
|
|
in: query
|
|
name: type
|
|
required: true
|
|
type: string
|
|
- description: Daily date (YYYY-MM-DD) or monthly date (YYYY-MM)
|
|
in: query
|
|
name: date
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Aggregation complete
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"400":
|
|
description: Invalid request
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"500":
|
|
description: Server error
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
summary: Force snapshot aggregation
|
|
tags:
|
|
- snapshots
|
|
/api/snapshots/migrate:
|
|
post:
|
|
description: Rebuilds the snapshot registry from existing tables and renames
|
|
hourly tables to epoch-based names.
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Migration results
|
|
schema:
|
|
additionalProperties: true
|
|
type: object
|
|
"500":
|
|
description: Server error
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
summary: Migrate snapshot registry
|
|
tags:
|
|
- snapshots
|
|
/api/snapshots/regenerate-hourly-reports:
|
|
post:
|
|
description: Regenerates XLSX reports for hourly snapshots when the report files
|
|
are missing or empty.
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Regeneration summary
|
|
schema:
|
|
additionalProperties: true
|
|
type: object
|
|
"500":
|
|
description: Server error
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
summary: Regenerate hourly snapshot reports
|
|
tags:
|
|
- snapshots
|
|
/metrics:
|
|
get:
|
|
description: Exposes Prometheus metrics for vctp.
|
|
produces:
|
|
- text/plain
|
|
responses:
|
|
"200":
|
|
description: Prometheus metrics
|
|
summary: Prometheus metrics
|
|
tags:
|
|
- metrics
|
|
/snapshots/daily:
|
|
get:
|
|
description: Lists daily summary snapshot tables.
|
|
produces:
|
|
- text/html
|
|
responses:
|
|
"200":
|
|
description: HTML page
|
|
schema:
|
|
type: string
|
|
"500":
|
|
description: Server error
|
|
schema:
|
|
type: string
|
|
summary: List daily snapshots
|
|
tags:
|
|
- snapshots
|
|
/snapshots/hourly:
|
|
get:
|
|
description: Lists hourly inventory snapshot tables.
|
|
produces:
|
|
- text/html
|
|
responses:
|
|
"200":
|
|
description: HTML page
|
|
schema:
|
|
type: string
|
|
"500":
|
|
description: Server error
|
|
schema:
|
|
type: string
|
|
summary: List hourly snapshots
|
|
tags:
|
|
- snapshots
|
|
/snapshots/monthly:
|
|
get:
|
|
description: Lists monthly summary snapshot tables.
|
|
produces:
|
|
- text/html
|
|
responses:
|
|
"200":
|
|
description: HTML page
|
|
schema:
|
|
type: string
|
|
"500":
|
|
description: Server error
|
|
schema:
|
|
type: string
|
|
summary: List monthly snapshots
|
|
tags:
|
|
- snapshots
|
|
swagger: "2.0"
|