|
Post by AMI_Mani on Oct 17, 2022 8:36:52 GMT
Hi, Assume we are giving task related to reboot of manager and starttime is coming correctly and endtime is coming is default value like 1999/1970 due to issue of connecting to NTP server, not set properly
In this case can we show endtime as null or endtime as 1999/1970 or skip showing EndTime attribute in task instance get response, it will be like below
StartTime": "2012-01-01T00:04:31-05:00 "
"EndTime": "1999-01-01T00:00:33-05:00 ",
Since schema for endtime is not allowing null(http://redfish.dmtf.org/schemas/v1/Task.v1_6_1.json), showing null may not be appropriate and also task status is completed, so we need to show EndTime attribute in response
EndTime: {
description: "The date and time when the task was completed. This property will only appear when the task is complete.",
format: "date-time",
longDescription: "This property shall indicate the date and time when the task was completed. This property shall not appear if the task is running or otherwise has not been completed. This property shall appear only if the TaskState is Completed, Killed, Cancelled, or Exception.",
readonly: true,
type: "string",
}
Please suggest whether any chance of changing schema to allow null value for EndTime attribute or show incorrect time(Endtime is less than StartTime) or skip showing EndTime for completed task ike this in task instance get response
Thanks, Mani
|
|
|
Post by jautor on Oct 17, 2022 15:31:20 GMT
I would expect that if the owner of the Task resource does not know the time that the Task completed (ended), it should simply not report that property. Returning NULL is not correct, because this is not an error or a temporary condition that would be resolved later.
Jeff
|
|
|
Post by AMI_Mani on Oct 17, 2022 19:08:13 GMT
Hi Jeff, Thanks for the reply. As per long description we have to show EndTime if task get completed. Can we skip(not show) EndTime attribute in Task instance response ?
longDescription: "This property shall indicate the date and time when the task was completed. This property shall not appear if the task is running or otherwise has not been completed. This property shall appear only if the TaskState is Completed, Killed, Cancelled, or Exception
Thanks, Mani
|
|
|
Post by AMI_Mani on Oct 17, 2022 19:08:23 GMT
Hi Jeff, Thanks for the reply. As per long description we have to show EndTime if task get completed. Can we skip(not show) EndTime attribute in Task instance response ?
longDescription: "This property shall indicate the date and time when the task was completed. This property shall not appear if the task is running or otherwise has not been completed. This property shall appear only if the TaskState is Completed, Killed, Cancelled, or Exception
Thanks, Mani
|
|
|
Post by mraineri on Oct 18, 2022 16:26:50 GMT
Yes, as Jeff said you can certainly skip the property if you don't have that detail for the resource. There's no requirement that the property is mandatory; there are only requirements for when it can be used.
|
|
|
Post by AMI_Mani on Oct 18, 2022 17:36:31 GMT
Thanks for confirmation and we will skip the attribute
Mani
|
|