lisa.wlgen.rta.DeletedProperty#

class lisa.wlgen.rta.DeletedProperty(key)[source]#

Bases: ContaminatingProperty

Forcefully delete the given property, recursively for all subtrees.

Parameters:

key (str) – Key of the property to delete.

See also

delete()

Note

The property is not actually deleted but just replaced by an instance of this class, which will have specific handling in relevant parts of the code.

Classes

__class__ inherited

Metaclass for properties.

Attributes

KEY

Subclasses can override this attribute so that PropertyBase.from_key() knows that it can call their _from_key() method for that key.

Properties

val

Value “payload” of the property.

key inherited

Key of the instance.

Methods

__and__()

Combine two instances of the same property together.

__bool__()

__rand__()

from_key()

Alternative constructor that is available with the same signature for all properties.

HASH_COERCE() inherited

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

find_cls() inherited

Find which subclass can handle key.

Classes#

DeletedProperty.__class__#

alias of PropertyMeta

Attributes#

DeletedProperty.KEY = None#

Subclasses can override this attribute so that PropertyBase.from_key() knows that it can call their _from_key() method for that key.

Note

This class attribute will not be inherited automatically so that each class can be uniquely identified by its key. Subclass that do not override the value explicitly will get None.

Properties#

property DeletedProperty.val[source]#

Value “payload” of the property.

Ideally, it should be a valid value that can be given to from_key(), but it’s not mandatory. For complex properties that are not isomorphic to a Python basic type (int, tuple etc.), self should be returned.

property DeletedProperty.key#

Inherited property, see lisa.wlgen.rta.PropertyBase.key

Key of the instance.

Methods#

DeletedProperty.__and__(other)[source]#

Combine two instances of the same property together.

This is used to combine properties at the various levels of the RTAPhaseTree tree, on each path from the root to the leaves. It is guaranteed that the instance closer to the root will be self and the one closer to the leaves will be other.

If the property is a constraint, a good implementation should combine two instances by applying the strongest constraint. For example, CPU affinity are combined by taking the intersection of allowed CPUs.

If the property is some sort of “dummy” structure, it can make sense to allow the instance closer to the root of the tree to override the set members in the instance closer to the leaves.

Otherwise, it’s probably best to just bail with ValueError with a message explaining that there is a conflict.

DeletedProperty.__bool__()[source]#
DeletedProperty.__rand__(other)[source]#
classmethod DeletedProperty.from_key(key, val)[source]#

Alternative constructor that is available with the same signature for all properties.

Parameters:
  • key (str) – Key passed by the user. It will be checked with _check_key() before building an instance.

  • val (object) – Value passed by the user.

DeletedProperty.HASH_COERCE(x, coerce)#

Inherited method, see lisa.utils.SimpleHash.HASH_COERCE()

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

classmethod DeletedProperty.find_cls(key)#

Inherited method, see lisa.wlgen.rta.PropertyBase.find_cls()

Find which subclass can handle key.