This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
devicehub-teal/docs/actions.rst

67 lines
2.2 KiB
ReStructuredText
Raw Normal View History

Actions
2019-03-26 09:55:38 +00:00
#######
Actions are events performed to devices, changing their **state**.
Actions can have attributes defining
**where** it happened, **who** performed them, **when**, etc.
Actions are stored in a log for each device. An exemplifying action
can be ``Repair``, which dictates that a device has been repaired,
2019-03-26 09:55:38 +00:00
after this action, the device is in the ``repaired`` state. Another
example is performing a ``Sell`` to agent 1 (now this agent *owns*
the device), and then performing another ``Sell`` to agent 2 (now
agent 2 is the owner).
Devicehub actions inherit from `schema actions
<http://schema.org/Action>`_, are written in Pascal case and using
a verb in infinitive. Some verbs represent the willingness or
assignment to perform an action; ``ToRepair`` states that the device
is going to be / must be repaired, whereas ``Repair`` states
that the reparation happened. The former actions have the preposition
*To* prefixing the verb.
2019-03-26 09:55:38 +00:00
:ref:`actions:Actions` and :ref:`states:States` affect devices in
different ways or **dimensions**.
For example, ``Repair`` affects the **physical** dimension of a device,
and ``Sell`` the **political** dimension of a device. A device
can be in several states at the same time, one per dimension; ie. a
device can be ``repaired`` (physical) and ``reserved`` (political),
but not ``repaired`` and ``disposed`` at the same time:
- Physical actions: The following actions describe and react on the
Physical condition of the devices.
- ToPrepare and prepare.
- ToRepair, Repair
- ReadyToUse
- Live
- DisposeWaste, Recover
- Association actions: Actions that change the associations users have with devices;
2019-03-26 09:55:38 +00:00
ie. the **owners**, **usufructuarees** (*from usufruct*), **reservees** (*from reserve*),
and **physical possessors**.
- Trade
- Transfer
- Organize
2018-11-17 16:03:03 +00:00
- Internal state actions: Actions providing metadata about devices that don't usually change
their state.
2018-11-17 16:03:03 +00:00
- Snapshot
- Add, remove
- Erase
- Install
- Test
- Benchmark
- Rate
- Price
The following index has all the actions (please note we are moving from calling them
``Event`` to call them ``Action``):
2019-03-26 09:55:38 +00:00
Schema
******
2019-03-26 09:55:38 +00:00
.. dhlist::
:module: ereuse_devicehub.resources.event.schemas