Skip to main content

Task

Struct Task 

Source
pub struct Task {
Show 14 fields pub base: Resource, pub task_state: Option<TaskState>, pub start_time: Option<DateTimeOffset>, pub end_time: Option<DateTimeOffset>, pub task_status: Option<Health>, pub messages: Option<Vec<Message>>, pub actions: Option<Actions>, pub task_monitor: Option<String>, pub payload: Option<Payload>, pub hide_payload: Option<Boolean>, pub percent_complete: Option<Option<Int64>>, pub estimated_duration: Option<Option<Duration>>, pub links: Option<Links>, pub sub_tasks: Option<NavProperty<TaskCollection>>,
}
Expand description

The Task schema contains information about a task that the Redfish task service schedules or executes. Tasks represent operations that take more time than a client typically wants to wait.

This resource contains a task for a Redfish implementation.

Fields§

§base: Resource

Base type

§task_state: Option<TaskState>

The state of the task.

This property shall indicate the state of the task.

§start_time: Option<DateTimeOffset>

The date and time when the task was started.

This property shall indicate the date and time when the task was started.

§end_time: Option<DateTimeOffset>

The date and time when the task was completed. This property will only appear when the task is complete.

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.

§task_status: Option<Health>

The completion status of the task.

This property shall contain the completion status of the task and shall not be set until the task completes. This property should contain Critical if one or more messages in the Messages array contains the severity Critical. This property should contain Warning if one or more messages in the Messages array contains the severity Warning and if no messages contain the severity Critical. This property should contain OK if all messages in the Messages array contain the severity OK or if the array is empty.

§messages: Option<Vec<Message>>

An array of messages associated with the task.

This property shall contain an array of messages associated with the task.

§actions: Option<Actions>

The available actions for this resource.

This property shall contain the available actions for this resource.

§task_monitor: Option<String>

The URI of the task monitor for this task.

This property shall contain a URI to task monitor as defined in the Redfish Specification.

§payload: Option<Payload>

The HTTP and JSON request payload details for this task, unless they are hidden from view by the service.

This object shall contain information detailing the HTTP and JSON request payload information for executing this task. This property shall not be included in the response if the HidePayload property is true.

§hide_payload: Option<Boolean>

An indication of whether the contents of the payload are hidden from view after the task has been created. If true, responses do not return the payload. If false, responses return the payload. If this property is not present when the task is created, the default is false.

This property shall indicate whether the contents of the payload should be hidden from view after the task has been created. If true, responses shall not return the Payload property. If false, responses shall return the Payload property. If this property is not present when the task is created, the default is false. This property shall be supported if the Payload property is supported.

§percent_complete: Option<Option<Int64>>

The completion percentage of this task.

This property shall indicate the completion progress of the task, reported in percent of completion, 0 to 100. If the task has not been started, the value shall be zero.

§estimated_duration: Option<Option<Duration>>

The estimated total time required to complete the task.

This property shall indicate the estimated total time needed to complete the task. The value is not expected to change while the task is in progress, but the service may update the value if it obtains new information that significantly changes the expected duration. Services should be conservative in the reported estimate and clients should treat this value as an estimate.

§links: Option<Links>

Contains references to other resources that are related to this resource.

The Links property, as described by the Redfish Specification, shall contain references to resources that are related to but are not contained by, or subordinate to, this resource.

§sub_tasks: Option<NavProperty<TaskCollection>>

The link to a collection of sub-tasks for this task.

This property shall contain a link to a resource collection of type TaskCollection. This property shall not be present if this resource represents a sub-task for a task.

Trait Implementations§

Source§

impl Debug for Task

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Deletable for Task

Source§

fn delete<B>( &self, bmc: &B, ) -> impl Future<Output = Result<ModificationResponse<Self>, <B as Bmc>::Error>> + Send
where B: Bmc,

Delete current entity.
Source§

impl<'de> Deserialize<'de> for Task

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl EntityTypeRef for Task

Source§

fn odata_id(&self) -> &ODataId

Value of @odata.id field of the Entity.
Source§

fn etag(&self) -> Option<&ODataETag>

Value of @odata.etag field of the Entity.
Source§

fn refresh<B>( &self, bmc: &B, ) -> impl Future<Output = Result<Arc<Self>, <B as Bmc>::Error>> + Send
where B: Bmc, Self: for<'de> Deserialize<'de> + 'static,

Refresh the entity by fetching it again from the BMC.
Source§

impl Expandable for Task

Source§

fn expand<B>( &self, bmc: &B, query: ExpandQuery, ) -> impl Future<Output = Result<Arc<Self>, <B as Bmc>::Error>> + Send
where B: Bmc,

Expand the entity according to the provided query.
Source§

impl Send for Task

SAFETY: All generated data types are Send

Source§

impl Sync for Task

SAFETY: All generated data types are Sync

Auto Trait Implementations§

§

impl Freeze for Task

§

impl RefUnwindSafe for Task

§

impl Unpin for Task

§

impl UnsafeUnpin for Task

§

impl UnwindSafe for Task

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more