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
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]
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"))
class MyDto2(DataTransferObject): field_d: int field_e: MyDto1 = field(metadata=meta(name="field-e")) field_f: int
class MyDto1(DataTransferObject): field_a: int field_b: int = field(metadata=meta(name="field-b")) field_c: int