Skip to content

Commit

Permalink
Merge pull request #7 from agarwal-ruchi1206/Odim-7033-redfish
Browse files Browse the repository at this point in the history
Update redfish spec to 2023.1 in metadata and registries
  • Loading branch information
jeevan-kamkar authored Sep 1, 2023
2 parents 9b88462 + a8be952 commit 4c1fd57
Show file tree
Hide file tree
Showing 35 changed files with 540 additions and 173 deletions.
2 changes: 1 addition & 1 deletion lib-dmtf/model/Chassis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/ODIM-Project/ODIM/lib-utilities/config"
)

var chassisJSON = "{\"@odata.context\":\"/redfish/v1/$metadata#Chassis.Chassis\",\"@odata.id\":\"/redfish/v1/Chassis/1/\",\"@odata.type\":\"#Chassis.v1_20_0.Chassis\",\"@odata.etag\":\"W/\\\"ACCE5EFE\\\"\",\"Id\":\"1\",\"Description\":\"\",\"Name\":\"Computer System Chassis\",\"AssetTag\":\"\",\"ChassisType\":\"RackMount\",\"DepthMm\":0,\"EnvironmentalClass\":\"\",\"HeightMm\":0,\"IndicatorLED\":\"On\",\"Manufacturer\":\"HPE\",\"Model\":\"ProLiant DL380 Gen10\",\"PartNumber\":\"\",\"PowerState\":\"\",\"SerialNumber\":\"2M291101JZ\",\"SKU\":\"868704-B21\",\"UUID\":\"\",\"WeightKg\":0,\"WidthMm\":0,\"Links\":{\"ComputerSystems\":[{\"@odata.id\":\"/redfish/v1/Systems/1/\"}],\"ManagedBy\":[{\"@odata.id\":\"/redfish/v1/Managers/1/\"}]},\"Location\":{\"@odata.id\":\"\"},\"LogServices\":{\"@odata.id\":\"\"},\"Assembly\":{\"@odata.id\":\"\"},\"NetworkAdapters\":{\"@odata.id\":\"/redfish/v1/Chassis/1/NetworkAdapters/\"},\"PCIeSlots\":{\"@odata.id\":\"\"},\"PhysicalSecurity\":{\"IntrusionSensor\":\"\",\"IntrusionSensorNumber\":0,\"IntrusionSensorReArm\":\"\"},\"Power\":{\"@odata.id\":\"/redfish/v1/Chassis/1/Power/\"},\"Sensors\":{\"@odata.id\":\"\"},\"Status\":{\"Health\":\"OK\",\"State\":\"Starting\",\"Oem\":{}},\"Thermal\":{\"@odata.id\":\"/redfish/v1/Chassis/1/Thermal/\"}}"
var chassisJSON = "{\"@odata.context\":\"/redfish/v1/$metadata#Chassis.Chassis\",\"@odata.id\":\"/redfish/v1/Chassis/1/\",\"@odata.type\":\"#Chassis.v1_23_0.Chassis\",\"@odata.etag\":\"W/\\\"ACCE5EFE\\\"\",\"Id\":\"1\",\"Description\":\"\",\"Name\":\"Computer System Chassis\",\"AssetTag\":\"\",\"ChassisType\":\"RackMount\",\"DepthMm\":0,\"EnvironmentalClass\":\"\",\"HeightMm\":0,\"IndicatorLED\":\"On\",\"Manufacturer\":\"HPE\",\"Model\":\"ProLiant DL380 Gen10\",\"PartNumber\":\"\",\"PowerState\":\"\",\"SerialNumber\":\"2M291101JZ\",\"SKU\":\"868704-B21\",\"UUID\":\"\",\"WeightKg\":0,\"WidthMm\":0,\"Links\":{\"ComputerSystems\":[{\"@odata.id\":\"/redfish/v1/Systems/1/\"}],\"ManagedBy\":[{\"@odata.id\":\"/redfish/v1/Managers/1/\"}]},\"Location\":{\"@odata.id\":\"\"},\"LogServices\":{\"@odata.id\":\"\"},\"Assembly\":{\"@odata.id\":\"\"},\"NetworkAdapters\":{\"@odata.id\":\"/redfish/v1/Chassis/1/NetworkAdapters/\"},\"PCIeSlots\":{\"@odata.id\":\"\"},\"PhysicalSecurity\":{\"IntrusionSensor\":\"\",\"IntrusionSensorNumber\":0,\"IntrusionSensorReArm\":\"\"},\"Power\":{\"@odata.id\":\"/redfish/v1/Chassis/1/Power/\"},\"Sensors\":{\"@odata.id\":\"\"},\"Status\":{\"Health\":\"OK\",\"State\":\"Starting\",\"Oem\":{}},\"Thermal\":{\"@odata.id\":\"/redfish/v1/Chassis/1/Thermal/\"}}"

func TestChassis_SaveInMemory(t *testing.T) {
var Chas, Chas1 Chassis
Expand Down
2 changes: 1 addition & 1 deletion lib-dmtf/model/ComputerSystem_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/ODIM-Project/ODIM/lib-utilities/config"
)

var CSystemJSON = "{\"@odata.context\":\"/redfish/v1/$metadata#ComputerSystem.ComputerSystem\",\"@odata.id\":\"/redfish/v1/Systems/1/\",\"@odata.type\":\"#ComputerSystem.v1_18_0.ComputerSystem\",\"@odata.etag\":\"W/3356AE4A\", \"Id\":\"1\",\"Description\":\"\",\"Name\":\"Computer System\",\"AssetTag\":\"\",\"BiosVersion\":\"U30 v1.46 (10/02/2018)\",\"HostName\":\"\",\"IndicatorLED\":\"Off\",\"Manufacturer\":\"HPE\",\"Model\":\"ProLiant DL380 Gen10\",\"PartNumber\":\"\",\"PowerRestorePolicy\":\"\",\"PowerState\":\"On\",\"SerialNumber\":\"2M291101JZ\",\"SKU\":\"868704-B21\",\"SubModel\":\"\",\"SystemType\":\"Physical\",\"UUID\":\"37383638-3430-4D32-3239-313130314A5A\",\"HostingRoles\":null,\"PCIeDevices\":null,\"PCIeFunctions\":null,\"Bios\":{\"@odata.id\":\"/redfish/v1/systems/1/bios/\"},\"Boot\":{\"AliasBootOrder\":null,\"BootNext\":\"\",\"BootOptions\":{\"@odata.id\":\"\"}, \"BootOrder\":null,\"BootOrderPropertySelection\":\"\",\"BootSourceOverrideEnabled\":\"Disabled\",\"BootSourceOverrideMode\":\"UEFI\",\"BootSourceOverrideTarget\":\"None\",\"Certificates\":{\"@odata.id\":\"\"},\"UefiTargetBootSourceOverride\":\"None\"},\"EthernetInterfaces\":{\"@odata.id\":\"/redfish/v1/Systems/1/EthernetInterfaces/\"},\"HostedServices\":{\"Oem\":{},\"StorageServices\":{\"@odata.id\":\"\"}},\"HostWatchdogTimer\":{\"FunctionEnabled\":false,\"Oem\":{},\"Status\":{\"Health\":\"\",\"State\":\"\",\"Oem\":{}},\"TimeoutAction\":\"\",\"WarningAction\":\"\"},\"Links\":{\"Chassis\":[{\"@odata.id\":\"/redfish/v1/Chassis/1/\"}],\"ManagedBy\":[{\"@odata.id\":\"/redfish/v1/Managers/1/\"}]},\"LogServices\":{\"@odata.id\":\"/redfish/v1/Systems/1/LogServices/\"},\"Memory\":{\"@odata.id\":\"/redfish/v1/Systems/1/Memory/\"},\"MemoryDomains\":{\"@odata.id\":\"\"},\"MemorySummary\":{\"MemoryMirroring\":\"\",\"TotalSystemMemoryGiB\":384,\"TotalSystemPersistentMemoryGiB\":0,\"Status\":{\"Health\":\"\",\"HealthRollup\":\"OK\",\"State\":\"\",\"Oem\":{}}},\"NetworkInterfaces\":{\"@odata.id\":\"/redfish/v1/Systems/1/NetworkInterfaces/\"},\"Processors\":{\"@odata.id\":\"/redfish/v1/Systems/1/Processors/\"},\"ProcessorSummary\":{\"Count\":2,\"LogicalProcessorCount\":0,\"Model\":\"Intel(R) Xeon(R) Gold 6152 CPU @ 2.10GHz\",\"Metrics\":{\"@odata.id\":\"\"},\"Status\":{\"Health\":\"\",\"HealthRollup\":\"OK\",\"State\":\"\",\"Oem\":{}}},\"Redundancy\":[{\"@odata.id\":\"\"}],\"SecureBoot\":{\"@odata.id\":\"/redfish/v1/Systems/1/SecureBoot/\"},\"SimpleStorage\":{\"@odata.id\":\"\"},\"Status\":{\"Health\":\"OK\",\"State\":\"Starting\",\"Oem\":{}},\"Storage\":{\"@odata.id\":\"/redfish/v1/Systems/1/Storage/\"},\"TrustedModules\":[{\"FirmwareVersion\":\"\",\"FirmwareVersion2\":\"\",\"InterfaceType\":\"\", \"InterfaceTypeSelection\":\"\",\"Oem\":{},\"Status\":{\"Health\":\"\",\"State\":\"Absent\",\"Oem\":{}}}]}"
var CSystemJSON = "{\"@odata.context\":\"/redfish/v1/$metadata#ComputerSystem.ComputerSystem\",\"@odata.id\":\"/redfish/v1/Systems/1/\",\"@odata.type\":\"#ComputerSystem.v1_20_1.ComputerSystem\",\"@odata.etag\":\"W/3356AE4A\", \"Id\":\"1\",\"Description\":\"\",\"Name\":\"Computer System\",\"AssetTag\":\"\",\"BiosVersion\":\"U30 v1.46 (10/02/2018)\",\"HostName\":\"\",\"IndicatorLED\":\"Off\",\"Manufacturer\":\"HPE\",\"Model\":\"ProLiant DL380 Gen10\",\"PartNumber\":\"\",\"PowerRestorePolicy\":\"\",\"PowerState\":\"On\",\"SerialNumber\":\"2M291101JZ\",\"SKU\":\"868704-B21\",\"SubModel\":\"\",\"SystemType\":\"Physical\",\"UUID\":\"37383638-3430-4D32-3239-313130314A5A\",\"HostingRoles\":null,\"PCIeDevices\":null,\"PCIeFunctions\":null,\"Bios\":{\"@odata.id\":\"/redfish/v1/systems/1/bios/\"},\"Boot\":{\"AliasBootOrder\":null,\"BootNext\":\"\",\"BootOptions\":{\"@odata.id\":\"\"}, \"BootOrder\":null,\"BootOrderPropertySelection\":\"\",\"BootSourceOverrideEnabled\":\"Disabled\",\"BootSourceOverrideMode\":\"UEFI\",\"BootSourceOverrideTarget\":\"None\",\"Certificates\":{\"@odata.id\":\"\"},\"UefiTargetBootSourceOverride\":\"None\"},\"EthernetInterfaces\":{\"@odata.id\":\"/redfish/v1/Systems/1/EthernetInterfaces/\"},\"HostedServices\":{\"Oem\":{},\"StorageServices\":{\"@odata.id\":\"\"}},\"HostWatchdogTimer\":{\"FunctionEnabled\":false,\"Oem\":{},\"Status\":{\"Health\":\"\",\"State\":\"\",\"Oem\":{}},\"TimeoutAction\":\"\",\"WarningAction\":\"\"},\"Links\":{\"Chassis\":[{\"@odata.id\":\"/redfish/v1/Chassis/1/\"}],\"ManagedBy\":[{\"@odata.id\":\"/redfish/v1/Managers/1/\"}]},\"LogServices\":{\"@odata.id\":\"/redfish/v1/Systems/1/LogServices/\"},\"Memory\":{\"@odata.id\":\"/redfish/v1/Systems/1/Memory/\"},\"MemoryDomains\":{\"@odata.id\":\"\"},\"MemorySummary\":{\"MemoryMirroring\":\"\",\"TotalSystemMemoryGiB\":384,\"TotalSystemPersistentMemoryGiB\":0,\"Status\":{\"Health\":\"\",\"HealthRollup\":\"OK\",\"State\":\"\",\"Oem\":{}}},\"NetworkInterfaces\":{\"@odata.id\":\"/redfish/v1/Systems/1/NetworkInterfaces/\"},\"Processors\":{\"@odata.id\":\"/redfish/v1/Systems/1/Processors/\"},\"ProcessorSummary\":{\"Count\":2,\"LogicalProcessorCount\":0,\"Model\":\"Intel(R) Xeon(R) Gold 6152 CPU @ 2.10GHz\",\"Metrics\":{\"@odata.id\":\"\"},\"Status\":{\"Health\":\"\",\"HealthRollup\":\"OK\",\"State\":\"\",\"Oem\":{}}},\"Redundancy\":[{\"@odata.id\":\"\"}],\"SecureBoot\":{\"@odata.id\":\"/redfish/v1/Systems/1/SecureBoot/\"},\"SimpleStorage\":{\"@odata.id\":\"\"},\"Status\":{\"Health\":\"OK\",\"State\":\"Starting\",\"Oem\":{}},\"Storage\":{\"@odata.id\":\"/redfish/v1/Systems/1/Storage/\"},\"TrustedModules\":[{\"FirmwareVersion\":\"\",\"FirmwareVersion2\":\"\",\"InterfaceType\":\"\", \"InterfaceTypeSelection\":\"\",\"Oem\":{},\"Status\":{\"Health\":\"\",\"State\":\"Absent\",\"Oem\":{}}}]}"

func TestComputerSystem_SaveInMemory(t *testing.T) {

Expand Down
28 changes: 14 additions & 14 deletions lib-utilities/common/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,39 +119,39 @@ const (
DeviceSubscriptionIndex = "DeviceSubscription"

// ManagerAccountType has schema version to be returned with manager account
ManagerAccountType = "#ManagerAccount.v1_9_0.ManagerAccount"
ManagerAccountType = "#ManagerAccount.v1_10_0.ManagerAccount"
// AccountServiceType has schema version to be returned with accountservice
AccountServiceType = "#AccountService.v1_11_0.AccountService"
AccountServiceType = "#AccountService.v1_13_0.AccountService"
// RoleType has schema version to be returned with Role
RoleType = "#Role.v1_3_1.Role"
// SessionServiceType has schema version to be returned with sessionservice
SessionServiceType = "#SessionService.v1_1_8.SessionService"
// SessionType has schema version to be returned with session
SessionType = "#Session.v1_4_0.Session"
SessionType = "#Session.v1_6_0.Session"
// EventType has schema version to be returned with event
EventType = "#Event.v1_7_0.Event"
// AggregationServiceType has schema version to be returned with Aggregationservice
AggregationServiceType = "#AggregationService.v1_0_1.AggregationService"
AggregationServiceType = "#AggregationService.v1_0_2.AggregationService"
// TaskType has schema version to be returned with Task
TaskType = "#Task.v1_6_0.Task"
TaskType = "#Task.v1_7_1.Task"
// EventDestinationType has schema version to be returned with EventDestination
EventDestinationType = "#EventDestination.v1_12_0.EventDestination"
EventDestinationType = "#EventDestination.v1_13_1.EventDestination"
// EventServiceType has schema version to be returned with Event Service Type
EventServiceType = "#EventService.v1_8_0.EventService"
EventServiceType = "#EventService.v1_10_0.EventService"
// ManagerType has schema version to be returned with Manager
ManagerType = "#Manager.v1_15_0.Manager"
ManagerType = "#Manager.v1_18_0.Manager"
// TaskEventType has schema version to be returned with TaskEvent
TaskEventType = "TaskEvent.1.0.3"
// UpdateServiceType has schema version to be returned with UpdateService
UpdateServiceType = "#UpdateService.v1_11_0.UpdateService"
UpdateServiceType = "#UpdateService.v1_11_3.UpdateService"
// SettingsType has schema version to be returned with Settings in update service
SettingsType = "#Settings.v1_3_3.OperationApplyTimeSupport"
SettingsType = "#Settings.v1_3_5.OperationApplyTimeSupport"
// TelemetryServiceType has version to be returned with Telemetry Service
TelemetryServiceType = "#TelemetryService.v1_3_1.TelemetryService"
TelemetryServiceType = "#TelemetryService.v1_3_2.TelemetryService"
//AggregationSourceType has version to be returned with AggregationSource Service
AggregationSourceType = "#AggregationSource.v1_2_0.AggregationSource"
AggregationSourceType = "#AggregationSource.v1_3_1.AggregationSource"
//ChassisType has version to be returned with Chassis Service
ChassisType = "#Chassis.v1_20_0.Chassis"
ChassisType = "#Chassis.v1_23_0.Chassis"
//ManagerAccountServiceType has version to be returned with RemoteAccountService response
ManagerAccountServiceType = "#AccountService.v1_13_0.AccountService"
// AggregateSubscriptionIndex is a index name which required for indexing
Expand Down Expand Up @@ -539,7 +539,7 @@ var Actions = map[ActionKey]ActionType{

// Types contains schema versions to be returned
var Types = map[string]string{
"EthernetInterfaces": "#EthernetInterface.v1_8_0.EthernetInterface",
"EthernetInterfaces": "#EthernetInterface.v1_10_0.EthernetInterface",
}

// RediscoverResources contains to get only these resource from the device when
Expand Down
Loading

0 comments on commit 4c1fd57

Please sign in to comment.