seguro.commands.scheduler.compose_model.Service

class seguro.commands.scheduler.compose_model.Service(*, develop=None, deploy=None, annotations=None, attach=None, build=None, blkio_config=None, cap_add=None, cap_drop=None, cgroup=None, cgroup_parent=None, command=None, configs=None, container_name=None, cpu_count=None, cpu_percent=None, cpu_shares=None, cpu_quota=None, cpu_period=None, cpu_rt_period=None, cpu_rt_runtime=None, cpus=None, cpuset=None, credential_spec=None, depends_on=None, device_cgroup_rules=None, devices=None, dns=None, dns_opt=None, dns_search=None, domainname=None, entrypoint=None, env_file=None, environment=None, expose=None, extends=None, external_links=None, extra_hosts=None, group_add=None, healthcheck=None, hostname=None, image=None, init=None, ipc=None, isolation=None, labels=None, links=None, logging=None, mac_address=None, mem_limit=None, mem_reservation=None, mem_swappiness=None, memswap_limit=None, network_mode=None, networks=None, oom_kill_disable=None, oom_score_adj=None, pid=None, pids_limit=None, platform=None, ports=None, privileged=None, profiles=None, pull_policy=None, read_only=None, restart=None, runtime=None, scale=None, security_opt=None, shm_size=None, secrets=None, sysctls=None, stdin_open=None, stop_grace_period=None, stop_signal=None, storage_opt=None, tmpfs=None, tty=None, ulimits=None, user=None, uts=None, userns_mode=None, volumes=None, volumes_from=None, working_dir=None)[source]

Bases: BaseModel

Parameters:
  • develop (Development | None)

  • deploy (Deployment | None)

  • annotations (ListOrDict | None)

  • attach (bool | None)

  • build (str | Build | None)

  • blkio_config (BlkioConfig | None)

  • cap_add (list[str] | None)

  • cap_drop (list[str] | None)

  • cgroup (Cgroup | None)

  • cgroup_parent (str | None)

  • command (Command | None)

  • configs (ServiceConfigOrSecret | None)

  • container_name (str | None)

  • cpu_count (Annotated[int | None, Ge(ge=0)])

  • cpu_percent (Annotated[int | None, Ge(ge=0), Le(le=100)])

  • cpu_shares (float | str | None)

  • cpu_quota (float | str | None)

  • cpu_period (float | str | None)

  • cpu_rt_period (float | str | None)

  • cpu_rt_runtime (float | str | None)

  • cpus (float | str | None)

  • cpuset (str | None)

  • credential_spec (CredentialSpec | None)

  • depends_on (ListOfStrings | dict[str, DependsOn] | None)

  • device_cgroup_rules (ListOfStrings | None)

  • devices (list[str] | None)

  • dns (StringOrList | None)

  • dns_opt (list[str] | None)

  • dns_search (StringOrList | None)

  • domainname (str | None)

  • entrypoint (Command | None)

  • env_file (EnvFile | None)

  • environment (ListOrDict | None)

  • expose (list[str | float] | None)

  • extends (str | Extends | None)

  • external_links (list[str] | None)

  • extra_hosts (ListOrDict | None)

  • group_add (list[str | float] | None)

  • healthcheck (Healthcheck | None)

  • hostname (str | None)

  • image (str | None)

  • init (bool | None)

  • ipc (str | None)

  • isolation (str | None)

  • labels (ListOrDict | None)

  • links (list[str] | None)

  • logging (Logging | None)

  • mac_address (str | None)

  • mem_limit (float | str | None)

  • mem_reservation (str | int | None)

  • mem_swappiness (int | None)

  • memswap_limit (float | str | None)

  • network_mode (str | None)

  • networks (ListOfStrings | dict[str, Networks | None] | None)

  • oom_kill_disable (bool | None)

  • oom_score_adj (Annotated[int | None, Ge(ge=-1000), Le(le=1000)])

  • pid (str | None)

  • pids_limit (float | str | None)

  • platform (str | None)

  • ports (list[float | str | Ports] | None)

  • privileged (bool | None)

  • profiles (ListOfStrings | None)

  • pull_policy (PullPolicy | None)

  • read_only (bool | None)

  • restart (str | None)

  • runtime (str | None)

  • scale (int | None)

  • security_opt (list[str] | None)

  • shm_size (float | str | None)

  • secrets (ServiceConfigOrSecret | None)

  • sysctls (ListOrDict | None)

  • stdin_open (bool | None)

  • stop_grace_period (str | None)

  • stop_signal (str | None)

  • storage_opt (dict[str, Any] | None)

  • tmpfs (StringOrList | None)

  • tty (bool | None)

  • ulimits (Ulimits | None)

  • user (str | None)

  • uts (str | None)

  • userns_mode (str | None)

  • volumes (list[str | Volumes] | None)

  • volumes_from (list[str] | None)

  • working_dir (str | None)

__init__(**data)

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

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Parameters:

data (Any)

Return type:

None

Methods

__init__(**data)

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

construct([_fields_set])

copy(*[, include, exclude, update, deep])

Returns a copy of the model.

dict(*[, include, exclude, by_alias, ...])

from_orm(obj)

json(*[, include, exclude, by_alias, ...])

model_construct([_fields_set])

Creates a new instance of the Model class with validated data.

model_copy(*[, update, deep])

!!! abstract "Usage Documentation"

model_dump(*[, mode, include, exclude, ...])

!!! abstract "Usage Documentation"

model_dump_json(*[, indent, ensure_ascii, ...])

!!! abstract "Usage Documentation"

model_json_schema([by_alias, ref_template, ...])

Generates a JSON schema for a model class.

model_parametrized_name(params)

Compute the class name for parametrizations of generic classes.

model_post_init(context, /)

Override this method to perform additional initialization after __init__ and model_construct.

model_rebuild(*[, force, raise_errors, ...])

Try to rebuild the pydantic-core schema for the model.

model_validate(obj, *[, strict, extra, ...])

Validate a pydantic model instance.

model_validate_json(json_data, *[, strict, ...])

!!! abstract "Usage Documentation"

model_validate_strings(obj, *[, strict, ...])

Validate the given object with string data against the Pydantic model.

parse_file(path, *[, content_type, ...])

parse_obj(obj)

parse_raw(b, *[, content_type, encoding, ...])

schema([by_alias, ref_template])

schema_json(*[, by_alias, ref_template])

update_forward_refs(**localns)

validate(value)

Attributes

annotations: ListOrDict | None
attach: bool | None
blkio_config: BlkioConfig | None
build: str | Build | None
cap_add: list[str] | None
cap_drop: list[str] | None
cgroup: Cgroup | None
cgroup_parent: str | None
command: Command | None
configs: ServiceConfigOrSecret | None
container_name: str | None
cpu_count: int | None
cpu_percent: int | None
cpu_period: float | str | None
cpu_quota: float | str | None
cpu_rt_period: float | str | None
cpu_rt_runtime: float | str | None
cpu_shares: float | str | None
cpus: float | str | None
cpuset: str | None
credential_spec: CredentialSpec | None
depends_on: ListOfStrings | dict[str, DependsOn] | None
deploy: Deployment | None
develop: Development | None
device_cgroup_rules: ListOfStrings | None
devices: list[str] | None
dns: StringOrList | None
dns_opt: list[str] | None
domainname: str | None
entrypoint: Command | None
env_file: EnvFile | None
environment: ListOrDict | None
expose: list[str | float] | None
extends: str | Extends | None
extra_hosts: ListOrDict | None
group_add: list[str | float] | None
healthcheck: Healthcheck | None
hostname: str | None
image: str | None
init: bool | None
ipc: str | None
isolation: str | None
labels: ListOrDict | None
logging: Logging | None
mac_address: str | None
mem_limit: float | str | None
mem_reservation: str | int | None
mem_swappiness: int | None
memswap_limit: float | str | None
model_config = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

network_mode: str | None
networks: ListOfStrings | dict[str, Networks | None] | None
oom_kill_disable: bool | None
oom_score_adj: int | None
pid: str | None
pids_limit: float | str | None
platform: str | None
ports: list[float | str | Ports] | None
privileged: bool | None
profiles: ListOfStrings | None
pull_policy: PullPolicy | None
read_only: bool | None
restart: str | None
runtime: str | None
scale: int | None
secrets: ServiceConfigOrSecret | None
security_opt: list[str] | None
shm_size: float | str | None
stdin_open: bool | None
stop_grace_period: str | None
stop_signal: str | None
storage_opt: dict[str, Any] | None
sysctls: ListOrDict | None
tmpfs: StringOrList | None
tty: bool | None
ulimits: Ulimits | None
user: str | None
userns_mode: str | None
uts: str | None
volumes: list[str | Volumes] | None
volumes_from: list[str] | None
working_dir: str | None