예제 #1
0
class ResourceAgentActionDto(DataTransferObject):
    # pylint: disable=too-many-instance-attributes

    # (start, stop, promote...), mandatory by both OCF 1.0 and 1.1
    name: str
    # mandatory by both OCF 1.0 and 1.1, sometimes not defined by agents
    timeout: Optional[str]
    # optional by both OCF 1.0 and 1.1
    interval: Optional[str]
    # optional by OCF 1.1
    # not allowed by OCF 1.0, defined in OCF 1.0 agents anyway
    role: Optional[str]
    # OCF name: 'start-delay', optional by both OCF 1.0 and 1.1
    start_delay: Optional[str] = field(metadata=meta(name="start-delay"))
    # optional by both OCF 1.0 and 1.1
    depth: Optional[str]
    # not allowed by any OCF, defined in OCF 1.0 agents anyway
    automatic: bool
    # not allowed by any OCF, defined in OCF 1.0 agents anyway
    on_target: bool
예제 #2
0
class AgentActionDto(DataTransferObject):
    # pylint: disable=too-many-instance-attributes

    # (start, stop, promote...), mandatory by both OCF 1.0 and 1.1
    name: str
    # mandatory by both OCF 1.0 and 1.1, sometimes not defined by agents
    timeout: Optional[str]
    # optional by both OCF 1.0 and 1.1
    interval: Optional[str]
    # optional by OCF 1.1
    # not allowed by OCF 1.0, defined in OCF 1.0 agents anyway
    role: Optional[str]
    # OCF name: 'start-delay', optional by both OCF 1.0 and 1.1
    start_delay: Optional[str] = field(metadata=meta(name="start-delay"))
    # optional by both OCF 1.0 and 1.1
    depth: Optional[str]
    # not allowed by any OCF, defined in OCF 1.0 agents anyway
    automatic: Optional[str]
    # not allowed by any OCF, defined in OCF 1.0 agents anyway
    on_target: Optional[str]
    # TODO remove, mirror of 'depth' only for pcs internal usage
    # pylint: disable=invalid-name
    OCF_CHECK_LEVEL: Optional[str]
예제 #3
0
class MyDto3(DataTransferObject):
    field_g: MyDto2 = field(metadata=meta(name="field-g"))
    field_h: List[MyDto2]
    field_i: int = field(metadata=meta(name="field-i"))
예제 #4
0
class MyDto2(DataTransferObject):
    field_d: int
    field_e: MyDto1 = field(metadata=meta(name="field-e"))
    field_f: int
예제 #5
0
class MyDto1(DataTransferObject):
    field_a: int
    field_b: int = field(metadata=meta(name="field-b"))
    field_c: int