Skip to content

Commit

Permalink
Update Models in lib-dmtf (#1306)
Browse files Browse the repository at this point in the history
* Properties modified

* storage.go modified

* changed ComputerSystem.go
  • Loading branch information
agarwal-ruchi1206 authored Sep 4, 2023
1 parent c85a2a8 commit 5912550
Show file tree
Hide file tree
Showing 9 changed files with 313 additions and 67 deletions.
151 changes: 92 additions & 59 deletions lib-dmtf/model/Chassis.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,65 +21,98 @@ import (

// Chassis redfish structure
type Chassis 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"`
AssetTag interface{} `json:"AssetTag"` // omitempty is not added to make value as null if it's not present
ChassisType string `json:"ChassisType"`
DepthMm float32 `json:"DepthMm,omitempty"`
EnvironmentalClass string `json:"EnvironmentalClass,omitempty"`
HeightMm float32 `json:"HeightMm,omitempty"`
IndicatorLED string `json:"IndicatorLED,omitempty"`
Manufacturer string `json:"Manufacturer,omitempty"`
Model string `json:"Model,omitempty"`
PartNumber interface{} `json:"PartNumber"` // omitempty is not added to make value as null if it's not present
PowerState string `json:"PowerState,omitempty"`
SerialNumber string `json:"SerialNumber,omitempty"`
SKU string `json:"SKU,omitempty"`
UUID string `json:"UUID,omitempty"`
WeightKg float32 `json:"WeightKg,omitempty"`
WidthMm float32 `json:"WidthMm,omitempty"`
Links *Links `json:"Links,omitempty"`
Location *Link `json:"Location,omitempty"`
LogServices *LogServices `json:"LogServices,omitempty"`
Assembly *Assembly `json:"Assembly,omitempty"`
NetworkAdapters *NetworkAdapters `json:"NetworkAdapters,omitempty"`
PCIeSlots *PCIeSlots `json:"PCIeSlots,omitempty"`
PhysicalSecurity *PhysicalSecurity `json:"PhysicalSecurity,omitempty"`
Power *Link `json:"Power,omitempty"`
Sensors *Sensors `json:"Sensors,omitempty"`
Status *Status `json:"Status,omitempty"`
Thermal *Link `json:"Thermal,omitempty"`
Actions *OemActions `json:"Actions,omitempty"`
Certificates *Certificates `json:"Certificates,omitempty"`
Controls *Link `json:"Controls,omitempty"`
Drives *Link `json:"Drives,omitempty"`
EnvironmentMetrics *Link `json:"EnvironmentMetrics,omitempty"`
LocationIndicatorActive bool `json:"LocationIndicatorActive,omitempty"`
MaxPowerWatts float32 `json:"MaxPowerWatts,omitempty"`
Measurements []*Link `json:"Measurements,omitempty"` // Deprecated in version v1.19.0
MediaControllers *Link `json:"MediaControllers,omitempty"`
Memory *Link `json:"Memory,omitempty"`
MemoryDomains *Link `json:"MemoryDomains,omitempty"`
MinPowerWatts float32 `json:"MinPowerWatts,omitempty"`
Oem *Oem `json:"Oem,omitempty"`
PCIeDevices *Link `json:"PCIeDevices,omitempty"`
PowerSubsystem *Link `json:"PowerSubsystem,omitempty"`
SparePartNumber string `json:"SparePartNumber,omitempty"`
ThermalSubsystem *Link `json:"ThermalSubsystem,omitempty"`
ThermalDirection string `json:"ThermalDirection,omitempty"`
ThermalManagedByParent bool `json:"ThermalManagedByParent,omitempty"`
PoweredByParent bool `json:"PoweredByParent,omitempty"`
Fans []*Link `json:"Fans,omitempty"`
PowerSupplies []*Link `json:"PowerSupplies,omitempty"`
PowerDistribution *Link `json:"PowerDistribution,omitempty"`
FabricAdapters *Link `json:"FabricAdapters,omitempty"`
ElectricalSourceManagerURIs []string `json:"ElectricalSourceManagerURIs,omitempty"`
ElectricalSourceNames []string `json:"ElectricalSourceNames,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"`
AssetTag interface{} `json:"AssetTag"` // omitempty is not added to make value as null if it's not present
ChassisType string `json:"ChassisType"`
DepthMm float32 `json:"DepthMm,omitempty"`
EnvironmentalClass string `json:"EnvironmentalClass,omitempty"`
HeightMm float32 `json:"HeightMm,omitempty"`
IndicatorLED string `json:"IndicatorLED,omitempty"`
Manufacturer string `json:"Manufacturer,omitempty"`
Model string `json:"Model,omitempty"`
PartNumber interface{} `json:"PartNumber"` // omitempty is not added to make value as null if it's not present
PowerState string `json:"PowerState,omitempty"`
SerialNumber string `json:"SerialNumber,omitempty"`
SKU string `json:"SKU,omitempty"`
UUID string `json:"UUID,omitempty"`
WeightKg float32 `json:"WeightKg,omitempty"`
WidthMm float32 `json:"WidthMm,omitempty"`
Links *Links `json:"Links,omitempty"`
Location *Link `json:"Location,omitempty"`
LogServices *LogServices `json:"LogServices,omitempty"`
Assembly *Assembly `json:"Assembly,omitempty"`
NetworkAdapters *NetworkAdapters `json:"NetworkAdapters,omitempty"`
PCIeSlots *PCIeSlots `json:"PCIeSlots,omitempty"`
PhysicalSecurity *PhysicalSecurity `json:"PhysicalSecurity,omitempty"`
Power *Link `json:"Power,omitempty"`
Sensors *Sensors `json:"Sensors,omitempty"`
Status *Status `json:"Status,omitempty"`
Thermal *Link `json:"Thermal,omitempty"`
Actions *OemActions `json:"Actions,omitempty"`
Certificates *Certificates `json:"Certificates,omitempty"`
Controls *Link `json:"Controls,omitempty"`
Drives *Link `json:"Drives,omitempty"`
EnvironmentMetrics *Link `json:"EnvironmentMetrics,omitempty"`
LocationIndicatorActive bool `json:"LocationIndicatorActive,omitempty"`
MaxPowerWatts float32 `json:"MaxPowerWatts,omitempty"`
Measurements []*Link `json:"Measurements,omitempty"` // Deprecated in version v1.19.0
MediaControllers *Link `json:"MediaControllers,omitempty"`
Memory *Link `json:"Memory,omitempty"`
MemoryDomains *Link `json:"MemoryDomains,omitempty"`
MinPowerWatts float32 `json:"MinPowerWatts,omitempty"`
Oem *Oem `json:"Oem,omitempty"`
PCIeDevices *Link `json:"PCIeDevices,omitempty"`
PowerSubsystem *Link `json:"PowerSubsystem,omitempty"`
SparePartNumber string `json:"SparePartNumber,omitempty"`
ThermalSubsystem *Link `json:"ThermalSubsystem,omitempty"`
ThermalDirection string `json:"ThermalDirection,omitempty"`
ThermalManagedByParent bool `json:"ThermalManagedByParent,omitempty"`
PoweredByParent bool `json:"PoweredByParent,omitempty"`
Fans []*Link `json:"Fans,omitempty"`
PowerSupplies []*Link `json:"PowerSupplies,omitempty"`
PowerDistribution *Link `json:"PowerDistribution,omitempty"`
FabricAdapters *Link `json:"FabricAdapters,omitempty"`
ElectricalSourceManagerURIs []string `json:"ElectricalSourceManagerURIs,omitempty"`
ElectricalSourceNames []string `json:"ElectricalSourceNames,omitempty"`
HotPluggable bool `json:"HotPluggable,omitempty"`
TrustedComponents *TrustedComponentCollection `json:"TrustedComponents,omitempty"`
Version string `json:"Version,omitempty"`
Processors ProcessorCollection `json:"Processors,omitempty"`
Replaceable bool `json:"Replaceable,omitempty"`
}

// TrustedComponentCollection redfish structure
type TrustedComponentCollection struct {
Oid string `json:"@odata.id"`
Ocontext string `json:"@odata.context,omitempty"`
Otype string `json:"@odata.type"`
Oetag string `json:"@odata.etag,omitempty"`
Description string `json:"Description,omitempty"`
Name string `json:"Name"`
Oem *Oem `json:"Oem,omitempty"`
Members []string `json:"Members"`
MembersODataCount int `json:"Members@odata.count"`
MembersODataNextLink string `json:"Members@odata.nextLink,omitempty"`
}

// ProcessorCollection redfish structure
type ProcessorCollection struct {
Oid string `json:"@odata.id"`
Ocontext string `json:"@odata.context,omitempty"`
Otype string `json:"@odata.type"`
Oetag string `json:"@odata.etag,omitempty"`
Description string `json:"Description,omitempty"`
Name string `json:"Name"`
Oem *Oem `json:"Oem,omitempty"`
Members []string `json:"Members"`
MembersODataCount int `json:"Members@odata.count"`
MembersODataNextLink string `json:"Members@odata.nextLink,omitempty"`
}

// LogServices get
Expand Down
44 changes: 43 additions & 1 deletion lib-dmtf/model/ComputerSystem.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ type IndicatorLED string
// BootProgressTypes - The last boot progress state
type BootProgressTypes string

type ConnectedTypesSupported string

const (

// BootSourceNone - Boot from the normal boot device
Expand Down Expand Up @@ -369,6 +371,10 @@ const (

//IndicatorLEDOff - The indicator LED is off
IndicatorLEDOff IndicatorLED = "Off"

ConnectedTypesSupportedKVMIP ConnectedTypesSupported = "KVMIP"

ConnectedTypesSupportedOEM ConnectedTypesSupported = "OEM"
)

// AddResourceBlock redfish structure
Expand Down Expand Up @@ -459,6 +465,20 @@ type ComputerSystem struct {
Composition *Composition `json:"Composition,omitempty"`
}

type HostGraphicalConsole struct {
ConnectedTypesSupported []string `json:"ConnectedTypesSupported,omitempty"` //enum
MaxConcurrentSessions int `json:"MaxConcurrentSessions,omitempty"`
Port int `json:"Port,omitempty"`
ServiceEnabled bool `json:"ServiceEnabled,omitempty"`
}

type HostSerialConsole struct {
IPMI *SerialConsoleProtocol `json:"IPMI,omitempty"`
MaxConcurrentSessions int `json:"MaxConcurrentSessions,omitempty"`
SSH *SerialConsoleProtocol `json:"SSH,omitempty"`
Telnet *SerialConsoleProtocol `json:"Telnet,omitempty"`
}

// ComputerSystemActions redfish structure
type ComputerSystemActions struct {
AddResourceBlock *AddResourceBlock `json:"AddResourceBlock,omitempty"`
Expand Down Expand Up @@ -1140,7 +1160,7 @@ type Processors struct {
HighSpeedCoreIDs []int `json:"HighSpeedCoreIDs,omitempty"`
LocationIndicatorActive bool `json:"LocationIndicatorActive,omitempty"`
Measurements []*Link `json:"Measurements,omitempty"`
MemorySummary *MemorySummaryDetails `json:"MemorySummary,omitempty"`
MemorySummary *MemorySummary `json:"MemorySummary,omitempty"`
MinSpeedMHz int `json:"MinSpeedMHz,omitempty"`
OperatingConfigs *Link `json:"OperatingConfigs,omitempty"`
OperatingSpeedMHz int `json:"OperatingSpeedMHz,omitempty"`
Expand All @@ -1155,6 +1175,28 @@ type Processors struct {
AdditionalFirmwareVersions *AdditionalFirmwareVersions `json:"AdditionalFirmwareVersions,omitempty"`
}

// SystemInterface redfish structure
type MemoryMetrics struct {
Oid string `json:"@odata.id"`
Ocontext string `json:"@odata.context,omitempty"`
Oetag string `json:"@odata.etag,omitempty"`
Otype string `json:"@odata.type"`
Actions *OemActions `json:"Actions,omitempty"`
BandwidthPercent int `json:"BandwidthPercent,omitempty"`
BlockSizeBytes int `json:"BlockSizeBytes,omitempty"`
CXL CXL `json:"CXL,omitempty"`
CapacityUtilizationPercent int `json:"CapacityUtilizationPercent,omitempty"`
CorrectedPersistentErrorCount int `json:"CorrectedPersistentErrorCount,omitempty"`
CorrectedVolatileErrorCount int `json:"CorrectedVolatileErrorCount,omitempty"`
CurrentPeriod *CurrentPeriod `json:"CurrentPeriod,omitempty"`
Description string `json:"description,omitempty"`
DirtyShutdownCount int `json:"DirtyShutdownCount,omitempty"`
ID string `json:"ID"`
Name string `json:"Name"`
Oem Oem `json:"Oem,omitempty"`
OperatingSpeedMHz int `json:"OperatingSpeedMHz,omitempty"`
}

// SystemInterface redfish structure
type SystemInterface struct {
Ethernet Ethernet `json:"Ethernet,omitempty"`
Expand Down
1 change: 1 addition & 0 deletions lib-dmtf/model/Links.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ type Links struct {
NetworkDeviceFunctions []*Link `json:"NetworkDeviceFunctions,omitempty"`
PowerOutlets []*Link `json:"PowerOutlets,omitempty"`
DedicatedSpareDrives []*Link `json:"DedicatedSpareDrives,omitempty"`
NVMeoDiscoverySubsystems []*Link `json:"NVMeoDiscoverySubsystems,omitempty"`
}

// Link holds the odata id redfish links
Expand Down
4 changes: 4 additions & 0 deletions lib-dmtf/model/accountService.go
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,11 @@ type ExternalAccountProvider struct {
PasswordSet bool `json:"PasswordSet,omitempty"`
Priority int `json:"Priority,omitempty"`
RemoteRoleMapping []*RoleMapping `json:"RemoteRoleMapping,omitempty"`
Retries int `json:"Retries,omitempty"`
ServiceAddresses []string `json:"ServiceAddresses,omitempty"`
ServiceEnabled bool `json:"ServiceEnabled,omitempty"`
TACACSplusService *TACACSplusService `json:"TACACSplusService,omitempty"`
TimeoutSeconds int `json:"TimeoutSeconds,omitempty"`
}

// GoogleAuthenticator redfish structure
Expand Down Expand Up @@ -359,6 +361,7 @@ type OAuth2Service struct {
Issuer string `json:"Issuer,omitempty"`
Mode string `json:"Mode,omitempty"` //enum
OAuthServiceSigningKeys string `json:"OAuthServiceSigningKeys,omitempty"`
Oem *Oem `json:"Oem,omitempty"`
}

// SecurID redfish structure
Expand Down Expand Up @@ -390,6 +393,7 @@ type RoleMapping struct {
// Various settings to parse a TACACS+ service
// This type shall contain settings for parsing a TACACS+ service
type TACACSplusService struct {
AuthorizationService string `json:"AuthorizationService,omitempty"`
PasswordExchangeProtocols string `json:"PasswordExchangeProtocols,omitempty"` //enum
PrivilegeLevelArgument string `json:"PrivilegeLevelArgument,omitempty"`
}
Expand Down
6 changes: 6 additions & 0 deletions lib-dmtf/model/endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ type PciID struct {
VendorID string `json:"VendorId,omitempty"`
}

// GCID for Endpoint
type GCID struct {
CID string `json:"GCID,omitempty"`
SID string `json:"SID,omitemoty"`
}

// EndpointLinks is the struct to links under a AddressPool
type EndpointLinks struct {
AddressPools []Link `json:"AddressPools,omitempty"`
Expand Down
Loading

0 comments on commit 5912550

Please sign in to comment.