go-redfish/spec/openapi.yaml
Kanwar Saad Bin Liaqat 7977676acb
parse datetime as string
due to bug in sushi emulator, we will parse
manager's time as string instead of datetime.
2019-09-19 03:40:48 +03:00

863 lines
22 KiB
YAML

openapi: 3.0.2
info:
title: Redfish OAPI specification
description: 'Partial Redfish OAPI specification for a limited client'
version: 0.0.1
components:
schemas:
BootSource:
type: string
enum:
- None
- Pxe
- Floppy
- Cd
- Usb
- Hdd
- BiosSetup
- Utilities
- Diags
- UefiShell
- UefiTarget
- SDCard
- UefiHttp
- RemoteDrive
- UefiBootNext
BootSourceOverrideEnabled:
type: string
enum:
- Once
- Continuous
State:
type: string
enum:
- Enabled
- Disabled
- StandbyOffline
- StandbySpare
- InTest
- Starting
- Absent
- UnavailableOffline
- Deferring
- Quiesced
- Updating
Health:
type: string
enum:
- OK
- Warning
- Critical
PowerState:
type: string
enum:
- On
- Off
- PoweringOn
- PoweringOff
ResetType:
type: string
enum:
- "On"
- ForceOff
- GracefulShutdown
- GracefulRestart
- ForceRestart
- Nmi
- ForceOn
- PushPowerButton
- PowerCycle
IndicatorLED:
type: string
enum:
- Unknown
- Lit
- Blinking
- "Off"
ManagerType:
enum:
- ManagementController
- EnclosureManager
- BMC
- RackManager
- AuxiliaryController
- Service
type: string
ConnectedVia:
enum:
- NotConnected
- URI
- Applet
- Oem
type: string
TransferMethod:
enum:
- Stream
- Upload
type: string
TransferProtocolType:
enum:
- CIFS
- FTP
- SFTP
- HTTP
- HTTPS
- NFS
- SCP
- TFTP
type: string
context:
description: The OData description of a payload.
format: uri-reference
readOnly: true
type: string
count:
description: The number of items in a collection.
readOnly: true
type: integer
name:
description: The name of the resource.
readOnly: true
type: string
etag:
description: The current ETag of the resource.
readOnly: true
type: string
id:
description: The name of the resource.
readOnly: true
type: string
odataId:
description: The unique identifier for a resource.
format: uri-reference
readOnly: true
type: string
idRef:
additionalProperties: false
description: A reference to a resource.
properties:
'@odata.id':
$ref: '#/components/schemas/odataId'
type: object
nextLink:
description: The URI to the resource containing the next set of partial members.
format: uri-reference
readOnly: true
type: string
rtype:
description: The type of a resource.
readOnly: true
type: string
UUID:
pattern: ([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})
type: string
Message:
additionalProperties: false
properties:
Message:
readOnly: true
type: string
MessageArgs:
items:
type: string
readOnly: true
type: array
MessageId:
readOnly: true
type: string
RelatedProperties:
items:
type: string
readOnly: true
type: array
Resolution:
readOnly: true
type: string
Severity:
readOnly: true
type: string
required:
- MessageId
type: object
RedfishError:
description: Contains an error payload from a Redfish Service.
properties:
error:
properties:
'@Message.ExtendedInfo':
items:
$ref: '#/components/schemas/Message'
type: array
code:
readOnly: true
type: string
message:
readOnly: true
type: string
required:
- code
- message
type: object
required:
- error
type: object
Root:
type: object
additionalProperties: false
description: Root redfish path.
required:
- '@odata.id'
- '@odata.type'
- 'Name'
properties:
'Id':
$ref: '#/components/schemas/id'
'Name':
$ref: '#/components/schemas/name'
'RedfishVersion':
type: string
description: redfish version
'UUID':
$ref: '#/components/schemas/UUID'
'@odata.type':
$ref: '#/components/schemas/rtype'
'@odata.id':
$ref: '#/components/schemas/odataId'
'@Redfish.Copyright':
type: string
description: redfish copyright
'Systems':
$ref: '#/components/schemas/idRef'
'Managers':
$ref: '#/components/schemas/idRef'
Collection:
type: object
additionalProperties: false
description: A Collection of ComputerSystem resource instances.
required:
- 'Members'
- '@odata.id'
- '@odata.type'
- 'Name'
properties:
'@odata.context':
type: string
description: context
'@odata.etag':
type: string
description: etag
'@odata.id':
type: string
description: id
'@odata.type':
type: string
description: type
'Description':
type: string
description: "description"
nullable: true
readOnly: true
'Members':
description: Contains the members of this collection.
items:
$ref: '#/components/schemas/idRef'
readOnly: true
type: array
'Members@odata.count':
$ref: '#/components/schemas/count'
'Members@odata.nextLink':
$ref: '#/components/schemas/nextLink'
'Name':
$ref: '#/components/schemas/name'
readOnly: true
Status:
type: object
additionalProperties: false
properties:
Health:
$ref: '#/components/schemas/Health'
nullable: true
readOnly: true
HealthRollup:
$ref: '#/components/schemas/Health'
nullable: true
readOnly: true
State:
$ref: '#/components/schemas/State'
nullable: true
readOnly: true
Boot:
type: object
additionalProperties: false
properties:
BootSourceOverrideEnabled:
$ref: '#/components/schemas/BootSourceOverrideEnabled'
BootSourceOverrideTarget:
$ref: '#/components/schemas/BootSource'
BootSourceOverrideTarget@Redfish.AllowableValues:
type: array
items:
$ref: '#/components/schemas/BootSource'
ProcessorSummary:
type: object
additionalProperties: false
properties:
Count:
minimum: 0
nullable: true
readOnly: true
type: integer
Status:
$ref: '#/components/schemas/Status'
MemorySummary:
type: object
additionalProperties: false
properties:
TotalSystemMemoryGiB:
minimum: 0
nullable: true
readOnly: true
type: number
TotalSystemPersistentMemoryGiB:
minimum: 0
nullable: true
readOnly: true
type: number
Status:
$ref: '#/components/schemas/Status'
SystemLinks:
type: object
additionalProperties: false
properties:
Chassis:
type: array
items:
$ref: '#/components/schemas/idRef'
ManagedBy:
type: array
items:
$ref: '#/components/schemas/idRef'
ManagerLinks:
type: object
additionalProperties: false
properties:
ManagerForServers:
type: array
items:
$ref: '#/components/schemas/idRef'
ManagerForChassis:
type: array
items:
$ref: '#/components/schemas/idRef'
ManagerForSwitches:
type: array
items:
$ref: '#/components/schemas/idRef'
ManagerInChassis:
type: array
items:
$ref: '#/components/schemas/idRef'
ComputerSystemReset:
type: object
additionalProperties: false
properties:
target:
$ref: '#/components/schemas/odataId'
ResetType@Redfish.AllowableValues:
type: array
items:
$ref: '#/components/schemas/ResetType'
ResetRequestBody:
additionalProperties: false
properties:
ResetType:
$ref: '#/components/schemas/ResetType'
type: object
ComputerSystem:
type: object
additionalProperties: false
description: Root redfish path.
required:
- '@odata.id'
- '@odata.type'
- 'Name'
properties:
'Id':
$ref: '#/components/schemas/id'
'Name':
$ref: '#/components/schemas/name'
'RedfishVersion':
type: string
description: redfish version
'UUID':
$ref: '#/components/schemas/UUID'
'@odata.type':
$ref: '#/components/schemas/rtype'
'@odata.id':
$ref: '#/components/schemas/odataId'
'@odata.context':
$ref: '#/components/schemas/context'
'@Redfish.Copyright':
type: string
description: redfish copyright
'Bios':
$ref: '#/components/schemas/idRef'
'Processors':
$ref: '#/components/schemas/idRef'
'Memory':
$ref: '#/components/schemas/idRef'
'EthernetInterfaces':
$ref: '#/components/schemas/idRef'
'SimpleStorage':
$ref: '#/components/schemas/idRef'
'PowerState':
$ref: '#/components/schemas/PowerState'
'Status':
$ref: '#/components/schemas/Status'
'Boot':
$ref: '#/components/schemas/Boot'
'ProcessorSummary':
$ref: '#/components/schemas/ProcessorSummary'
'MemorySummary':
$ref: '#/components/schemas/MemorySummary'
'IndicatorLED':
$ref: '#/components/schemas/IndicatorLED'
'Links':
$ref: '#/components/schemas/SystemLinks'
'Actions':
type: object
properties:
"#ComputerSystem.Reset":
$ref: '#/components/schemas/ComputerSystemReset'
Manager:
type: object
additionalProperties: false
description: Redfish manager resource.
required:
- '@odata.id'
- '@odata.type'
- 'Name'
properties:
'Id':
$ref: '#/components/schemas/id'
'Name':
$ref: '#/components/schemas/name'
'UUID':
$ref: '#/components/schemas/UUID'
'ServiceEntryPointUUID':
$ref: '#/components/schemas/UUID'
'@odata.type':
$ref: '#/components/schemas/rtype'
'@odata.id':
$ref: '#/components/schemas/odataId'
'@odata.context':
$ref: '#/components/schemas/context'
'@Redfish.Copyright':
type: string
description: redfish copyright
'Model':
nullable: true
readOnly: true
type: string
'ManagerType':
$ref: '#/components/schemas/ManagerType'
readOnly: true
'Status':
$ref: '#/components/schemas/Status'
'DateTime':
#format: date-time
format: string
nullable: true
readOnly: false
type: string
'DateTimeLocalOffset':
description: 'The time offset from UTC that the DateTime property is set
to in format: +06:00 .'
nullable: true
pattern: ([-+][0-1][0-9]:[0-5][0-9])
readOnly: false
type: string
'Description':
type: string
description: "description"
nullable: true
readOnly: true
'EthernetInterfaces':
$ref: '#/components/schemas/idRef'
readOnly: true
'FirmwareVersion':
nullable: true
readOnly: true
type: string
'Links':
$ref: '#/components/schemas/ManagerLinks'
'PowerState':
$ref: '#/components/schemas/PowerState'
'VirtualMedia':
$ref: '#/components/schemas/idRef'
readOnly: true
VirtualMedia:
type: object
additionalProperties: false
description: Redfish virtual media resource for manager.
required:
- '@odata.id'
- '@odata.type'
- 'Name'
properties:
'Id':
$ref: '#/components/schemas/id'
'Name':
$ref: '#/components/schemas/name'
'@odata.type':
$ref: '#/components/schemas/rtype'
'@odata.id':
$ref: '#/components/schemas/odataId'
'@odata.context':
$ref: '#/components/schemas/context'
'@Redfish.Copyright':
type: string
description: redfish copyright
'Description':
type: string
description: "description"
nullable: true
readOnly: true
'Image':
format: uri-reference
nullable: true
readOnly: false
type: string
'ImageName':
nullable: true
readOnly: true
type: string
'Inserted':
nullable: true
readOnly: false
type: boolean
'ConnectedVia':
$ref: '#/components/schemas/ConnectedVia'
nullable: true
readOnly: true
'MediaTypes':
items:
type: string
readOnly: true
type: array
'WriteProtected':
nullable: true
readOnly: false
type: boolean
'UserName':
nullable: true
readOnly: false
type: string
'Password':
nullable: true
readOnly: false
type: string
'TransferMethod':
$ref: '#/components/schemas/TransferMethod'
nullable: true
readOnly: false
'TransferProtocolType':
$ref: '#/components/schemas/TransferProtocolType'
nullable: true
readOnly: false
'Actions':
type: object
additionalProperties: false
properties:
'#VirtualMedia.EjectMedia':
type: object
properties:
'target':
$ref: '#/components/schemas/odataId'
'#VirtualMedia.InsertMedia':
type: object
properties:
'target':
$ref: '#/components/schemas/odataId'
InsertMediaRequestBody:
additionalProperties: false
properties:
Image:
type: string
Inserted:
type: boolean
Password:
type: string
TransferMethod:
$ref: '#/components/schemas/TransferMethod'
TransferProtocolType:
$ref: '#/components/schemas/TransferProtocolType'
UserName:
type: string
WriteProtected:
type: boolean
required:
- Image
type: object
EjectMediaRequestBody:
additionalProperties: false
properties: {}
type: object
paths:
/redfish/v1:
get:
operationId: get_root
responses:
'200':
description: Get redfish root
content:
'application/json':
schema:
$ref: '#/components/schemas/Root'
/redfish/v1/Systems:
get:
operationId: list_systems
responses:
'200':
description: Computer Systems List
content:
'application/json':
schema:
$ref: '#/components/schemas/Collection'
/redfish/v1/Systems/{systemId}:
get:
operationId: get_system
responses:
'200':
description: Computer Systems List
content:
'application/json':
schema:
$ref: '#/components/schemas/ComputerSystem'
default:
content:
application/json:
schema:
$ref: '#/components/schemas/RedfishError'
description: Error condition
patch:
operationId: set_system
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ComputerSystem'
required: true
responses:
'200':
description: ComputerSystem Properties set successfully
content:
application/json:
schema:
$ref: '#/components/schemas/ComputerSystem'
'204':
description: Success, but no response data
default:
content:
application/json:
schema:
$ref: '#/components/schemas/RedfishError'
description: Error condition
parameters:
- name: systemId
in: path
description: ID of resource
required: true
schema:
type: string
/redfish/v1/Systems/{ComputerSystemId}/Actions/ComputerSystem.Reset:
parameters:
- in: path
name: ComputerSystemId
required: true
schema:
type: string
post:
operationId: reset_system
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ResetRequestBody'
required: true
responses:
'200':
description: Success with response
content:
application/json:
schema:
$ref: '#/components/schemas/RedfishError'
'204':
description: Success, but no response data
default:
content:
application/json:
schema:
$ref: '#/components/schemas/RedfishError'
description: Error condition
/redfish/v1/Managers:
get:
operationId: list_managers
responses:
'200':
description: Managers List
content:
'application/json':
schema:
$ref: '#/components/schemas/Collection'
/redfish/v1/Managers/{managerId}:
get:
operationId: get_manager
responses:
'200':
description: Get Manager
content:
'application/json':
schema:
$ref: '#/components/schemas/Manager'
default:
content:
application/json:
schema:
$ref: '#/components/schemas/RedfishError'
description: Error condition
parameters:
- name: managerId
in: path
description: ID of resource
required: true
schema:
type: string
/redfish/v1/Managers/{managerId}/VirtualMedia:
get:
operationId: list_manager_virtual_media
responses:
'200':
description: "Get a list of Manager's virtual media"
content:
'application/json':
schema:
$ref: '#/components/schemas/Collection'
default:
content:
application/json:
schema:
$ref: '#/components/schemas/RedfishError'
description: Error condition
parameters:
- name: managerId
in: path
description: ID of resource
required: true
schema:
type: string
/redfish/v1/Managers/{managerId}/VirtualMedia/{virtualMediaId}:
get:
operationId: get_manager_virtual_media
responses:
'200':
description: "Get a list of Manager's virtual media"
content:
'application/json':
schema:
$ref: '#/components/schemas/VirtualMedia'
default:
content:
application/json:
schema:
$ref: '#/components/schemas/RedfishError'
description: Error condition
parameters:
- name: managerId
in: path
description: ID of resource
required: true
schema:
type: string
- name: virtualMediaId
in: path
description: ID of resource
required: true
schema:
type: string
/redfish/v1/Managers/{managerId}/VirtualMedia/{virtualMediaId}/Actions/VirtualMedia.InsertMedia:
post:
operationId: insert_virtual_media
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/InsertMediaRequestBody'
required: true
responses:
'200':
description: "Insert virtual media"
content:
'application/json':
schema:
$ref: '#/components/schemas/RedfishError'
default:
content:
application/json:
schema:
$ref: '#/components/schemas/RedfishError'
description: Error condition
parameters:
- name: managerId
in: path
description: ID of resource
required: true
schema:
type: string
- name: virtualMediaId
in: path
description: ID of resource
required: true
schema:
type: string
/redfish/v1/Managers/{managerId}/VirtualMedia/{virtualMediaId}/Actions/VirtualMedia.EjectMedia:
post:
operationId: eject_virtual_media
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/EjectMediaRequestBody'
required: true
responses:
'200':
description: "Insert virtual media"
content:
'application/json':
schema:
$ref: '#/components/schemas/RedfishError'
default:
content:
application/json:
schema:
$ref: '#/components/schemas/RedfishError'
description: Error condition
parameters:
- name: managerId
in: path
description: ID of resource
required: true
schema:
type: string
- name: virtualMediaId
in: path
description: ID of resource
required: true
schema:
type: string