daemon.models.ports module

class daemon.models.ports.Ports(\*data*)[source]

Bases: pydantic.main.BaseModel

Port names

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

  • port_in: Optional[int]

  • port_expose: Optional[int]

class daemon.models.ports.PortMapping(\*data*)[source]

Bases: pydantic.main.BaseModel

Used to set the additional port mappings in partial-daemon

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

class daemon.models.ports.PortMappings(\*data*)[source]

Bases: pydantic.main.BaseModel

Pydantic model for list of PortMappings

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

  • property ports: List[int]

    Get all ports in current model

    • Return type

      List[int]

      Returns

      list of ports

  • property docker_ports: Dict[str, int]

    Get all ports for docker client

    • Return type

      Dict[str, int]

      Returns

      dict of ports for docker-py syntax

  • property deployment_names: List[str]

    Get all deployment names

    • Return type

      List[str]

      Returns

      unique list of deployment names

  • property pod_names: List[str]

    Get all pod names

    • Return type

      List[str]

      Returns

      list of pod names