Código fonte para asgard.backends.mesos.client.models.agent

from typing import Dict, Type

from pydantic import BaseModel as PydanticBaseModel

from asgard.backends.mesos.models.agent import MesosAgent as AsgardMesosAgent


[documentos]class MesosAgent(PydanticBaseModel): id: str hostname: str port: int attributes: Dict[str, str] version: str active: bool used_resources: Dict[str, str] resources: Dict[str, str]
[documentos] def to_asgard_model( self, class_: Type[AsgardMesosAgent] ) -> AsgardMesosAgent: return class_(**self.dict())