idmtools.core.interfaces.ientity module¶
-
class
idmtools.core.interfaces.ientity.
IEntity
(_uid: uuid.UUID = None, platform_id: uuid.UUID = None, _platform: IPlatform = None, parent_id: uuid.UUID = None, _parent: IEntity = None, status: idmtools.core.enums.EntityStatus = None, tags: Dict[str, Any] = <factory>, item_type: idmtools.core.enums.ItemType = None, _platform_object: Any = None)¶ Bases:
idmtools.core.interfaces.iitem.IItem
Interface for all entities in the system.
-
platform_id
: uuid.UUID = None¶ ID of the platform
-
parent_id
: uuid.UUID = None¶ Parent id
-
status
: idmtools.core.enums.EntityStatus = None¶ Status of item
Tags for item
-
item_type
: idmtools.core.enums.ItemType = None¶ Item Type(Experiment, Suite, Asset, etc)
Shortcut to update the tags with the given dictionary :param tags: New tags
-
post_creation
() → None¶ Post creation hook for object Returns:
-
classmethod
from_id
(item_id: Union[str, uuid.UUID], platform: IPlatform = None, **kwargs) → IEntity¶ Load an item from an id
- Parameters
item_id – Id of item
platform – Platform. If not supplied, we check the current context
**kwargs – Optional platform args
- Returns
IEntity of object
-
property
parent
¶ Return parent object for item Returns:
-
property
platform
¶ Get objects platform
- Returns
Platform
-
get_platform_object
(force: bool = False, **kwargs)¶ Get the platform representation of an object
- Parameters
force – Force reload of platform object
**kwargs – Optional args used for specific platform behaviour
- Returns
Platform Object
-
property
done
¶ Returns if a item is done. For an item to be done, it should be in either failed or succeeded state
- Returns
True if status is succeeded or failed
-
property
succeeded
¶ Returns if an item has succeeded
- Returns
True if status is SUCCEEDED
-
property
failed
¶ Returns is a item has failed
- Returns
True if status is failed
-