|
Post by AMI_Mani on Oct 21, 2023 17:11:29 GMT
Hi,
As per Power.v1_5_4.PowerControl IntervalInMin mentioned as interger,(copied at end of post) it's possible to set second value as sampling period. So when we have value as 5 seconds, it will come as float value only
{
"@odata.id": "/redfish/v1/Chassis/Self/Power#/PowerControl/0",
"MemberId": "0",
"Name": "Chassis Power Control",
"PhysicalContext": "Intake",
"PowerLimit": {
"CorrectionInMs": 1000,
"LimitException": "HardPowerOff",
"LimitInWatts": 500
},
"PowerMetrics": {
"AverageConsumedWatts": 0,
"IntervalInMin": 0.08,
"MaxConsumedWatts": 0,
"MinConsumedWatts": 0
},
"RelatedItem@odata.count": 0
}
Redfish service Validator is throwing error as ERROR - IntervalInMin: Expected int, got type class 'float' for above response
Is it possible to change type as Edm.Int64 to Edm.Decimal for IntervalInMin attribute in schema(Power.xml)
"IntervalInMin": {
"description": "The time interval, or window, over which the power metrics are measured.",
"longDescription": "This property shall represent the time interval or window, in minutes, over which the power metrics are measured.",
"minimum": 0,
"readonly": true,
"type": [
"integer",
"null"
],
"units": "min"
},
Thanks, Mani
|
|
|
Post by jautor on Oct 21, 2023 21:44:28 GMT
I'm afraid that probably won't be possible. That schema has been around for 8 years, so changing the type to relax the format is very likely to cause compatibility issues with client software. As the Power schema has also been deprecated, I would suggest looking at implementing that functionality in the Sensor, PowerSubsystem, and/or EnvironmentMetrics.
Jeff
|
|