From 15a79edfab2974ba725776c6fef65a8b0bb3f4ed Mon Sep 17 00:00:00 2001 From: Agarwal Date: Tue, 23 May 2023 17:57:09 +0530 Subject: [PATCH] Adding lib models --- lib-dmtf/model/ComputerSystem.go | 795 ++++++++++++++++++++++++++----- lib-dmtf/model/accountService.go | 449 ++++++++++++++++- lib-dmtf/model/common.go | 16 +- lib-dmtf/model/manager.go | 19 +- lib-dmtf/model/storage.go | 5 + 5 files changed, 1139 insertions(+), 145 deletions(-) diff --git a/lib-dmtf/model/ComputerSystem.go b/lib-dmtf/model/ComputerSystem.go index a10a40297..86f78216f 100644 --- a/lib-dmtf/model/ComputerSystem.go +++ b/lib-dmtf/model/ComputerSystem.go @@ -19,92 +19,528 @@ import ( "github.com/ODIM-Project/ODIM/lib-utilities/errors" ) +// BootSource - AliasBootOrder, BootSourceOverrideTarget +// Ordered array of boot source aliases representing the persistent +// boot order associated with this computer system +type BootSource string + +// AutomaticRetryConfig - The configuration of how the system retries booting automatically +type AutomaticRetryConfig string + +// BootOrderTypes - The name of the boot order property that the system uses for the persistent boot order +type BootOrderTypes string + +// BootSourceOverrideEnabled - The state of the boot source override feature +type BootSourceOverrideEnabled string + +// BootSourceOverrideMode - The BIOS boot mode to use when the system boots from the BootSourceOverrideTarget boot source +type BootSourceOverrideMode string + +// StopBootOnFault - If the boot should stop on a fault +type StopBootOnFault string + +// TrustedModuleRequiredToBoot - The Trusted Module boot requirement +type TrustedModuleRequiredToBoot string + +// CompositionUseCase - The composition use cases in which this computer system can participate +type CompositionUseCase string + +// SystemType -The type of computer system that this resource represents +type SystemType string + +// PowerRestorePolicyTypes -The desired power state of the system when power is restored after a power loss +type PowerRestorePolicyTypes string + +// InterfaceType - The interface type of the Trusted Module +type InterfaceType string + +// InterfaceTypeSelection - The interface type selection supported by this Trusted Module +type InterfaceTypeSelection string + +// MemoryMirroring - The ability and type of memory mirroring that this computer system supports +type MemoryMirroring string + +// WatchdogWarningActions - The action to perform when the watchdog timer is close to reaching its timeout value +type WatchdogWarningActions string + +// WatchdogTimeoutActions - The action to perform when the watchdog timer reaches its timeout value +type WatchdogTimeoutActions string + +// PowerMode - The power mode setting of the computer system +type PowerMode string + +// CachePolicy - he cache policy to control how KMIP data is cached +type CachePolicy string + +// HostingRole - The hosting roles that this computer system supports +type HostingRole string + +// IndicatorLED - The state of the indicator LED, which identifies the system +type IndicatorLED string + +// BootProgressTypes - The last boot progress state +type BootProgressTypes string + +const ( + + // BootSourceNone - Boot from the normal boot device + BootSourceNone BootSource = "None" + + //BootSourcePxe - Boot from the Pre-Boot EXecution (PXE) environmen + BootSourcePxe BootSource = "Pxe" + + //BootSourceFloppy - Boot from the floppy disk drive + BootSourceFloppy BootSource = "Floppy" + + //BootSourceCd - Boot from the CD or DVD + BootSourceCd BootSource = "Cd" + + //BootSourceUsb - Boot from a system BIOS-specified USB device + BootSourceUsb BootSource = "Usb" + + //BootSourceHdd - Boot from a hard drive + BootSourceHdd BootSource = "Hdd" + + // BootSourceBiosSetup - Boot to the BIOS setup utility + BootSourceBiosSetup BootSource = "BiosSetup" + + //BootSourceUtilities - + BootSourceUtilities BootSource = "Utilities" + + //BootSourceDiags - Boot to the manufacturer's diagnostics program + BootSourceDiags BootSource = "Diags" + + //BootSourceUefiShell - Boot to the UEFI Shell + BootSourceUefiShell BootSource = "UefiShell" + + //BootSourceUefiTarget - Boot to the UEFI device specified in the UefiTargetBootSourceOverride property + BootSourceUefiTarget BootSource = "UefiTarget" + + //BootSourceSDCard - Boot from an SD card + BootSourceSDCard BootSource = "SDCard" + + //BootSourceUefiHTTP - Boot from a UEFI HTTP network location + BootSourceUefiHTTP BootSource = "UefiHttp" + + //BootSourceRemoteDrive - Boot from a remote drive, such as an iSCSI target + BootSourceRemoteDrive BootSource = "RemoteDrive" + + //BootSourceUefiBootNext - Boot to the UEFI device that the BootNext property specifies + BootSourceUefiBootNext BootSource = "UefiBootNext" + + //BootSourceRecovery - Boot to a system-designated recovery process or image + BootSourceRecovery BootSource = "Recovery" + + //AutomaticRetryConfigDisabled - Disable automatic retrying of booting + AutomaticRetryConfigDisabled AutomaticRetryConfig = "Disabled" + + //AutomaticRetryConfigRetryAttempts - Always automatically retry booting + AutomaticRetryConfigRetryAttempts AutomaticRetryConfig = "RetryAttempts" + + //AutomaticRetryConfigRetryAlways - Automatic retrying of booting is based on a specified retry count + AutomaticRetryConfigRetryAlways AutomaticRetryConfig = "RetryAlways" + + //BootOrderTypesBootOrder - The system uses the BootOrder property to specify the persistent boot order + BootOrderTypesBootOrder BootOrderTypes = "BootOrder" + + //BootOrderTypesAliasBootOrder - The system uses the AliasBootOrder property to specify the persistent boot order + BootOrderTypesAliasBootOrder BootOrderTypes = "AliasBootOrder" + + //BootSourceOverrideEnabledDisabled - The system boots normally + BootSourceOverrideEnabledDisabled BootSourceOverrideEnabled = "Disabled" + + //BootSourceOverrideEnabledOnce - On its next boot cycle, the system boots one time to the boot source override target + BootSourceOverrideEnabledOnce BootSourceOverrideEnabled = "Once" + + //BootSourceOverrideEnabledContinuous - The system boots to the target specified in the BootSourceOverrideTarget property until this property is `Disabled` + BootSourceOverrideEnabledContinuous BootSourceOverrideEnabled = "Continuous" + + //BootSourceOverrideModeLegacy - The system boots in non-UEFI boot mode to the boot source override target + BootSourceOverrideModeLegacy BootSourceOverrideMode = "Legacy" + + //BootSourceOverrideModeUEFI - The system boots in UEFI boot mode to the boot source override target + BootSourceOverrideModeUEFI BootSourceOverrideMode = "UEFI" + + //StopBootOnFaultNever - The system performs any normal recovery actions during boot if a fault occurs + StopBootOnFaultNever StopBootOnFault = "Never" + + //StopBootOnFaultAnyFault - The system should stop the boot on any fault + StopBootOnFaultAnyFault StopBootOnFault = "AnyFault" + + //TrustedModuleRequiredToBootDisabled - No Trusted Module requirement to boot + TrustedModuleRequiredToBootDisabled TrustedModuleRequiredToBoot = "Disabled" + + //TrustedModuleRequiredToBootRequired - A functional Trusted Module is required to boot + TrustedModuleRequiredToBootRequired TrustedModuleRequiredToBoot = "Required" + + //BootProgressTypesNone - The system is not booting + BootProgressTypesNone BootProgressTypes = "None" + + //BootProgressTypesPrimaryProcessorInitializationStarted - The system has started initializing the primary processor + BootProgressTypesPrimaryProcessorInitializationStarted BootProgressTypes = "PrimaryProcessorInitializationStarted" + + //BootProgressTypesBusInitializationStarted - The system has started initializing the buses + BootProgressTypesBusInitializationStarted BootProgressTypes = "BusInitializationStarted" + + //BootProgressTypesMemoryInitializationStarted - The system has started initializing the memory + BootProgressTypesMemoryInitializationStarted BootProgressTypes = "MemoryInitializationStarted" + + //BootProgressTypesSecondaryProcessorInitializationStarted - The system has started initializing the remaining processors. + BootProgressTypesSecondaryProcessorInitializationStarted BootProgressTypes = "SecondaryProcessorInitializationStarted" + + //BootProgressTypesPCIResourceConfigStarted - The system has started initializing the PCI resources + BootProgressTypesPCIResourceConfigStarted BootProgressTypes = "PCIResourceConfigStarted" + + //BootProgressTypesSystemHardwareInitializationComplete - The system has completed initializing all hardware + BootProgressTypesSystemHardwareInitializationComplete BootProgressTypes = "SystemHardwareInitializationComplete" + + //BootProgressTypesSetupEntered - The system has entered the setup utility + BootProgressTypesSetupEntered BootProgressTypes = "SetupEntered" + + //BootProgressTypesOSBootStarted - The operating system has started booting + BootProgressTypesOSBootStarted BootProgressTypes = "OSBootStarted" + + //BootProgressTypesOSRunning - The operating system is running + BootProgressTypesOSRunning BootProgressTypes = "OSRunning" + + //BootProgressTypesOEM - A boot progress state in an OEM-defined format + BootProgressTypesOEM BootProgressTypes = "OEM" + + //CompositionUseCaseResourceBlockCapable - This computer system supports being registered as a resource block + //in order for it to participate in composition requests + //UseCases + CompositionUseCaseResourceBlockCapable CompositionUseCase = "ResourceBlockCapable" + + //CompositionUseCaseExpandableSystem - This computer system supports expandable system composition and is associated with a resource block + CompositionUseCaseExpandableSystem CompositionUseCase = "ExpandableSystem" + + //SystemTypePhysical -A computer system + SystemTypePhysical SystemType = "Physical" + + //SystemTypeVirtual - A virtual machine instance running on this syste + SystemTypeVirtual SystemType = "Virtual" + + //SystemTypeOS - An operating system instance + SystemTypeOS SystemType = "OS" + + //SystemTypePhysicallyPartitioned - A hardware-based partition of a computer system + SystemTypePhysicallyPartitioned SystemType = "PhysicallyPartitioned" + + //SystemTypeVirtuallyPartitioned - A virtual or software-based partition of a computer system + SystemTypeVirtuallyPartitioned SystemType = "VirtuallyPartitioned" + + //SystemTypeComposed - A computer system constructed by binding resource blocks together + SystemTypeComposed SystemType = "Composed" + + //SystemTypeDPU - A computer system that performs the functions of a data processing unit, such as a SmartNIC + SystemTypeDPU SystemType = "DPU" + + //InterfaceTypeTPM1_2 - Trusted Platform Module (TPM) 1.2. + InterfaceTypeTPM1_2 InterfaceType = "TPM1_2" + + //InterfaceTypeTPM2_0 - Trusted Platform Module (TPM) 2.0 + InterfaceTypeTPM2_0 InterfaceType = "TPM2_0" + + //InterfaceTypeTCM1_0 -Trusted Cryptography Module (TCM) 1.0 + InterfaceTypeTCM1_0 InterfaceType = "TCM1_0" + + //InterfaceTypeSelectionNone - The TrustedModule does not support switching the InterfaceType + InterfaceTypeSelectionNone InterfaceTypeSelection = "None" + + //InterfaceTypeSelectionFirmwareUpdate - The TrustedModule supports switching InterfaceType through a firmware update + InterfaceTypeSelectionFirmwareUpdate InterfaceTypeSelection = "FirmwareUpdate" + + //InterfaceTypeSelectionBiosSetting - The TrustedModule supports switching InterfaceType through platform software, + // such as a BIOS configuration attribute + InterfaceTypeSelectionBiosSetting InterfaceTypeSelection = "BiosSetting" + + //InterfaceTypeSelectionOemMethod - The TrustedModule supports switching InterfaceType through an OEM proprietary mechanism + InterfaceTypeSelectionOemMethod InterfaceTypeSelection = "OemMethod" + + //MemoryMirroringSystem - The system supports DIMM mirroring at the system level + MemoryMirroringSystem MemoryMirroring = "System" + + //MemoryMirroringDIMM -The system supports DIMM mirroring at the DIMM level. Individual DIMMs can be mirrored + MemoryMirroringDIMM MemoryMirroring = "DIMM" + + //MemoryMirroringHybrid - The system supports a hybrid mirroring at the system and DIMM levels. + MemoryMirroringHybrid MemoryMirroring = "Hybrid" + + //MemoryMirroringNone - The system does not support DIMM mirroring + MemoryMirroringNone MemoryMirroring = "None" + + //WatchdogWarningActionsNone - No action taken + WatchdogWarningActionsNone WatchdogWarningActions = "None" + + //WatchdogWarningActionsDiagnosticInterrupt -Raise a (typically non-maskable) Diagnostic Interrupt + WatchdogWarningActionsDiagnosticInterrupt WatchdogWarningActions = "DiagnosticInterrupt" + + //WatchdogWarningActionsSMI - Raise a Systems Management Interrupt (SMI) + WatchdogWarningActionsSMI WatchdogWarningActions = "SMI" + + //WatchdogWarningActionsMessagingInterrupt - Raise a legacy IPMI messaging interrupt + WatchdogWarningActionsMessagingInterrupt WatchdogWarningActions = "MessagingInterrupt" + + //WatchdogWarningActionsSCI - Raise an interrupt using the ACPI System Control Interrupt (SCI) + WatchdogWarningActionsSCI WatchdogWarningActions = "SCI" + + //WatchdogWarningActionsOEM - Perform an OEM-defined action + WatchdogWarningActionsOEM WatchdogWarningActions = "OEM" + + //WatchdogTimeoutActionsNone - No action taken + WatchdogTimeoutActionsNone WatchdogTimeoutActions = "None" + + //WatchdogTimeoutActionsResetSystem - Reset the system + WatchdogTimeoutActionsResetSystem WatchdogTimeoutActions = "ResetSystem" + + //WatchdogTimeoutActionsPowerCycle -Power cycle the system. + WatchdogTimeoutActionsPowerCycle WatchdogTimeoutActions = "PowerCycle" + + //WatchdogTimeoutActionsPowerDown - Power down the system + WatchdogTimeoutActionsPowerDown WatchdogTimeoutActions = "PowerDown" + + //WatchdogTimeoutActionsOEM - Perform an OEM-defined action + WatchdogTimeoutActionsOEM WatchdogTimeoutActions = "OEM" + + //PowerRestorePolicyTypesAlwaysOn - The system always powers on when power is applied + PowerRestorePolicyTypesAlwaysOn PowerRestorePolicyTypes = "AlwaysOn" + + //PowerRestorePolicyTypesAlwaysOff -The system always remains powered off when power is applied + PowerRestorePolicyTypesAlwaysOff PowerRestorePolicyTypes = "AlwaysOff" + + //PowerRestorePolicyTypesLastState - The system returns to its last on or off power state when power is applied + PowerRestorePolicyTypesLastState PowerRestorePolicyTypes = "LastState" + + //PowerModeMaximumPerformance - The system performs at the highest speeds possible + PowerModeMaximumPerformance PowerMode = "MaximumPerformance" + + //PowerModeBalancedPerformance -The system performs at the highest speeds while utilization is high + //and performs at reduced speeds when the utilization is low + PowerModeBalancedPerformance PowerMode = "BalancedPerformance" + + //PowerModePowerSaving -The system performs at reduced speeds to save power + PowerModePowerSaving PowerMode = "PowerSaving" + + //PowerModeStatic - The system power mode is static + PowerModeStatic PowerMode = "Static" + + //PowerModeOSControlled - The system power mode is controlled by the operating system + PowerModeOSControlled PowerMode = "OSControlled" + + //PowerModeOEM - The system power mode is OEM-defined + PowerModeOEM PowerMode = "OEM" + + //CachePolicyNone - The system does not cache KMIP data + CachePolicyNone CachePolicy = "None" + + //CachePolicyAfterFirstUse - The system caches KMIP data after first use + //for the duration specified by the CacheDuration property + CachePolicyAfterFirstUse CachePolicy = "AfterFirstUse" + + //HostingRoleApplicationServer - The system hosts functionality that supports general purpose applications + HostingRoleApplicationServer HostingRole = "ApplicationServer" + + //HostingRoleStorageServer - The system hosts functionality that supports the system acting as a storage server + HostingRoleStorageServer HostingRole = "StorageServer" + + //HostingRoleSwitch - The system hosts functionality that supports the system acting as a switch + HostingRoleSwitch HostingRole = "Switch" + + //HostingRoleAppliance - The system hosts functionality that supports the system acting as an appliance + HostingRoleAppliance HostingRole = "Appliance" + + //HostingRoleBareMetalServer - The system hosts functionality that supports the system acting as a bare metal server + HostingRoleBareMetalServer HostingRole = "BareMetalServer" + + //HostingRoleVirtualMachineServer -The system hosts functionality that supports the system acting as a virtual machine server + HostingRoleVirtualMachineServer HostingRole = "VirtualMachineServer" + + //HostingRoleContainerServer - The system hosts functionality that supports the system acting as a container server + HostingRoleContainerServer HostingRole = "ContainerServer" + + //IndicatorLEDUnknown - The state of the indicator LED cannot be determined + IndicatorLEDUnknown IndicatorLED = "Unknown" + + //IndicatorLEDLit - The indicator LED is lit + IndicatorLEDLit IndicatorLED = "Lit" + + //IndicatorLEDBlinking -The indicator LED is blinking + IndicatorLEDBlinking IndicatorLED = "Blinking" + + //IndicatorLEDOff - The indicator LED is off + IndicatorLEDOff IndicatorLED = "Off" +) + +// AddResourceBlock redfish structure +// This action adds a resource block to a system +// This action shall add a resource block to a system +type AddResourceBlock struct { + Target string `json:"Target,omitempty"` + Title string `json:"title"` +} + // ComputerSystem redfish structure +// The ComputerSystem schema represents a computer or system instance and the software-visible resources, +// or items within the data plane, such as memory, CPU, and other devices that it can access. +// +// Details of those resources or subsystems are also linked through this resource +// +// Reference :ComputerSystem.v1_20_0.json type ComputerSystem struct { - Ocontext string `json:"@odata.context,omitempty"` - Oid string `json:"@odata.id"` - Otype string `json:"@odata.type"` - Oetag string `json:"@odata.etag,omitempty"` - ID string `json:"Id"` - Description string `json:"Description,omitempty"` - Name string `json:"Name"` - Actions *OemActions `json:"Actions,omitempty"` - AssetTag string `json:"AssetTag,omitempty"` - BiosVersion string `json:"BiosVersion,omitempty"` - HostName string `json:"HostName,omitempty"` - IndicatorLED string `json:"IndicatorLED,omitempty"` - Manufacturer string `json:"Manufacturer,omitempty"` - Model string `json:"Model,omitempty"` - PartNumber string `json:"PartNumber,omitempty"` - PowerRestorePolicy string `json:"PowerRestorePolicy,omitempty"` - PowerState string `json:"PowerState,omitempty"` - SerialNumber string `json:"SerialNumber,omitempty"` - SKU string `json:"SKU,omitempty"` - SubModel string `json:"SubModel,omitempty"` - SystemType string `json:"SystemType,omitempty"` - UUID string `json:"UUID,omitempty"` - HostingRoles []string `json:"HostingRoles,omitempty"` - PCIeDevices []PCIeDevice `json:"PCIeDevices,omitempty"` - PCIeFunctions []PCIeFunction `json:"PCIeFunctions,omitempty"` - Bios Bios `json:"Bios,omitempty"` - Boot Boot `json:"Boot,omitempty"` - EthernetInterfaces EthernetInterfaces `json:"EthernetInterfaces,omitempty"` - HostedServices HostedServices `json:"HostedServices,omitempty"` - HostWatchdogTimer HostWatchdogTimer `json:"HostWatchdogTimer,omitempty"` - Links Links `json:"Links,omitempty"` - LogServices LogServices `json:"LogServices,omitempty"` - Memory Memory `json:"Memory,omitempty"` - MemoryDomains MemoryDomains `json:"MemoryDomains,omitempty"` - MemorySummary MemorySummary `json:"MemorySummary,omitempty"` - NetworkInterfaces NetworkInterfaces `json:"NetworkInterfaces,omitempty"` - Processors Processors `json:"Processors,omitempty"` - ProcessorSummary ProcessorSummary `json:"ProcessorSummary,omitempty"` - Redundancy []Redundancy `json:"Redundancy,omitempty"` - SecureBoot SecureBoot `json:"SecureBoot,omitempty"` - SimpleStorage SimpleStorage `json:"SimpleStorage,omitempty"` - Status Status `json:"Status,omitempty"` - Storage Storage `json:"Storage,omitempty"` - TrustedModules []TrustedModule `json:"TrustedModules,omitempty"` - Oem Oem `json:"Oem,omitempty"` - PCIeDevicesCount int `json:"PCIeDevices@odata.count,omitempty"` - IdlePowerSaver *IdlePowerSaver `json:"IdlePowerSaver,omitempty"` - KeyManagement KeyManagement `json:"KeyManagement,omitempty"` - BootProgress BootProgress `json:"BootProgress,omitempty"` - Certificates Certificates `json:"Certificates"` - FabricAdapters *Link `json:"FabricAdapters,omitempty"` - GraphicalConsole *GraphicalConsole `json:"GraphicalConsole,omitempty"` - GraphicsControllers *Link `json:"GraphicsControllers,omitempty"` - LastResetTime string `json:"LastResetTime,omitempty"` - LocationIndicatorActive bool `json:"LocationIndicatorActive,omitempty"` - Measurements []*Link `json:"Measurements,omitempty"` //Deprecated in version v1.17.0 - PCIeFunctionsCount int `json:"PCIeFunctions@odata.count,omitempty"` - PowerCycleDelaySeconds float32 `json:"PowerCycleDelaySeconds,omitempty"` - PowerMode string `json:"PowerMode,omitempty"` - PowerOffDelaySeconds float32 `json:"PowerOffDelaySeconds,omitempty"` - PowerOnDelaySeconds float32 `json:"PowerOnDelaySeconds,omitempty"` - RedundancyCount int `json:"Redundancy@odata.count,omitempty"` - SerialConsole SerialConsole `json:"SerialConsole,omitempty"` - USBControllers *Link `json:"USBControllers,omitempty"` - VirtualMedia *Link `json:"VirtualMedia,omitempty"` - VirtualMediaConfig *VirtualMediaConfig `json:"VirtualMediaConfig,omitempty"` - OffloadedNetworkDeviceFunctions []*Link `json:"OffloadedNetworkDeviceFunctions,omitempty"` - LastBootTimeSeconds int `json:"LastBootTimeSeconds,omitempty"` - ManufacturingMode bool `json:"ManufacturingMode,omitempty"` - Composition *Composition `json:"Composition,omitempty"` + Ocontext string `json:"@odata.context,omitempty"` + Oid string `json:"@odata.id"` + Otype string `json:"@odata.type"` + Oetag string `json:"@odata.etag,omitempty"` + ID string `json:"ID"` + Description string `json:"Description,omitempty"` + Name string `json:"Name"` + Actions *ComputerSystemActions `json:"Actions,omitempty"` + AssetTag string `json:"AssetTag,omitempty"` + BiosVersion string `json:"BiosVersion,omitempty"` + HostName string `json:"HostName,omitempty"` + IndicatorLED string `json:"IndicatorLED,omitempty"` //enum + Manufacturer string `json:"Manufacturer,omitempty"` + Model string `json:"Model,omitempty"` + PartNumber string `json:"PartNumber,omitempty"` + PowerRestorePolicy string `json:"PowerRestorePolicy,omitempty"` //enum + PowerState string `json:"PowerState,omitempty"` + SerialNumber string `json:"SerialNumber,omitempty"` + SKU string `json:"SKU,omitempty"` + SubModel string `json:"SubModel,omitempty"` + SystemType string `json:"SystemType,omitempty"` //enum + UUID string `json:"UUID,omitempty"` + HostingRoles []string `json:"HostingRoles,omitempty"` //enum + PCIeDevices []PCIeDevice `json:"PCIeDevices,omitempty"` + PCIeFunctions []PCIeFunction `json:"PCIeFunctions,omitempty"` + Bios Bios `json:"Bios,omitempty"` + Boot Boot `json:"Boot,omitempty"` + EthernetInterfaces EthernetInterfaces `json:"EthernetInterfaces,omitempty"` + HostedServices HostedServices `json:"HostedServices,omitempty"` + HostWatchdogTimer HostWatchdogTimer `json:"HostWatchdogTimer,omitempty"` + Links Links `json:"Links,omitempty"` + LogServices LogServices `json:"LogServices,omitempty"` + Memory Memory `json:"Memory,omitempty"` + MemoryDomains MemoryDomains `json:"MemoryDomains,omitempty"` + MemorySummary MemorySummary `json:"MemorySummary,omitempty"` + NetworkInterfaces NetworkInterfaces `json:"NetworkInterfaces,omitempty"` + Processors Processors `json:"Processors,omitempty"` + ProcessorSummary ProcessorSummary `json:"ProcessorSummary,omitempty"` + Redundancy []Redundancy `json:"Redundancy,omitempty"` + SecureBoot SecureBoot `json:"SecureBoot,omitempty"` + SimpleStorage SimpleStorage `json:"SimpleStorage,omitempty"` + Status Status `json:"Status,omitempty"` + Storage Storage `json:"Storage,omitempty"` + TrustedModules []TrustedModule `json:"TrustedModules,omitempty"` + Oem Oem `json:"Oem,omitempty"` + PCIeDevicesCount int `json:"PCIeDevices@odata.count,omitempty"` + IdlePowerSaver *IdlePowerSaver `json:"IdlePowerSaver,omitempty"` + KeyManagement KeyManagement `json:"KeyManagement,omitempty"` + BootProgress BootProgress `json:"BootProgress,omitempty"` + Certificates Certificates `json:"Certificates"` + FabricAdapters *Link `json:"FabricAdapters,omitempty"` + GraphicalConsole *GraphicalConsole `json:"GraphicalConsole,omitempty"` + GraphicsControllers *Link `json:"GraphicsControllers,omitempty"` + LastResetTime string `json:"LastResetTime,omitempty"` + LocationIndicatorActive bool `json:"LocationIndicatorActive,omitempty"` + Measurements []*Link `json:"Measurements,omitempty"` //Deprecated in version v1.17.0 + PCIeFunctionsCount int `json:"PCIeFunctions@odata.count,omitempty"` + PowerCycleDelaySeconds float32 `json:"PowerCycleDelaySeconds,omitempty"` + PowerMode string `json:"PowerMode,omitempty"` //enum + PowerOffDelaySeconds float32 `json:"PowerOffDelaySeconds,omitempty"` + PowerOnDelaySeconds float32 `json:"PowerOnDelaySeconds,omitempty"` + RedundancyCount int `json:"Redundancy@odata.count,omitempty"` + SerialConsole SerialConsole `json:"SerialConsole,omitempty"` + USBControllers *Link `json:"USBControllers,omitempty"` + VirtualMedia *Link `json:"VirtualMedia,omitempty"` + VirtualMediaConfig *VirtualMediaConfig `json:"VirtualMediaConfig,omitempty"` + OffloadedNetworkDeviceFunctions []*Link `json:"OffloadedNetworkDeviceFunctions,omitempty"` + LastBootTimeSeconds int `json:"LastBootTimeSeconds,omitempty"` + ManufacturingMode bool `json:"ManufacturingMode,omitempty"` + Composition *Composition `json:"Composition,omitempty"` +} + +// ComputerSystemActions redfish structure +type ComputerSystemActions struct { + AddResourceBlock *AddResourceBlock `json:"AddResourceBlock,omitempty"` + RemoveResourceBlock *RemoveResourceBlock `json:"RemoveResourceBlock,omitempty"` + Reset *Reset `json:"Reset,omitempty"` + SetDefaultBootOrder *SetDefaultBootOrder `json:"SetDefaultBootOrder,omitempty"` + Oem *OemActions `json:"Oem,omitempty"` +} + +// RemoveResourceBlock redfish structure +// This action removes a resource block from a system +// This action shall remove a resource block from a system +type RemoveResourceBlock struct { + Target string `json:"Target,omitempty"` + Title string `json:"Title,omitempty"` +} + +// Reset redfish Structure +// This action resets the system. +// This action shall reset the system represented by the resource. +// +// For systems that implement ACPI Power Button functionality, the PushPowerButton value +// +// shall perform or emulate an ACPI Power Button Push, and the ForceOff value shall perform +// an ACPI Power Button Override, commonly known as a four-second hold of the power button +type Reset struct { + Target string `json:"Target,omitempty"` + Title string `json:"Title,omitempty"` +} + +// SetDefaultBootOrder redfish Structure +// This action sets the BootOrder to the default settings +// This action shall set the BootOrder array to the default settings +type SetDefaultBootOrder struct { + Target string `json:"Target,omitempty"` + Title string `json:"Title,omitempty"` +} + +// LogEntry redfish structure +type LogEntry struct { + Oid string `json:"@odata.id"` + Ocontext string `json:"@odata.context,omitempty"` + Oetag string `json:"@odata.etag,omitempty"` + Otype string `json:"@odata.type"` + Description string `json:"description,omitempty"` + Actions *Actions `json:"Actions,omitempty"` + ID string `json:"ID"` + AdditionalDataSizeBytes int `json:"AdditionalDataSizeBytes,omitempty"` + AdditionalDataURI string `json:"AdditionalDataURI,omitempty"` + Created string `json:"Created,omitempty"` + MessageArgs string `json:"MessageArgs,omitempty"` + MessageID string `json:"MessageID,omitempty"` + Name string `json:"Name"` + OEMDiagnosticDataType string `json:"OEMDiagnosticDataType,omitempty"` + Oem *Oem `json:"Oem,omitempty"` + Resolved bool `json:"Resolved,omitempty"` + Resolution string `json:"Resolution,omitempty"` + Persistency bool `json:"Persistency,omitempty"` + OverflowErrorCount int `json:"OverflowErrorCount,omitempty"` + Originator string `json:"Originator,omitempty"` + OemSensorType string `json:"OemSensorType,omitempty"` + OemRecordFormat string `json:"OemRecordFormat,omitempty"` } // Composition ... +// Information about the composition capabilities and state of a computer system. +// This type shall contain information about the composition capabilities and state of a computer system type Composition struct { - UseCases []string `json:"UseCases,omitempty"` + UseCases []string `json:"UseCases,omitempty"` //enum } // VirtualMediaConfig redfish structure +// The information about virtual media service for this system +// This type shall describe a virtual media service service for a computer system type VirtualMediaConfig struct { Port int `json:"Port,omitempty"` ServiceEnabled bool `json:"ServiceEnabled,omitempty"` } // SerialConsole redfish structure +// The information about the serial console services that this system provides. +// This type shall describe the serial console services for a computer system type SerialConsole struct { IPMI interface{} `json:"IPMI,omitempty"` MaxConcurrentSessions int `json:"MaxConcurrentSessions,omitempty"` @@ -113,14 +549,19 @@ type SerialConsole struct { } // BootProgress redfish structure +// This object describes the last boot progress state +// This object shall contain the last boot progress state and time type BootProgress struct { - LastState string `json:"LastState,omitempty"` - LastStateTime string `json:"LastStateTime,omitempty"` - Oem *Oem `json:"Oem,omitempty"` - OemLastState string `json:"OemLastState,omitempty"` + LastBootTimeSeconds float32 `json:"LastBootTimeSeconds,omitempty"` + LastState string `json:"LastState,omitempty"` //enum + LastStateTime string `json:"LastStateTime,omitempty"` + Oem *Oem `json:"Oem,omitempty"` + OemLastState string `json:"OemLastState,omitempty"` } // KeyManagement redfish structure +// The key management settings of a computer system +// This object shall contain the key management settings of a computer system type KeyManagement struct { KMIPCertificates *KMIPCertificates `json:"KMIPCertificates,omitempty"` KMIPServers []*KMIPServers `json:"KMIPServers,omitempty"` @@ -132,14 +573,20 @@ type KMIPCertificates struct { } // KMIPServers redfish structure +// The KMIP server settings for a computer system +// This object shall contain the KMIP server settings for a computer system type KMIPServers struct { - Address string `json:"Address,omitempty"` - Password string `json:"Password,omitempty"` - Port int `json:"Port,omitempty"` - Username string `json:"Username,omitempty"` + Address string `json:"Address,omitempty"` + CacheDuration string `json:"CacheDuration,omitempty"` + CachePolicy string `json:"CachePolicy,omitempty"` //enum + Password string `json:"Password,omitempty"` + Port int `json:"Port,omitempty"` + Username string `json:"Username,omitempty"` } // IdlePowerSaver redfish structure +// The idle power saver settings of a computer system +// This object shall contain the idle power saver settings of a computer system type IdlePowerSaver struct { Enabled bool `json:"Enabled,omitempty"` EnterDwellTimeSeconds int `json:"EnterDwellTimeSeconds,omitempty"` @@ -155,7 +602,7 @@ type Bios struct { Oetag string `json:"@odata.etag,omitempty"` Otype string `json:"@odata.type"` Description string `json:"description,omitempty"` - ID string `json:"Id"` + ID string `json:"ID"` Name string `json:"Name"` Oem Oem `json:"Oem,omitempty"` /*The reference to the Attribute Registry that lists the metadata describing the @@ -168,23 +615,25 @@ type Bios struct { } // Boot redfish structure +// The boot information for this resource. +// This type shall contain properties that describe boot information for a system type Boot struct { - AliasBootOrder []string `json:"AliasBootOrder,omitempty"` + AliasBootOrder []string `json:"AliasBootOrder,omitempty"` //enum BootNext string `json:"BootNext,omitempty"` - BootOptions BootOptions `json:"BootOptions,omitempty"` + BootOptions *BootOptions `json:"BootOptions,omitempty"` BootOrder []string `json:"BootOrder,omitempty"` - BootOrderPropertySelection string `json:"BootOrderPropertySelection,omitempty"` - BootSourceOverrideEnabled string `json:"BootSourceOverrideEnabled,omitempty"` - BootSourceOverrideMode string `json:"BootSourceOverrideMode,omitempty"` - BootSourceOverrideTarget string `json:"BootSourceOverrideTarget,omitempty"` + BootOrderPropertySelection string `json:"BootOrderPropertySelection,omitempty"` //enum + BootSourceOverrideEnabled string `json:"BootSourceOverrideEnabled,omitempty"` //enum + BootSourceOverrideMode string `json:"BootSourceOverrideMode,omitempty"` //enum + BootSourceOverrideTarget string `json:"BootSourceOverrideTarget,omitempty"` //enum Certificates Certificates `json:"Certificates,omitempty"` UefiTargetBootSourceOverride string `json:"UefiTargetBootSourceOverride,omitempty"` AutomaticRetryAttempts int `json:"AutomaticRetryAttempts,omitempty"` AutomaticRetryConfig string `json:"AutomaticRetryConfig,omitempty"` HTTPBootURI string `json:"HttpBootUri,omitempty"` RemainingAutomaticRetryAttempts int `json:"RemainingAutomaticRetryAttempts,omitempty"` - StopBootOnFault string `json:"StopBootOnFault,omitempty"` - TrustedModuleRequiredToBoot string `json:"TrustedModuleRequiredToBoot,omitempty"` + StopBootOnFault string `json:"StopBootOnFault,omitempty"` //enum + TrustedModuleRequiredToBoot string `json:"TrustedModuleRequiredToBoot,omitempty"` //enum } // EthernetInterfaces get @@ -201,7 +650,7 @@ type EthernetInterfaces struct { Oetag string `json:"@odata.etag,omitempty"` Otype string `json:"@odata.type"` Description string `json:"description,omitempty"` - ID string `json:"Id"` + ID string `json:"ID"` Name string `json:"Name"` Oem Oem `json:"Oem,omitempty"` AutoNeg bool `json:"AutoNeg,omitempty"` @@ -307,18 +756,22 @@ type VLANs struct { } // HostedServices redfish structure +// The services that might be running or installed on the system +// This type shall describe services that a computer system supports type HostedServices struct { Oem Oem `json:"Oem"` StorageServices StorageServices `json:"StorageServices"` } // HostWatchdogTimer redfish structure +// This type describes the host watchdog timer functionality for this system +// This type shall contain properties that describe the host watchdog timer functionality for this ComputerSystem type HostWatchdogTimer struct { FunctionEnabled bool `json:"FunctionEnabled"` Oem Oem `json:"Oem"` Status Status `json:"Status"` - TimeoutAction string `json:"TimeoutAction"` - WarningAction string `json:"WarningAction"` + TimeoutAction string `json:"TimeoutAction"` //enum + WarningAction string `json:"WarningAction"` //enum } // Memory redfish structure @@ -328,7 +781,7 @@ type Memory struct { Oetag string `json:"@odata.etag,omitempty"` Otype string `json:"@odata.type"` Description string `json:"description,omitempty"` - ID string `json:"Id"` + ID string `json:"ID"` Name string `json:"Name"` Oem Oem `json:"Oem,omitempty"` AllocationAlignmentMiB int `json:"AllocationAlignmentMiB,omitempty"` @@ -432,7 +885,7 @@ type Region struct { OffsetMiB int `json:"OffsetMiB"` PassphraseEnabled bool `json:"PassphraseEnabled"` PassphraseState bool `json:"PassphraseState"` - RegionID string `json:"RegionId"` + RegionID string `json:"RegionID"` SizeMiB int `json:"SizeMiB"` } @@ -453,7 +906,7 @@ type MemoryDomains struct { Oetag string `json:"@odata.etag,omitempty"` Otype string `json:"@odata.type,omitempty"` Description string `json:"description,omitempty"` - ID string `json:"Id,omitempty"` + ID string `json:"ID,omitempty"` Name string `json:"Name,omitempty"` Oem Oem `json:"Oem,omitempty"` AllowsBlockProvisioning bool `json:"AllowsBlockProvisioning,omitempty"` @@ -478,11 +931,25 @@ type MemoryChunks struct { } // MemorySummary in place object +// The memory of the system in general detail +// This type shall contain properties that describe the central memory for a system type MemorySummary struct { - MemoryMirroring string `json:"MemoryMirroring"` - TotalSystemMemoryGiB int `json:"TotalSystemMemoryGiB"` - TotalSystemPersistentMemoryGiB int `json:"TotalSystemPersistentMemoryGiB"` - Status Status `json:"Status"` //deprecated + MemoryMirroring string `json:"MemoryMirroring"` //enum + Metrics Metrics `json:"Metrics,omitempty"` + TotalSystemMemoryGiB int `json:"TotalSystemMemoryGiB"` + TotalSystemPersistentMemoryGiB int `json:"TotalSystemPersistentMemoryGiB"` + Status Status `json:"Status"` //deprecated +} + +// SerialConsoleProtocol redfish structure +// The information about a serial console service that this system provides +// This type shall describe a serial console service for a computer system +type SerialConsoleProtocol struct { + ConsoleEntryCommand string `json:"ConsoleEntryCommand,omitempty"` + HotKeySequenceDisplay string `json:"HotKeySequenceDisplay,omitempty"` + Port int `json:"Port,omitempty"` + ServiceEnabled bool `json:"ServiceEnabled,omitempty"` + SharedWithManagerCLI bool `json:"SharedWithManagerCLI,omitempty"` } //NetworkInterfaces get @@ -501,7 +968,7 @@ type NetworkInterfaces struct { Oetag string `json:"@odata.etag,omitempty"` Otype string `json:"@odata.type,omitempty"` Description string `json:"description,omitempty"` - ID string `json:"Id,omitempty"` + ID string `json:"ID,omitempty"` Name string `json:"Name,omitempty"` Oem Oem `json:"Oem,omitempty"` Links Links `json:"Links,omitempty"` @@ -536,7 +1003,7 @@ type PCIeDevice struct { Oetag string `json:"@odata.etag,omitempty"` Otype string `json:"@odata.type"` Description string `json:"description,omitempty"` - ID string `json:"Id"` + ID string `json:"ID"` Name string `json:"Name"` Oem Oem `json:"Oem,omitempty"` Assembly *Assembly `json:"Assembly,omitempty"` @@ -603,20 +1070,20 @@ type PCIeFunction struct { Oetag string `json:"@odata.etag,omitempty"` Otype string `json:"@odata.type"` Description string `json:"description,omitempty"` - ID string `json:"Id"` + ID string `json:"ID"` Name string `json:"Name"` Oem Oem `json:"Oem,omitempty"` ClassCode string `json:"ClassCode,omitempty"` DeviceClass string `json:"DeviceClass,omitempty"` //enum - DeviceID string `json:"DeviceId,omitempty"` - FunctionID int `json:"FunctionId,omitempty"` + DeviceID string `json:"DeviceID,omitempty"` + FunctionID int `json:"FunctionID,omitempty"` FunctionType string `json:"FunctionType,omitempty"` //enum Links *Links `json:"Links,omitempty"` - RevisionID string `json:"RevisionId,omitempty"` + RevisionID string `json:"RevisionID,omitempty"` Status *Status `json:"Status,omitempty"` - SubsystemID string `json:"SubsystemId,omitempty"` - SubsystemVendorID string `json:"SubsystemVendorId,omitempty"` - VendorID string `json:"VendorId,omitempty"` + SubsystemID string `json:"SubsystemID,omitempty"` + SubsystemVendorID string `json:"SubsystemVendorID,omitempty"` + VendorID string `json:"VendorID,omitempty"` Actions *OemActions `json:"Actions,omitempty"` Enabled bool `json:"Enabled,omitempty"` } @@ -635,7 +1102,7 @@ type Processors struct { Oetag string `json:"@odata.etag,omitempty"` Otype string `json:"@odata.type"` Description string `json:"description,omitempty"` - ID string `json:"Id"` + ID string `json:"ID"` Name string `json:"Name"` Oem Oem `json:"Oem,omitempty"` AccelerationFunctions AccelerationFunctions `json:"AccelerationFunctions,omitempty"` @@ -650,7 +1117,7 @@ type Processors struct { Metrics Metrics `json:"Metrics,omitempty"` Model string `json:"Model,omitempty"` ProcessorArchitecture string `json:"ProcessorArchitecture,omitempty"` //enum - ProcessorID ProcessorID `json:"ProcessorId,omitempty"` + ProcessorID ProcessorID `json:"ProcessorID,omitempty"` ProcessorMemory []ProcessorMemory `json:"ProcessorMemory,omitempty"` ProcessorType string `json:"ProcessorType,omitempty"` //enum Socket string `json:"Socket,omitempty"` @@ -711,7 +1178,7 @@ type AccelerationFunctions struct { // FPGA in place object type FPGA struct { ExternalInterfaces []HostInterface `json:"ExternalInterfaces"` - FirmwareID string `json:"FirmwareId"` + FirmwareID string `json:"FirmwareID"` FirmwareManufacturer string `json:"FirmwareManufacturer"` FirmwareVersion string `json:"FirmwareVersion"` FpgaType string `json:"FpgaType"` //enum @@ -741,7 +1208,7 @@ type Ethernet struct { type ReconfigurationSlot struct { AccelerationFunction AccelerationFunction `json:"AccelerationFunction"` ProgrammableFromHost bool `json:"ProgrammableFromHost"` - SlotID string `json:"SlotId"` + SlotID string `json:"SlotID"` UUID string `json:"UUID"` } @@ -775,12 +1242,20 @@ type SubProcessors struct { } // ProcessorSummary redfish structure +// The central processors of the system in general detail +// This type shall contain properties that describe the central processors for a system. +// +// Processors described by this type shall be limited to the processors that execute system code, +// +// and shall not include processors used for offload functionality type ProcessorSummary struct { + CoreCount int `json:"CoreCount,omitempty"` Count int `json:"Count"` LogicalProcessorCount int `json:"LogicalProcessorCount"` Model string `json:"Model"` Metrics Metrics `json:"Metrics"` Status Status `json:"Status"` //deprecated + ThreadingEnabled bool `json:"ThreadingEnabled,omitempty"` } // SecureBoot redfish structure @@ -790,7 +1265,7 @@ type SecureBoot struct { Oetag string `json:"@odata.etag,omitempty"` Otype string `json:"@odata.type"` Description string `json:"description,omitempty"` - ID string `json:"Id"` + ID string `json:"ID"` Name string `json:"Name"` Oem Oem `json:"Oem,omitempty"` SecureBootCurrentBoot string `json:"SecureBootCurrentBoot,omitempty"` @@ -824,9 +1299,9 @@ type SecureBootDatabase struct { Otype string `json:"@odata.type"` Actions string `json:"Actions,omitempty"` Certificates string `json:"Certificates,omitempty"` - DatabaseId string `json:"DatabaseId,omitempty"` + DatabaseID string `json:"DatabaseID,omitempty"` Description string `json:"Description,omitempty"` - Id string `json:"Id"` + ID string `json:"ID"` Name string `json:"Name"` Oem string `json:"Oem,omitempty"` Signatures string `json:"Signatures,omitempty"` @@ -839,7 +1314,7 @@ type SimpleStorage struct { Oetag string `json:"@odata.etag,omitempty"` Otype string `json:"@odata.type"` Description string `json:"description,omitempty"` - ID string `json:"Id"` + ID string `json:"ID"` Name string `json:"Name"` Oem Oem `json:"Oem,omitempty"` Devices []Device `json:"Devices,omitempty"` @@ -860,33 +1335,103 @@ type Device struct { } // TrustedModule redfish structure +// The Trusted Module installed in the system +// This type shall describe a Trusted Module for a system type TrustedModule struct { FirmwareVersion string `json:"FirmwareVersion"` FirmwareVersion2 string `json:"FirmwareVersion2"` - InterfaceType string `json:"InterfaceType"` - InterfaceTypeSelection string `json:"InterfaceTypeSelection"` + InterfaceType string `json:"InterfaceType"` //enum + InterfaceTypeSelection string `json:"InterfaceTypeSelection"` //enum Oem Oem `json:"Oem"` Status Status `json:"Status"` } // BootOptions redfish structure type BootOptions struct { - Oid string `json:"@odata.id"` -} - -// Certificates redfish structure -type Certificates struct { - Oid string `json:"@odata.id"` + ODataContext string `json:"@odata.context,omitempty"` + ODataEtag string `json:"@odata.etag,omitempty"` + ODataID string `json:"@odata.id"` + ODataType string `json:"@odata.type"` + Description string `json:"Description,omitempty"` + Members []string `json:"Members"` + MembersODataCount int `json:"Members@odata.count"` + MembersODataNextLink string `json:"Members@odata.nextLink,omitempty"` + Name string `json:"Name"` + Oem *Oem `json:"Oem,omitempty"` } // StorageServices redfish structure type StorageServices struct { - Oid string `json:"@odata.id"` + Oid string `json:"@odata.id"` + Ocontext string `json:"@odata.context,omitempty"` + Oetag string `json:"@odata.etag,omitempty"` + Otype string `json:"@odata.type"` + Description string `json:"Description,omitempty"` + Members string `json:"Members"` + MembersCount int `json:"Members@odata.count"` + MembersODataNextLink string `json:"Members@odata.nextLink,omitempty"` + Name string `json:"Name"` + Oem *Oem `json:"Oem,omitempty"` } // Metrics redfish structure type Metrics struct { - Oid string `json:"@odata.id"` + Oid string `json:"@odata.id"` + Ocontext string `json:"@odata.context,omitempty"` + Oetag string `json:"@odata.etag,omitempty"` + Otype string `json:"@odata.type"` + Actions Actions `json:"Actions,omitempty"` + AverageFrequencyMHz float32 `json:"AverageFrequencyMHz,omitempty"` + BandwidthPercent float32 `json:"BandwidthPercent,omitempty"` + CacheMetrics *CacheMetrics `json:"CacheMetrics,omitempty"` + CacheMetricsTotal *CacheMetricsTotal `json:"CacheMetricsTotal,omitempty"` + ConsumedPowerWatt float32 `json:"ConsumedPowerWatt,omitempty"` + CorrectableCoreErrorCount int `json:"CorrectableCoreErrorCount,omitempty"` + CorrectableOtherErrorCount int `json:"CorrectableOtherErrorCount,omitempty"` + Description string `json:"Description,omitempty"` + FrequencyRatio float32 `json:"FrequencyRatio,omitempty"` + KernelPercent float32 `json:"KernelPercent,omitempty"` + LocalMemoryBandwidthBytes int `json:"LocalMemoryBandwidthBytes,omitempty"` + ID string `json:"ID"` + Name string `json:"Name"` + Oem Oem `json:"Oem,omitempty"` + OperatingSpeedMHz int `json:"OperatingSpeedMHz,omitempty"` + PowerLimitThrottleDuration string `json:"PowerLimitThrottleDuration,omitempty"` + RemoteMemoryBandwidthBytes int `json:"RemoteMemoryBandwidthBytes,omitempty"` + TemperatureCelsius float32 `json:"TemperatureCelsius,omitempty"` + ThermalLimitThrottleDuration string `json:"ThermalLimitThrottleDuration,omitempty"` + ThrottlingCelsius float32 `json:"ThrottlingCelsius,omitempty"` + UncorrectableCoreErrorCount int `json:"UncorrectableCoreErrorCount,omitempty"` + UncorrectableOtherErrorCount int `json:"UncorrectableOtherErrorCount,omitempty"` + UserPercent float32 `json:"UserPercent,omitempty"` +} + +// CacheMetrics redfish structure +type CacheMetrics struct { + CacheMiss float32 `json:"CacheMiss,omitempty"` + CacheMissesPerInstruction float32 `json:"CacheMissesPerInstruction,omitempty"` + HitRatio float32 `json:"HitRatio,omitempty"` + Level string `json:"Level,omitempty"` + OccupancyBytes int `json:"OccupancyBytes,omitempty"` + OccupancyPercent float32 `json:"OccupancyPercent,omitempty"` +} + +// CacheMetricsTotal redfish structure +type CacheMetricsTotal struct { + CurrentPeriod CurrentPeriod `json:"CurrentPeriod,omitempty"` + LifeTime LifeTime `json:"LifeTime,omitempty"` +} + +// CurrentPeriod redfish structure +type CurrentPeriod struct { + CorrectableECCErrorCount int `json:"CorrectableECCErrorCount,omitempty"` + UncorrectableECCErrorCount int `json:"UncorrectableECCErrorCount,omitempty"` +} + +// LifeTime redfish structure +type LifeTime struct { + CorrectableECCErrorCount int `json:"CorrectableECCErrorCount,omitempty"` + UncorrectableECCErrorCount int `json:"UncorrectableECCErrorCount,omitempty"` } // SaveInMemory will create the ComputerSystem data in in-memory DB, with key as UUID diff --git a/lib-dmtf/model/accountService.go b/lib-dmtf/model/accountService.go index 9a47e4bdb..784ced1ff 100644 --- a/lib-dmtf/model/accountService.go +++ b/lib-dmtf/model/accountService.go @@ -14,24 +14,441 @@ package model +// RestrictedPrivileges - The set of restricted Redfish privileges +type RestrictedPrivileges string + +// SupportedAccountTypes - The account types supported by the service +type SupportedAccountTypes string + +// LocalAccountAuth - An indication of how the service uses the accounts collection within +// this account service as part of authentication +type LocalAccountAuth string + +// AuthenticationTypes - The type of authentication used to connect to the external account provider +type AuthenticationTypes string + +// CertificateMappingAttribute - The client certificate attribute to map to a user +type CertificateMappingAttribute string + +// AccountProviderType - The type of external account provider to which this service connects +type AccountProviderType string + +// Mode - +type Mode string + +// PrivilegeType - The set of restricted Redfish privileges +type PrivilegeType string + +// PasswordExchangeProtocols - Indicates the allowed TACACS+ password exchange protocols. +type PasswordExchangeProtocols string + +const ( + // RestrictedPrivilegesLogin - PrivilegeType + RestrictedPrivilegesLogin RestrictedPrivileges = "Login" + + // RestrictedPrivilegesConfigureManager - PrivilegeType + RestrictedPrivilegesConfigureManager RestrictedPrivileges = "ConfigureManager" + + // RestrictedPrivilegesConfigureUsers - PrivilegeType + RestrictedPrivilegesConfigureUsers RestrictedPrivileges = "ConfigureUsers" + + //RestrictedPrivilegesConfigureSelf - PrivilegeType + RestrictedPrivilegesConfigureSelf RestrictedPrivileges = "ConfigureSelf" + + //RestrictedPrivilegesConfigureComponents - PrivilegeType + RestrictedPrivilegesConfigureComponents RestrictedPrivileges = "ConfigureComponents" + + //RestrictedPrivilegesNoAuth - PrivilegeType + RestrictedPrivilegesNoAuth RestrictedPrivileges = "NoAuth" + + //RestrictedPrivilegesConfigureCompositionInfrastructure - PrivilegeType + RestrictedPrivilegesConfigureCompositionInfrastructure RestrictedPrivileges = "ConfigureCompositionInfrastructure" + + //RestrictedPrivilegesAdministrateSystems - PrivilegeType + RestrictedPrivilegesAdministrateSystems RestrictedPrivileges = "AdministrateSystems" + + //RestrictedPrivilegesOperateSystems - PrivilegeType + RestrictedPrivilegesOperateSystems RestrictedPrivileges = "OperateSystems" + + //RestrictedPrivilegesAdministrateStorage - PrivilegeType + RestrictedPrivilegesAdministrateStorage RestrictedPrivileges = "AdministrateStorage" + + //RestrictedPrivilegesOperateStorageBackup - PrivilegeType + RestrictedPrivilegesOperateStorageBackup RestrictedPrivileges = "OperateStorageBackup" + + //SupportedAccountTypesRedfish - AccountTypes + SupportedAccountTypesRedfish SupportedAccountTypes = "Redfish" + + //SupportedAccountTypesSNMP - AccountTypes + SupportedAccountTypesSNMP SupportedAccountTypes = "SNMP" + + //SupportedAccountTypesOEM - AccountTypes + SupportedAccountTypesOEM SupportedAccountTypes = "OEM" + + //SupportedAccountTypeHostConsole - AccountTypes + SupportedAccountTypeHostConsole SupportedAccountTypes = "HostConsole" + + //SupportedAccountTypesManagerConsole - AccountTypes + SupportedAccountTypesManagerConsole SupportedAccountTypes = "ManagerConsole" + + //SupportedAccountTypesIPMI - AccountTypes + SupportedAccountTypesIPMI SupportedAccountTypes = "IPMI" + + //SupportedAccountTypesKVMIP - AccountTypes + SupportedAccountTypesKVMIP SupportedAccountTypes = "KVMIP" + + //SupportedAccountTypesVirtualMedia - AccountTypes + SupportedAccountTypesVirtualMedia SupportedAccountTypes = "VirtualMedia" + + //SupportedAccountTypesWebUI - AccountTypes + SupportedAccountTypesWebUI SupportedAccountTypes = "WebUI" + + //LocalAccountAuthEnabled - The service never authenticates users based on the account service-defined accounts collection + LocalAccountAuthEnabled LocalAccountAuth = "Enabled" + + //LocalAccountAuthDisabled -The service authenticates users based on the account service-defined accounts collection. + LocalAccountAuthDisabled LocalAccountAuth = "Disabled" + + //LocalAccountAuthFallback - The service authenticates users based on the account service-defined accounts collection + //only if any external account providers are currently unreachable + LocalAccountAuthFallback LocalAccountAuth = "Fallback" + + //LocalAccountAuthLocalFirst - The service first authenticates users based on the account service-defined accounts collection. + // If authentication fails, the service authenticates by using external account providers + LocalAccountAuthLocalFirst LocalAccountAuth = "LocalFirst" + + //AuthenticationTypesToken - An opaque authentication token + AuthenticationTypesToken AuthenticationTypes = "Token" + + //AuthenticationTypesKerberosKeytab - A Kerberos keytab + AuthenticationTypesKerberosKeytab AuthenticationTypes = "KerberosKeytab" + + //AuthenticationTypesUsernameAndPassword - A user name and password combination + AuthenticationTypesUsernameAndPassword AuthenticationTypes = "UsernameAndPassword" + + //AuthenticationTypesOEM - An OEM-specific authentication mechanism. + AuthenticationTypesOEM AuthenticationTypes = "OEM" + + //CertificateMappingAttributeWhole -Match the whole certificate + CertificateMappingAttributeWhole CertificateMappingAttribute = "Whole" + + //CertificateMappingAttributeCommonName - Match the Common Name (CN) field in the provided certificate to the username + CertificateMappingAttributeCommonName CertificateMappingAttribute = "CommonName" + + //CertificateMappingAttributeUserPrincipalName - Match the User Principal Name (UPN) field in the provided certificate to the username + CertificateMappingAttributeUserPrincipalName CertificateMappingAttribute = "UserPrincipalName" + + //AccountProviderTypeRedfishService - An external Redfish service. + AccountProviderTypeRedfishService AccountProviderType = "RedfishService" + + //AccountProviderTypeActiveDirectoryService - An external Active Directory service + AccountProviderTypeActiveDirectoryService AccountProviderType = "ActiveDirectoryService" + + //AccountProviderTypeLDAPService -A generic external LDAP service + AccountProviderTypeLDAPService AccountProviderType = "LDAPService" + + //AccountProviderTypeOEM - An OEM-specific external authentication or directory service + AccountProviderTypeOEM AccountProviderType = "OEM" + + //AccountProviderTypeTACACSplus - "An external TACACS+ service + AccountProviderTypeTACACSplus AccountProviderType = "TACACSplus" + + //AccountProviderTypeOAuth2 -An external OAuth 2.0 service + AccountProviderTypeOAuth2 AccountProviderType = "OAuth2" + + //ModeDiscovery - OAuth 2.0 service information for token validation is downloaded by the service + ModeDiscovery Mode = "Discovery" + + //ModeOffline - OAuth 2.0 service information for token validation is configured by a client + ModeOffline Mode = "Offline" + + //PasswordExchangeProtocolsASCII - The ASCII Login method + PasswordExchangeProtocolsASCII PasswordExchangeProtocols = "ASCII" + + //PasswordExchangeProtocolsPAP - The PAP Login method + PasswordExchangeProtocolsPAP PasswordExchangeProtocols = "PAP" + + //PasswordExchangeProtocolsCHAP - The CHAP Login method + PasswordExchangeProtocolsCHAP PasswordExchangeProtocols = "CHAP" + + //PasswordExchangeProtocolsMSCHAPv1 - The MS-CHAP v1 Login method + PasswordExchangeProtocolsMSCHAPv1 PasswordExchangeProtocols = "MSCHAPv1" + + //PasswordExchangeProtocolsMSCHAPv2 - The MS-CHAP v2 Login method + PasswordExchangeProtocolsMSCHAPv2 PasswordExchangeProtocols = "MSCHAPv2" + + //PrivilegeTypeLogin -Can log in to the service and read Resources + PrivilegeTypeLogin PrivilegeType = "Login" + + //PrivilegeTypeConfigureManager -Can configure managers + PrivilegeTypeConfigureManager PrivilegeType = "ConfigureManager" + + //PrivilegeTypeConfigureUsers -Can configure users and their accounts + PrivilegeTypeConfigureUsers PrivilegeType = "ConfigureUsers" + + //PrivilegeTypeConfigureSelf -Can change the password for the current user account and log out of their own sessions + PrivilegeTypeConfigureSelf PrivilegeType = "ConfigureSelf" + + //PrivilegeTypeConfigureComponents - Can configure components that this service manages + PrivilegeTypeConfigureComponents PrivilegeType = "ConfigureComponents" + + //PrivilegeTypeNoAuth -Authentication is not required + PrivilegeTypeNoAuth PrivilegeType = "NoAuth" + + //PrivilegeTypeConfigureCompositionInfrastructure - Can view and configure composition service resources + PrivilegeTypeConfigureCompositionInfrastructure PrivilegeType = "ConfigureCompositionInfrastructure" + + //PrivilegeTypeAdministrateSystems - Administrator for systems found in the systems collection. Able to manage boot configuration, keys, and certificates for systems + PrivilegeTypeAdministrateSystems PrivilegeType = "AdministrateSystems" + + //PrivilegeTypeOperateSystems -Operator for systems found in the systems collection. Able to perform resets and configure interfaces + PrivilegeTypeOperateSystems PrivilegeType = "OperateSystems" + + //PrivilegeTypeAdministrateStorage - Administrator for storage subsystems and storage systems found in the storage collection and storage system collection respectively + PrivilegeTypeAdministrateStorage PrivilegeType = "AdministrateStorage" + + //PrivilegeTypeOperateStorageBackup -Operator for storage backup functionality for storage subsystems and storage systems found + //in the storage collection and storage system collection respectively + PrivilegeTypeOperateStorageBackup PrivilegeType = "OperateStorageBackup" +) + // AccountService the supported properties, // this structure should be updated once ODIMRA supports more properties +// The AccountService schema defines an account service. The properties are common to, and enable management of, +// all user accounts. The properties include the password requirements and control features, such as account +// lockout. Properties and actions in this service specify general behavior that should be followed +// for typical accounts, however implementations may override these behaviors for special accounts +// or situations to avoid denial of service or other deadlock situations. +// Reference :AccountService.v1_12_0.json type AccountService struct { - ODataContext string `json:"@odata.context,omitempty"` - ODataEtag string `json:"@odata.etag,omitempty"` - ODataID string `json:"@odata.id"` - ODataType string `json:"@odata.type"` - ID string `json:"Id"` - Name string `json:"Name"` - Description string `json:"Description,omitempty"` - Status Status `json:"Status,omitempty"` - Accounts Link `json:"Accounts,omitempty"` - Roles Link `json:"Roles,omitempty"` - MinPasswordLength int `json:"MinPasswordLength,omitempty"` - MaxPasswordLength int `json:"MaxPasswordLength,omitempty"` - PasswordExpirationDays int `json:"PasswordExpirationDays,omitempty"` - ServiceEnabled bool `json:"ServiceEnabled,omitempty"` - LocalAccountAuth string `json:"LocalAccountAuth,omitempty"` + ODataContext string `json:"@odata.context,omitempty"` + ODataEtag string `json:"@odata.etag,omitempty"` + ODataID string `json:"@odata.id"` + ODataType string `json:"@odata.type"` + AccountLockoutCounterResetAfter int `json:"AccountLockoutCounterResetAfter,omitempty"` + AccountLockoutCounterResetEnabled bool `json:"AccountLockoutCounterResetEnabled,omitempty"` + AccountLockoutDuration int `json:"AccountLockoutDuration,omitempty"` + AccountLockoutThreshold int `json:"AccountLockoutThreshold,omitempty"` + Actions *OemActions `json:"Actions,omitempty"` + ActiveDirectory *ExternalAccountProvider `json:"ActiveDirectory,omitempty"` + AdditionalExternalAccountProviders *AdditionalExternalAccountProviders `json:"AdditionalExternalAccountProviders,omitempty"` + AuthFailureLoggingThreshold int `json:"AuthFailureLoggingThreshold,omitempty"` + LDAP *ExternalAccountProvider `json:"LDAP,omitempty"` + MultiFactorAuth *MultiFactorAuth `json:"MultiFactorAuth,omitempty"` + OAuth2 *ExternalAccountProvider `json:"OAuth2,omitempty"` + Oem *Oem `json:"Oem,omitempty"` + PrivilegeMap *PrivilegeMap `json:"PrivilegeMap,omitempty"` + RestrictedOemPrivileges []string `json:"RestrictedOemPrivileges,omitempty"` + RestrictedPrivileges []string `json:"RestrictedPrivileges,omitempty"` //enum + SupportedAccountTypes []string `json:"SupportedAccountTypes,omitempty"` //enum + SupportedOEMAccountTypes []string `json:"SupportedOEMAccountTypes,omitempty"` + TACACSplus *ExternalAccountProvider `json:"TACACSplus,omitempty"` + ID string `json:"Id"` + Name string `json:"Name"` + Description string `json:"Description,omitempty"` + Status Status `json:"Status,omitempty"` + Accounts Link `json:"Accounts,omitempty"` + Roles Link `json:"Roles,omitempty"` + MinPasswordLength int `json:"MinPasswordLength,omitempty"` + MaxPasswordLength int `json:"MaxPasswordLength,omitempty"` + PasswordExpirationDays int `json:"PasswordExpirationDays,omitempty"` + ServiceEnabled bool `json:"ServiceEnabled,omitempty"` + LocalAccountAuth string `json:"LocalAccountAuth,omitempty"` //enum +} + +// Authentication redfish structure +// The information required to authenticate to the external service +// This type shall contain the information required to authenticate to the external service +type Authentication struct { + AuthenticationType string `json:"AuthenticationType,omitempty"` //enum + EncryptionKey string `json:"EncryptionKey,omitempty"` + EncryptionKeySet bool `json:"EncryptionKeySet,omitempty"` + KerberosKeytab string `json:"KerberosKeytab,omitempty"` + Oem *Oem `json:"Oem,omitempty"` + Password string `json:"Password,omitempty"` + Username string `json:"Username,omitempty"` +} + +// ClientCertificate redfish structure +// Various settings for client certificate authentication such as mTLS or CAC/PIV +// This type shall contain settings for client certificate authentication +type ClientCertificate struct { + CertificateMappingAttribute string `json:"CertificateMappingAttribute,omitempty"` //enum + Certificates Certificates `json:"Certificates,omitempty"` + Enabled bool `json:"Enabled,omitempty"` + RespondToUnauthenticatedClients bool `json:"RespondToUnauthenticatedClients,omitempty"` +} + +// ExternalAccountProvider redfish structure +// The external account provider services that can provide accounts for this manager to use for authentication +// This type shall contain properties that represent external account provider services +// that can provide accounts for this manager to use for authentication +type ExternalAccountProvider struct { + AccountProviderType string `json:"AccountProviderType,omitempty"` //enum + Authentication *Authentication `json:"Authentication,omitempty"` + Certificates *Certificates `json:"Certificates,omitempty"` + LDAPService *LDAPService `json:"LDAPService,omitempty"` + OAuth2Service *OAuth2Service `json:"OAuth2Service,omitempty"` + PasswordSet bool `json:"PasswordSet,omitempty"` + Priority int `json:"Priority"` + RemoteRoleMapping *RoleMapping `json:"RemoteRoleMapping"` + ServiceAddresses []string `json:"ServiceAddresses,omitempty"` + ServiceEnabled bool `json:"ServiceEnabled,omitempty"` + TACACSplusService *TACACSplusService `json:"TACACSplusService,omitempty"` +} + +// GoogleAuthenticator redfish structure +// Various settings for Google Authenticator multi-factor authentication +// This type shall contain settings for Google Authenticator multi-factor authentication +type GoogleAuthenticator struct { + Enabled bool `json:"Enabled,omitempty"` + SecretKey string `json:"SecretKey,omitempty"` + SecretKeySet bool `json:"SecretKeySet,omitempty"` +} + +// LDAPSearchSettings redfish structure +// The settings to search a generic LDAP service +// This type shall contain all required settings to search a generic LDAP service +type LDAPSearchSettings struct { + BaseDistinguishedNames []string `json:"BaseDistinguishedNames,omitempty"` + GroupNameAttribute string `json:"GroupNameAttribute,omitempty"` + GroupsAttribute string `json:"GroupsAttribute,omitempty"` + SSHKeyAttribute string `json:"SSHKeyAttribute,omitempty"` + UsernameAttribute string `json:"UsernameAttribute,omitempty"` +} + +// LDAPService redfish structure +// The settings required to parse a generic LDAP service +// This type shall contain all required settings to parse a generic LDAP service +type LDAPService struct { + Oem *Oem `json:"Oem,omitempty"` + SearchSettings *LDAPSearchSettings `json:"SearchSettings,omitempty"` +} + +// MFABypass redfish structure +// Multi-factor authentication bypass settings +// This type shall contain multi-factor authentication bypass settings +type MFABypass struct { + BypassTypes []string `json:"BypassTypes,omitempty"` +} + +// MicrosoftAuthenticator redfish structure +// Various settings for Microsoft Authenticator multi-factor authentication +// This type shall contain settings for Microsoft Authenticator multi-factor authentication +type MicrosoftAuthenticator struct { + Enabled bool `json:"Enabled,omitempty"` + SecretKey string `json:"SecretKey,omitempty"` + SecretKeySet bool `json:"SecretKeySet,omitempty"` +} + +// MultiFactorAuth redfish structure +// Multi-factor authentication settings +// This type shall contain multi-factor authentication settings +type MultiFactorAuth struct { + ClientCertificate *ClientCertificate `json:"ClientCertificate,omitempty"` + GoogleAuthenticator *GoogleAuthenticator `json:"GoogleAuthenticator,omitempty"` + MicrosoftAuthenticator *MicrosoftAuthenticator `json:"MicrosoftAuthenticator,omitempty"` + SecurID *SecurID `json:"SecurID,omitempty"` +} + +// OAuth2Service redfish structure +// Various settings to parse an OAuth 2.0 service +// This type shall contain settings for parsing an OAuth 2.0 service +type OAuth2Service struct { + Audience []string `json:"Audience,omitempty"` + Issuer string `json:"Issuer,omitempty"` + Mode string `json:"Mode,omitempty"` //enum + OAuthServiceSigningKeys string `json:"OAuthServiceSigningKeys,omitempty"` +} + +// SecurID redfish structure +// Various settings for RSA SecurID multi-factor authentication +// This type shall contain settings for RSA SecurID multi-factor authentication +type SecurID struct { + Certificates *Certificates `json:"Certificates,omitempty"` + ClientID string `json:"ClientID,omitempty"` + ClientSecret string `json:"ClientSecret,omitempty"` + ClientSecretSet bool `json:"ClientSecretSet,omitempty"` + Enabled bool `json:"Enabled,omitempty"` + ServerURI string `json:"ServerURI,omitempty"` +} + +// RoleMapping redfish structure +// The mapping rules that are used to convert the external account providers account +// information to the local Redfish role +// This type shall contain mapping rules that are used to convert the external account +// providers account information to the local Redfish role +type RoleMapping struct { + LocalRole string `json:"LocalRole,omitempty"` + MFABypass *MFABypass `json:"MFABypass,omitempty"` + Oem *Oem `json:"Oem,omitempty"` + RemoteGroup string `json:"RemoteGroup,omitempty"` + RemoteUser string `json:"RemoteUser,omitempty"` +} + +// TACACSplusService redfish structure +// Various settings to parse a TACACS+ service +// This type shall contain settings for parsing a TACACS+ service +type TACACSplusService struct { + PasswordExchangeProtocols string `json:"PasswordExchangeProtocols,omitempty"` //enum + PrivilegeLevelArgument string `json:"PrivilegeLevelArgument,omitempty"` +} + +// AdditionalExternalAccountProviders redfish structure +type AdditionalExternalAccountProviders struct { + ODataContext string `json:"@odata.context,omitempty"` + ODataEtag string `json:"@odata.etag,omitempty"` + ODataID string `json:"@odata.id"` + ODataType string `json:"@odata.type"` + Description string `json:"Description,omitempty"` + Members []string `json:"Members"` + MembersODataCount int `json:"Members@odata.count"` + MembersODataNextLink string `json:"Members@odata.nextLink,omitempty"` + Name string `json:"Name"` + Oem *Oem `json:"Oem,omitempty"` +} + +// PrivilegeMap redfish structure +type PrivilegeMap struct { + ODataType string `json:"@odata.type"` + Actions *OemActions `json:"Actions,omitempty"` + Description string `json:"Description,omitempty"` + ID string `json:"Id"` + Mapping *Mapping `json:"Mapping,omitempty"` + Name string `json:"Name"` + OEMPrivilegesUsed []string `json:"OEMPrivilegesUsed,omitempty"` + Oem Oem `json:"Oem,omitempty"` + PrivilegesUsed []string `json:"PrivilegesUsed,omitempty"` //enum +} + +// Mapping redfish structure +type Mapping struct { + Entity string `json:"Entity,omitempty"` + OperationMap OperationMap `json:"OperationMap,omitempty"` + PropertyOverrides TargetPrivilegeMap `json:"PropertyOverrides,omitempty"` + ResourceURIOverrides TargetPrivilegeMap `json:"ResourceURIOverrides,omitempty"` + SubordinateOverrides TargetPrivilegeMap `json:"SubordinateOverrides,omitempty"` +} + +// TargetPrivilegeMap redfish structure +type TargetPrivilegeMap struct { + OperationMap OperationMap `json:"OperationMap,omitempty"` + Targets []string `json:"Targets,omitempty"` +} + +// OperationMap redfish structure +type OperationMap struct { + DELETE OperationPrivilege `json:"DELETE,omitempty"` + GET OperationPrivilege `json:"GET,omitempty"` + HEAD OperationPrivilege `json:"HEAD,omitempty"` + POST OperationPrivilege `json:"POST,omitempty"` + PUT OperationPrivilege `json:"PUT,omitempty"` + PATCH OperationPrivilege `json:"PATCH,omitempty"` +} + +// OperationPrivilege redfish structure +type OperationPrivilege struct { + Privilege []string `json:"Privilege,omitempty"` } // ManagerAccount the supported properties of manager account schema, @@ -57,7 +474,7 @@ type ManagerAccount struct { Keys *Collection `json:"Keys,omitempty"` } -//AccountLinks struct definition +// AccountLinks struct definition type AccountLinks struct { Role Link `json:"Role"` } diff --git a/lib-dmtf/model/common.go b/lib-dmtf/model/common.go index 44e356c2f..74202b4f2 100644 --- a/lib-dmtf/model/common.go +++ b/lib-dmtf/model/common.go @@ -30,7 +30,7 @@ type Redundancy struct { RedundancySetCount int `json:"RedundancySet@odata.count,omitempty"` } -//Identifier redfish structure +// Identifier redfish structure type Identifier struct { DurableName string `json:"DurableName,omitempty"` DurableNameFormat string `json:"DurableNameFormat,omitempty"` @@ -123,3 +123,17 @@ type IOStatistics struct { WriteIORequests int `json:"WriteIORequests,omitempty"` WriteIORequestTime string `json:"WriteIORequestTime,omitempty"` } + +// Certificates redfish structure +type Certificates struct { + Oid string `json:"@odata.id"` + Ocontext string `json:"@odata.context,omitempty"` + Oetag string `json:"@odata.etag,omitempty"` + Otype string `json:"@odata.type"` + Description string `json:"Description,omitempty"` + Members string `json:"Members"` + MembersCount int `json:"Members@odata.count"` + MembersODataNextLink string `json:"Members@odata.nextLink,omitempty"` + Name string `json:"Name"` + Oem *Oem `json:"Oem,omitempty"` +} diff --git a/lib-dmtf/model/manager.go b/lib-dmtf/model/manager.go index d4647c793..85c0ce34e 100644 --- a/lib-dmtf/model/manager.go +++ b/lib-dmtf/model/manager.go @@ -14,6 +14,16 @@ package model +// GraphicalConnectTypesSupported - ConnectTypesSupported +type GraphicalConnectTypesSupported string + +const ( + // GraphicalConnectTypesSupportedKVMIP - The information about the graphical console + GraphicalConnectTypesSupportedKVMIP GraphicalConnectTypesSupported = "KVMIP" + // GraphicalConnectTypesSupportedCOEM - The information about the graphical console + GraphicalConnectTypesSupportedCOEM GraphicalConnectTypesSupported = "OEM" +) + // Manager is the redfish Manager model according to the 2020.3 release type Manager struct { ODataContext string `json:"@odata.context,omitempty"` @@ -62,7 +72,7 @@ type Manager struct { AdditionalFirmwareVersions *AdditionalFirmwareVersions `json:"AdditionalFirmwareVersions,omitempty"` } -//AdditionalFirmwareVersions redfish structure +// AdditionalFirmwareVersions redfish structure type AdditionalFirmwareVersions struct { Bootloader string `json:"Bootloader,omitempty"` Kernel string `json:"Kernel,omitempty"` @@ -78,9 +88,12 @@ type CommandShell struct { } // GraphicalConsole redfish structure +// The information about a graphical console service for this system. +// This type shall describe a graphical console service for a computer system. type GraphicalConsole struct { - ConnectTypesSupported []string `json:"ConnectTypesSupported"` + ConnectTypesSupported []string `json:"ConnectTypesSupported"` //enum MaxConcurrentSessions int `json:"MaxConcurrentSessions"` + Port int `json:"Port,omitempty"` ServiceEnabled bool `json:"ServiceEnabled"` } @@ -103,7 +116,7 @@ type ManagerLinks struct { SoftwareImages *Link `json:"SoftwareImages,omitempty"` } -//VirtualMedia is a redfish virtual media model +// VirtualMedia is a redfish virtual media model type VirtualMedia struct { ODataContext string `json:"@odata.context,omitempty"` ODataEtag string `json:"@odata.etag,omitempty"` diff --git a/lib-dmtf/model/storage.go b/lib-dmtf/model/storage.go index a8aed8b63..e49230615 100644 --- a/lib-dmtf/model/storage.go +++ b/lib-dmtf/model/storage.go @@ -80,6 +80,11 @@ type StorageControllers struct { // Actions redfish structure type Actions struct { + AddResourceBlock AddResourceBlock `json:"AddResourceBlock,omitempty"` + RemoveResourceBlock RemoveResourceBlock `json:"RemoveResourceBlock,omitempty"` + Reset Reset `json:"Reset,omitempty"` + SetDefaultBootOrder SetDefaultBootOrder `json:"SetDefaultBootOrder,omitempty"` + Oem Oem `json:"Oem,omitempty"` } // StorageLinks struct is for storage Links schema