From a0b7bd91ea304d68367d126a91029394f897c41a Mon Sep 17 00:00:00 2001 From: sonicaj Date: Tue, 3 Dec 2024 15:12:11 +0500 Subject: [PATCH] Do not report docker address pool as ip* objects in config (#15079) This commit adds changes to not report docker address pool fields as ip* objects for now, this would mean that all consumers would need to update their usages and we don't have a precedent yet in middleware - so for now we will report them as string as they were before. --- src/middlewared/middlewared/api/v25_04_0/docker.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/middlewared/middlewared/api/v25_04_0/docker.py b/src/middlewared/middlewared/api/v25_04_0/docker.py index 64b311a49983..76774851fc7e 100644 --- a/src/middlewared/middlewared/api/v25_04_0/docker.py +++ b/src/middlewared/middlewared/api/v25_04_0/docker.py @@ -33,6 +33,14 @@ class DockerEntry(BaseModel): dataset: NonEmptyString | None pool: NonEmptyString | None nvidia: bool + address_pools: list[dict] + cidr_v6: str + + +@single_argument_args('docker_update') +class DockerUpdateArgs(DockerEntry, metaclass=ForUpdateMetaclass): + id: Excluded = excluded_field() + dataset: Excluded = excluded_field() address_pools: list[AddressPool] cidr_v6: IPvAnyInterface @@ -46,12 +54,6 @@ def validate_ipv6(cls, v): return v -@single_argument_args('docker_update') -class DockerUpdateArgs(DockerEntry, metaclass=ForUpdateMetaclass): - id: Excluded = excluded_field() - dataset: Excluded = excluded_field() - - class DockerUpdateResult(BaseModel): result: DockerEntry