Skip to content

Add AccessMode to Attribute #260

@shihab-dls

Description

@shihab-dls

Currently, we need to use this free function:

AccessModeType = Literal["r", "w", "rw", "d", "x"]


def _attribute_to_access(attribute: Attribute) -> AccessModeType:
    match attribute:
        case AttrRW():
            return "rw"
        case AttrR():
            return "r"
        case AttrW():
            return "w"
        case _:
            raise ValueError(f"Unknown attribute type {type(attribute)}")

to set the correct access mode in our PVA structure. It would be nicer if attributes had an access_mode property for this instead.

Acceptance Criteria

  • Attributes have an access_mode property, and uses of the _attribute_to_access free function are replaced.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions