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__ inherited

See collections.abc.Mapping.__reversed__

Properties

existing_properties

Trim the properties to only contain the “public” ones, i.e. the ones that have not been deleted.

Methods

__and__()

Combine two instances.

__bool__()

__getitem__()

__iter__()

__len__()

from_polymorphic()

Alternative constructor with polymorphic input:.

get_defaults()

Get the default JSON object for the phase with the given user-derived JSON properties.

to_json()

Output a JSON object with the values of all properties, including defaults if a given property is not set.

HASH_COERCE() inherited

Used to coerce the values of self.__dict__ to hashable values.

__class_getitem__() inherited

See collections.abc.Iterable.__class_getitem__()

__contains__() inherited

See collections.abc.Mapping.__contains__()

get() inherited

See collections.abc.Mapping.get()

items() inherited

See collections.abc.Mapping.items()

keys() inherited

See collections.abc.Mapping.keys()

values() inherited

See collections.abc.Mapping.values()

Attributes#

RTAPhaseProperties.__reversed__ = None#

Properties#

property RTAPhaseProperties.existing_properties[source]#

Trim the properties to only contain the “public” ones, i.e. the ones that have not been deleted.

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 from self will be the left operand.

RTAPhaseProperties.__bool__()[source]#
RTAPhaseProperties.__getitem__(key)[source]#
RTAPhaseProperties.__iter__()[source]#
RTAPhaseProperties.__len__()[source]#
classmethod RTAPhaseProperties.from_polymorphic(obj)[source]#

Alternative constructor with polymorphic input:

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 the policy.

  • trim_defaults (bool) – If True, default values that are already set in properties 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()