lisa.wlgen.rta.RTAPhaseProperties#
- class lisa.wlgen.rta.RTAPhaseProperties(properties)[source]#
Bases:
SimpleHash
,Mapping
Hold the properties of an
RTAPhaseBase
.- Parameters:
properties (list(PropertyBase)) – List of properties.
Attributes
__reversed__
inheritedSee
collections.abc.Mapping.__reversed__
Properties
Trim the properties to only contain the “public” ones, i.e. the ones that have not been deleted.
Methods
Combine two instances.
Alternative constructor with polymorphic input:.
Get the default JSON object for the phase with the given user-derived JSON
properties
.Output a JSON object with the values of all properties, including defaults if a given property is not set.
HASH_COERCE()
inheritedUsed to coerce the values of
self.__dict__
to hashable values.__class_getitem__()
inheritedSee
collections.abc.Iterable.__class_getitem__()
__contains__()
inheritedSee
collections.abc.Mapping.__contains__()
get()
inheritedSee
collections.abc.Mapping.get()
items()
inheritedSee
collections.abc.Mapping.items()
keys()
inheritedSee
collections.abc.Mapping.keys()
values()
inheritedSee
collections.abc.Mapping.values()
Attributes#
- RTAPhaseProperties.__reversed__ = None#
Properties#
Methods#
- RTAPhaseProperties.__and__(other)[source]#
Combine two instances.
Properties are merged according to the following rules:
Take the value as-is for all the keys that only appear in one of them.
For values set in both properties, combine them with
&
operator. The value coming fromself
will be the left operand.
- classmethod RTAPhaseProperties.from_polymorphic(obj)[source]#
Alternative constructor with polymorphic input:
None
: equivalent to an empty list.RTAPhaseProperties
: taken as-is.Mapping
: each key/value pair is either:the value is a
PropertyBase
: it’s taken as-isthe value is a
PlaceHolderValue
: the property is created using itsPROPERTY_CLS.from_key
method.otherwise, an instance of the appropriate class is built by
PropertyBase.from_key()
.
- classmethod RTAPhaseProperties.get_defaults(plat_info, properties=None, trim_defaults=True)[source]#
Get the default JSON object for the phase with the given user-derived JSON
properties
.- Parameters:
plat_info (lisa.platforms.platinfo.PlatformInfo) – Platform information used to compute some defaults values, such as the default CPU affinity set based on the number of CPUs.
properties (dict(str, object)) – JSON object derived from user-provided properties. It is used to compute some context-sensitive defaults, such as the
priority
that depends on thepolicy
.trim_defaults (bool) – If
True
, default values that are already set inproperties
will be omitted.
- RTAPhaseProperties.to_json(plat_info, **kwargs)[source]#
Output a JSON object with the values of all properties, including defaults if a given property is not set.
- RTAPhaseProperties.HASH_COERCE(x, coerce)#
Inherited method, see
lisa.utils.SimpleHash.HASH_COERCE()
Used to coerce the values of
self.__dict__
to hashable values.
- classmethod RTAPhaseProperties.__class_getitem__()#
Inherited method, see
collections.abc.Iterable.__class_getitem__()
- RTAPhaseProperties.__contains__()#
Inherited method, see
collections.abc.Mapping.__contains__()
- RTAPhaseProperties.get()#
Inherited method, see
collections.abc.Mapping.get()
- RTAPhaseProperties.items()#
Inherited method, see
collections.abc.Mapping.items()
- RTAPhaseProperties.keys()#
Inherited method, see
collections.abc.Mapping.keys()
- RTAPhaseProperties.values()#
Inherited method, see
collections.abc.Mapping.values()