From e4729e55095ab4080a53e00cc1f3c3f63b3ba454 Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Mon, 1 Jun 2026 12:57:34 +0200 Subject: [PATCH 1/2] Update connect-python to v0.10.1 --- go.mod | 6 +++--- go.sum | 12 ++++++------ proto/buf.gen.yaml | 2 +- python/metalstack/admin/v2/audit_connect.py | 15 +++++++++++++-- python/metalstack/admin/v2/component_connect.py | 15 +++++++++++++-- python/metalstack/admin/v2/filesystem_connect.py | 15 +++++++++++++-- python/metalstack/admin/v2/image_connect.py | 15 +++++++++++++-- python/metalstack/admin/v2/ip_connect.py | 15 +++++++++++++-- python/metalstack/admin/v2/machine_connect.py | 15 +++++++++++++-- python/metalstack/admin/v2/network_connect.py | 15 +++++++++++++-- python/metalstack/admin/v2/partition_connect.py | 15 +++++++++++++-- python/metalstack/admin/v2/project_connect.py | 15 +++++++++++++-- python/metalstack/admin/v2/size_connect.py | 15 +++++++++++++-- .../admin/v2/size_imageconstraint_connect.py | 15 +++++++++++++-- .../admin/v2/size_reservation_connect.py | 15 +++++++++++++-- python/metalstack/admin/v2/switch_connect.py | 15 +++++++++++++-- python/metalstack/admin/v2/task_connect.py | 15 +++++++++++++-- python/metalstack/admin/v2/tenant_connect.py | 15 +++++++++++++-- python/metalstack/admin/v2/token_connect.py | 15 +++++++++++++-- python/metalstack/admin/v2/vpn_connect.py | 15 +++++++++++++-- python/metalstack/api/v2/audit_connect.py | 15 +++++++++++++-- python/metalstack/api/v2/filesystem_connect.py | 15 +++++++++++++-- python/metalstack/api/v2/health_connect.py | 15 +++++++++++++-- python/metalstack/api/v2/image_connect.py | 15 +++++++++++++-- python/metalstack/api/v2/ip_connect.py | 15 +++++++++++++-- python/metalstack/api/v2/machine_connect.py | 15 +++++++++++++-- python/metalstack/api/v2/method_connect.py | 15 +++++++++++++-- python/metalstack/api/v2/network_connect.py | 15 +++++++++++++-- python/metalstack/api/v2/partition_connect.py | 15 +++++++++++++-- python/metalstack/api/v2/project_connect.py | 15 +++++++++++++-- python/metalstack/api/v2/size_connect.py | 15 +++++++++++++-- .../api/v2/size_imageconstraint_connect.py | 15 +++++++++++++-- .../metalstack/api/v2/size_reservation_connect.py | 15 +++++++++++++-- python/metalstack/api/v2/tenant_connect.py | 15 +++++++++++++-- python/metalstack/api/v2/token_connect.py | 15 +++++++++++++-- python/metalstack/api/v2/user_connect.py | 15 +++++++++++++-- python/metalstack/api/v2/version_connect.py | 15 +++++++++++++-- python/metalstack/infra/v2/bmc_connect.py | 15 +++++++++++++-- python/metalstack/infra/v2/boot_connect.py | 15 +++++++++++++-- python/metalstack/infra/v2/component_connect.py | 15 +++++++++++++-- python/metalstack/infra/v2/event_connect.py | 15 +++++++++++++-- python/metalstack/infra/v2/switch_connect.py | 15 +++++++++++++-- python/setup.py | 4 ++-- 43 files changed, 519 insertions(+), 90 deletions(-) diff --git a/go.mod b/go.mod index ab2c1032..beec1a71 100644 --- a/go.mod +++ b/go.mod @@ -27,10 +27,10 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/stretchr/objx v0.5.3 // indirect go.yaml.in/yaml/v3 v3.0.4 // indirect - golang.org/x/exp v0.0.0-20260508232706-74f9aab9d74a // indirect + golang.org/x/exp v0.0.0-20260529124908-c761662dc8c9 // indirect golang.org/x/text v0.37.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20260523011958-0a33c5d7ca68 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20260523011958-0a33c5d7ca68 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20260526163538-3dc84a4a5aaa // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20260526163538-3dc84a4a5aaa // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 3156022c..7d5c6858 100644 --- a/go.sum +++ b/go.sum @@ -51,14 +51,14 @@ github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= -golang.org/x/exp v0.0.0-20260508232706-74f9aab9d74a h1:+3jdDGGB8NGb1Zktc737jlt3/A5f6UlwSzmvqUuufxw= -golang.org/x/exp v0.0.0-20260508232706-74f9aab9d74a/go.mod h1:d2fgXJLVs4dYDHUk5lwMIfzRzSrWCfGZb0ZqeLa/Vcw= +golang.org/x/exp v0.0.0-20260529124908-c761662dc8c9 h1:4d4PbuBNwaxMXkXI8yiIYjydtMU+04RHeuSxJdgKftM= +golang.org/x/exp v0.0.0-20260529124908-c761662dc8c9/go.mod h1:d2fgXJLVs4dYDHUk5lwMIfzRzSrWCfGZb0ZqeLa/Vcw= golang.org/x/text v0.37.0 h1:Cqjiwd9eSg8e0QAkyCaQTNHFIIzWtidPahFWR83rTrc= golang.org/x/text v0.37.0/go.mod h1:a5sjxXGs9hsn/AJVwuElvCAo9v8QYLzvavO5z2PiM38= -google.golang.org/genproto/googleapis/api v0.0.0-20260523011958-0a33c5d7ca68 h1:WVVw1Nl19li0fMX++FJ3ye1z9+S1N35QODDy5qpnaXw= -google.golang.org/genproto/googleapis/api v0.0.0-20260523011958-0a33c5d7ca68/go.mod h1:1dCETSCY2YKZNXQE3h4fun3TYwF5p8jejRKZgfWAgAY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20260523011958-0a33c5d7ca68 h1:PvEgGJf9C/1u5CHkInMg7UFYYUoiaQmW2LbtH0pjB78= -google.golang.org/genproto/googleapis/rpc v0.0.0-20260523011958-0a33c5d7ca68/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8= +google.golang.org/genproto/googleapis/api v0.0.0-20260526163538-3dc84a4a5aaa h1:Kjn0N0tCrDgiAFW+lGO4JZ3ck44CehvJQMAwj9QF0G8= +google.golang.org/genproto/googleapis/api v0.0.0-20260526163538-3dc84a4a5aaa/go.mod h1:q4lMZS6kskjT5HvCPrnnypcDPVJqT/f4nfxmkE7gryY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260526163538-3dc84a4a5aaa h1:mZHHdPZl0dbGHCflZgAq/Q468DWVFcU2whhB2KAo8fk= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260526163538-3dc84a4a5aaa/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8= google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/proto/buf.gen.yaml b/proto/buf.gen.yaml index 713ab183..869da012 100644 --- a/proto/buf.gen.yaml +++ b/proto/buf.gen.yaml @@ -24,7 +24,7 @@ plugins: out: ../python - remote: buf.build/protocolbuffers/pyi:v35.0 out: ../python - - remote: buf.build/connectrpc/python:v0.8.1 + - remote: buf.build/connectrpc/python:v0.10.1 out: ../python # js - remote: buf.build/bufbuild/es:v2.12.0 diff --git a/python/metalstack/admin/v2/audit_connect.py b/python/metalstack/admin/v2/audit_connect.py index 77ad12b2..c9a4cc70 100644 --- a/python/metalstack/admin/v2/audit_connect.py +++ b/python/metalstack/admin/v2/audit_connect.py @@ -7,6 +7,8 @@ from connectrpc.client import ConnectClient, ConnectClientSync from connectrpc.code import Code +from connectrpc.codec import Codec +from connectrpc.compression import Compression from connectrpc.errors import ConnectError from connectrpc.interceptor import Interceptor, InterceptorSync from connectrpc.method import IdempotencyLevel, MethodInfo @@ -24,7 +26,7 @@ async def list(self, request: metalstack_dot_admin_dot_v2_dot_audit__pb2.AuditSe class AuditServiceASGIApplication(ConnectASGIApplication[AuditService]): - def __init__(self, service: AuditService | AsyncGenerator[AuditService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: AuditService | AsyncGenerator[AuditService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( service=service, endpoints=lambda svc: { @@ -51,6 +53,8 @@ def __init__(self, service: AuditService | AsyncGenerator[AuditService], *, inte }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -101,6 +105,9 @@ async def list( ) + + + class AuditServiceSync(Protocol): def get(self, request: metalstack_dot_admin_dot_v2_dot_audit__pb2.AuditServiceGetRequest, ctx: RequestContext) -> metalstack_dot_admin_dot_v2_dot_audit__pb2.AuditServiceGetResponse: raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") @@ -109,7 +116,7 @@ def list(self, request: metalstack_dot_admin_dot_v2_dot_audit__pb2.AuditServiceL class AuditServiceWSGIApplication(ConnectWSGIApplication): - def __init__(self, service: AuditServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: AuditServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( endpoints={ "/metalstack.admin.v2.AuditService/Get": EndpointSync.unary( @@ -135,6 +142,8 @@ def __init__(self, service: AuditServiceSync, interceptors: Iterable[Interceptor }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -183,3 +192,5 @@ def list( headers=headers, timeout_ms=timeout_ms, ) + + diff --git a/python/metalstack/admin/v2/component_connect.py b/python/metalstack/admin/v2/component_connect.py index 45b5eb06..af2734c1 100644 --- a/python/metalstack/admin/v2/component_connect.py +++ b/python/metalstack/admin/v2/component_connect.py @@ -7,6 +7,8 @@ from connectrpc.client import ConnectClient, ConnectClientSync from connectrpc.code import Code +from connectrpc.codec import Codec +from connectrpc.compression import Compression from connectrpc.errors import ConnectError from connectrpc.interceptor import Interceptor, InterceptorSync from connectrpc.method import IdempotencyLevel, MethodInfo @@ -27,7 +29,7 @@ async def list(self, request: metalstack_dot_admin_dot_v2_dot_component__pb2.Com class ComponentServiceASGIApplication(ConnectASGIApplication[ComponentService]): - def __init__(self, service: ComponentService | AsyncGenerator[ComponentService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: ComponentService | AsyncGenerator[ComponentService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( service=service, endpoints=lambda svc: { @@ -64,6 +66,8 @@ def __init__(self, service: ComponentService | AsyncGenerator[ComponentService], }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -134,6 +138,9 @@ async def list( ) + + + class ComponentServiceSync(Protocol): def get(self, request: metalstack_dot_admin_dot_v2_dot_component__pb2.ComponentServiceGetRequest, ctx: RequestContext) -> metalstack_dot_admin_dot_v2_dot_component__pb2.ComponentServiceGetResponse: raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") @@ -144,7 +151,7 @@ def list(self, request: metalstack_dot_admin_dot_v2_dot_component__pb2.Component class ComponentServiceWSGIApplication(ConnectWSGIApplication): - def __init__(self, service: ComponentServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: ComponentServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( endpoints={ "/metalstack.admin.v2.ComponentService/Get": EndpointSync.unary( @@ -180,6 +187,8 @@ def __init__(self, service: ComponentServiceSync, interceptors: Iterable[Interce }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -248,3 +257,5 @@ def list( headers=headers, timeout_ms=timeout_ms, ) + + diff --git a/python/metalstack/admin/v2/filesystem_connect.py b/python/metalstack/admin/v2/filesystem_connect.py index 7eb1bc44..18b1283d 100644 --- a/python/metalstack/admin/v2/filesystem_connect.py +++ b/python/metalstack/admin/v2/filesystem_connect.py @@ -7,6 +7,8 @@ from connectrpc.client import ConnectClient, ConnectClientSync from connectrpc.code import Code +from connectrpc.codec import Codec +from connectrpc.compression import Compression from connectrpc.errors import ConnectError from connectrpc.interceptor import Interceptor, InterceptorSync from connectrpc.method import IdempotencyLevel, MethodInfo @@ -30,7 +32,7 @@ async def match(self, request: metalstack_dot_admin_dot_v2_dot_filesystem__pb2.F class FilesystemServiceASGIApplication(ConnectASGIApplication[FilesystemService]): - def __init__(self, service: FilesystemService | AsyncGenerator[FilesystemService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: FilesystemService | AsyncGenerator[FilesystemService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( service=service, endpoints=lambda svc: { @@ -77,6 +79,8 @@ def __init__(self, service: FilesystemService | AsyncGenerator[FilesystemService }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -167,6 +171,9 @@ async def match( ) + + + class FilesystemServiceSync(Protocol): def create(self, request: metalstack_dot_admin_dot_v2_dot_filesystem__pb2.FilesystemServiceCreateRequest, ctx: RequestContext) -> metalstack_dot_admin_dot_v2_dot_filesystem__pb2.FilesystemServiceCreateResponse: raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") @@ -179,7 +186,7 @@ def match(self, request: metalstack_dot_admin_dot_v2_dot_filesystem__pb2.Filesys class FilesystemServiceWSGIApplication(ConnectWSGIApplication): - def __init__(self, service: FilesystemServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: FilesystemServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( endpoints={ "/metalstack.admin.v2.FilesystemService/Create": EndpointSync.unary( @@ -225,6 +232,8 @@ def __init__(self, service: FilesystemServiceSync, interceptors: Iterable[Interc }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -313,3 +322,5 @@ def match( headers=headers, timeout_ms=timeout_ms, ) + + diff --git a/python/metalstack/admin/v2/image_connect.py b/python/metalstack/admin/v2/image_connect.py index 0ea45643..dc7f25c0 100644 --- a/python/metalstack/admin/v2/image_connect.py +++ b/python/metalstack/admin/v2/image_connect.py @@ -7,6 +7,8 @@ from connectrpc.client import ConnectClient, ConnectClientSync from connectrpc.code import Code +from connectrpc.codec import Codec +from connectrpc.compression import Compression from connectrpc.errors import ConnectError from connectrpc.interceptor import Interceptor, InterceptorSync from connectrpc.method import IdempotencyLevel, MethodInfo @@ -30,7 +32,7 @@ async def usage(self, request: metalstack_dot_admin_dot_v2_dot_image__pb2.ImageS class ImageServiceASGIApplication(ConnectASGIApplication[ImageService]): - def __init__(self, service: ImageService | AsyncGenerator[ImageService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: ImageService | AsyncGenerator[ImageService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( service=service, endpoints=lambda svc: { @@ -77,6 +79,8 @@ def __init__(self, service: ImageService | AsyncGenerator[ImageService], *, inte }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -167,6 +171,9 @@ async def usage( ) + + + class ImageServiceSync(Protocol): def create(self, request: metalstack_dot_admin_dot_v2_dot_image__pb2.ImageServiceCreateRequest, ctx: RequestContext) -> metalstack_dot_admin_dot_v2_dot_image__pb2.ImageServiceCreateResponse: raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") @@ -179,7 +186,7 @@ def usage(self, request: metalstack_dot_admin_dot_v2_dot_image__pb2.ImageService class ImageServiceWSGIApplication(ConnectWSGIApplication): - def __init__(self, service: ImageServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: ImageServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( endpoints={ "/metalstack.admin.v2.ImageService/Create": EndpointSync.unary( @@ -225,6 +232,8 @@ def __init__(self, service: ImageServiceSync, interceptors: Iterable[Interceptor }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -313,3 +322,5 @@ def usage( headers=headers, timeout_ms=timeout_ms, ) + + diff --git a/python/metalstack/admin/v2/ip_connect.py b/python/metalstack/admin/v2/ip_connect.py index 5d8701e5..2eab3807 100644 --- a/python/metalstack/admin/v2/ip_connect.py +++ b/python/metalstack/admin/v2/ip_connect.py @@ -7,6 +7,8 @@ from connectrpc.client import ConnectClient, ConnectClientSync from connectrpc.code import Code +from connectrpc.codec import Codec +from connectrpc.compression import Compression from connectrpc.errors import ConnectError from connectrpc.interceptor import Interceptor, InterceptorSync from connectrpc.method import IdempotencyLevel, MethodInfo @@ -21,7 +23,7 @@ async def list(self, request: metalstack_dot_admin_dot_v2_dot_ip__pb2.IPServiceL class IPServiceASGIApplication(ConnectASGIApplication[IPService]): - def __init__(self, service: IPService | AsyncGenerator[IPService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: IPService | AsyncGenerator[IPService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( service=service, endpoints=lambda svc: { @@ -38,6 +40,8 @@ def __init__(self, service: IPService | AsyncGenerator[IPService], *, intercepto }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -68,13 +72,16 @@ async def list( ) + + + class IPServiceSync(Protocol): def list(self, request: metalstack_dot_admin_dot_v2_dot_ip__pb2.IPServiceListRequest, ctx: RequestContext) -> metalstack_dot_admin_dot_v2_dot_ip__pb2.IPServiceListResponse: raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") class IPServiceWSGIApplication(ConnectWSGIApplication): - def __init__(self, service: IPServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: IPServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( endpoints={ "/metalstack.admin.v2.IPService/List": EndpointSync.unary( @@ -90,6 +97,8 @@ def __init__(self, service: IPServiceSync, interceptors: Iterable[InterceptorSyn }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -118,3 +127,5 @@ def list( headers=headers, timeout_ms=timeout_ms, ) + + diff --git a/python/metalstack/admin/v2/machine_connect.py b/python/metalstack/admin/v2/machine_connect.py index 42021a30..5d425ff0 100644 --- a/python/metalstack/admin/v2/machine_connect.py +++ b/python/metalstack/admin/v2/machine_connect.py @@ -7,6 +7,8 @@ from connectrpc.client import ConnectClient, ConnectClientSync from connectrpc.code import Code +from connectrpc.codec import Codec +from connectrpc.compression import Compression from connectrpc.errors import ConnectError from connectrpc.interceptor import Interceptor, InterceptorSync from connectrpc.method import IdempotencyLevel, MethodInfo @@ -36,7 +38,7 @@ async def console_password(self, request: metalstack_dot_admin_dot_v2_dot_machin class MachineServiceASGIApplication(ConnectASGIApplication[MachineService]): - def __init__(self, service: MachineService | AsyncGenerator[MachineService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: MachineService | AsyncGenerator[MachineService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( service=service, endpoints=lambda svc: { @@ -103,6 +105,8 @@ def __init__(self, service: MachineService | AsyncGenerator[MachineService], *, }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -233,6 +237,9 @@ async def console_password( ) + + + class MachineServiceSync(Protocol): def get(self, request: metalstack_dot_admin_dot_v2_dot_machine__pb2.MachineServiceGetRequest, ctx: RequestContext) -> metalstack_dot_admin_dot_v2_dot_machine__pb2.MachineServiceGetResponse: raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") @@ -249,7 +256,7 @@ def console_password(self, request: metalstack_dot_admin_dot_v2_dot_machine__pb2 class MachineServiceWSGIApplication(ConnectWSGIApplication): - def __init__(self, service: MachineServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: MachineServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( endpoints={ "/metalstack.admin.v2.MachineService/Get": EndpointSync.unary( @@ -315,6 +322,8 @@ def __init__(self, service: MachineServiceSync, interceptors: Iterable[Intercept }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -443,3 +452,5 @@ def console_password( headers=headers, timeout_ms=timeout_ms, ) + + diff --git a/python/metalstack/admin/v2/network_connect.py b/python/metalstack/admin/v2/network_connect.py index 77416cb3..be2a73bf 100644 --- a/python/metalstack/admin/v2/network_connect.py +++ b/python/metalstack/admin/v2/network_connect.py @@ -7,6 +7,8 @@ from connectrpc.client import ConnectClient, ConnectClientSync from connectrpc.code import Code +from connectrpc.codec import Codec +from connectrpc.compression import Compression from connectrpc.errors import ConnectError from connectrpc.interceptor import Interceptor, InterceptorSync from connectrpc.method import IdempotencyLevel, MethodInfo @@ -33,7 +35,7 @@ async def list(self, request: metalstack_dot_admin_dot_v2_dot_network__pb2.Netwo class NetworkServiceASGIApplication(ConnectASGIApplication[NetworkService]): - def __init__(self, service: NetworkService | AsyncGenerator[NetworkService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: NetworkService | AsyncGenerator[NetworkService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( service=service, endpoints=lambda svc: { @@ -90,6 +92,8 @@ def __init__(self, service: NetworkService | AsyncGenerator[NetworkService], *, }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -200,6 +204,9 @@ async def list( ) + + + class NetworkServiceSync(Protocol): def get(self, request: metalstack_dot_admin_dot_v2_dot_network__pb2.NetworkServiceGetRequest, ctx: RequestContext) -> metalstack_dot_admin_dot_v2_dot_network__pb2.NetworkServiceGetResponse: raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") @@ -214,7 +221,7 @@ def list(self, request: metalstack_dot_admin_dot_v2_dot_network__pb2.NetworkServ class NetworkServiceWSGIApplication(ConnectWSGIApplication): - def __init__(self, service: NetworkServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: NetworkServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( endpoints={ "/metalstack.admin.v2.NetworkService/Get": EndpointSync.unary( @@ -270,6 +277,8 @@ def __init__(self, service: NetworkServiceSync, interceptors: Iterable[Intercept }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -378,3 +387,5 @@ def list( headers=headers, timeout_ms=timeout_ms, ) + + diff --git a/python/metalstack/admin/v2/partition_connect.py b/python/metalstack/admin/v2/partition_connect.py index bbe6ac0f..84722e1b 100644 --- a/python/metalstack/admin/v2/partition_connect.py +++ b/python/metalstack/admin/v2/partition_connect.py @@ -7,6 +7,8 @@ from connectrpc.client import ConnectClient, ConnectClientSync from connectrpc.code import Code +from connectrpc.codec import Codec +from connectrpc.compression import Compression from connectrpc.errors import ConnectError from connectrpc.interceptor import Interceptor, InterceptorSync from connectrpc.method import IdempotencyLevel, MethodInfo @@ -30,7 +32,7 @@ async def capacity(self, request: metalstack_dot_admin_dot_v2_dot_partition__pb2 class PartitionServiceASGIApplication(ConnectASGIApplication[PartitionService]): - def __init__(self, service: PartitionService | AsyncGenerator[PartitionService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: PartitionService | AsyncGenerator[PartitionService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( service=service, endpoints=lambda svc: { @@ -77,6 +79,8 @@ def __init__(self, service: PartitionService | AsyncGenerator[PartitionService], }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -167,6 +171,9 @@ async def capacity( ) + + + class PartitionServiceSync(Protocol): def create(self, request: metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceCreateRequest, ctx: RequestContext) -> metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceCreateResponse: raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") @@ -179,7 +186,7 @@ def capacity(self, request: metalstack_dot_admin_dot_v2_dot_partition__pb2.Parti class PartitionServiceWSGIApplication(ConnectWSGIApplication): - def __init__(self, service: PartitionServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: PartitionServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( endpoints={ "/metalstack.admin.v2.PartitionService/Create": EndpointSync.unary( @@ -225,6 +232,8 @@ def __init__(self, service: PartitionServiceSync, interceptors: Iterable[Interce }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -313,3 +322,5 @@ def capacity( headers=headers, timeout_ms=timeout_ms, ) + + diff --git a/python/metalstack/admin/v2/project_connect.py b/python/metalstack/admin/v2/project_connect.py index ca4a2942..320e2bda 100644 --- a/python/metalstack/admin/v2/project_connect.py +++ b/python/metalstack/admin/v2/project_connect.py @@ -7,6 +7,8 @@ from connectrpc.client import ConnectClient, ConnectClientSync from connectrpc.code import Code +from connectrpc.codec import Codec +from connectrpc.compression import Compression from connectrpc.errors import ConnectError from connectrpc.interceptor import Interceptor, InterceptorSync from connectrpc.method import IdempotencyLevel, MethodInfo @@ -21,7 +23,7 @@ async def list(self, request: metalstack_dot_admin_dot_v2_dot_project__pb2.Proje class ProjectServiceASGIApplication(ConnectASGIApplication[ProjectService]): - def __init__(self, service: ProjectService | AsyncGenerator[ProjectService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: ProjectService | AsyncGenerator[ProjectService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( service=service, endpoints=lambda svc: { @@ -38,6 +40,8 @@ def __init__(self, service: ProjectService | AsyncGenerator[ProjectService], *, }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -68,13 +72,16 @@ async def list( ) + + + class ProjectServiceSync(Protocol): def list(self, request: metalstack_dot_admin_dot_v2_dot_project__pb2.ProjectServiceListRequest, ctx: RequestContext) -> metalstack_dot_admin_dot_v2_dot_project__pb2.ProjectServiceListResponse: raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") class ProjectServiceWSGIApplication(ConnectWSGIApplication): - def __init__(self, service: ProjectServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: ProjectServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( endpoints={ "/metalstack.admin.v2.ProjectService/List": EndpointSync.unary( @@ -90,6 +97,8 @@ def __init__(self, service: ProjectServiceSync, interceptors: Iterable[Intercept }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -118,3 +127,5 @@ def list( headers=headers, timeout_ms=timeout_ms, ) + + diff --git a/python/metalstack/admin/v2/size_connect.py b/python/metalstack/admin/v2/size_connect.py index 6135081d..eaa6ec44 100644 --- a/python/metalstack/admin/v2/size_connect.py +++ b/python/metalstack/admin/v2/size_connect.py @@ -7,6 +7,8 @@ from connectrpc.client import ConnectClient, ConnectClientSync from connectrpc.code import Code +from connectrpc.codec import Codec +from connectrpc.compression import Compression from connectrpc.errors import ConnectError from connectrpc.interceptor import Interceptor, InterceptorSync from connectrpc.method import IdempotencyLevel, MethodInfo @@ -27,7 +29,7 @@ async def delete(self, request: metalstack_dot_admin_dot_v2_dot_size__pb2.SizeSe class SizeServiceASGIApplication(ConnectASGIApplication[SizeService]): - def __init__(self, service: SizeService | AsyncGenerator[SizeService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: SizeService | AsyncGenerator[SizeService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( service=service, endpoints=lambda svc: { @@ -64,6 +66,8 @@ def __init__(self, service: SizeService | AsyncGenerator[SizeService], *, interc }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -134,6 +138,9 @@ async def delete( ) + + + class SizeServiceSync(Protocol): def create(self, request: metalstack_dot_admin_dot_v2_dot_size__pb2.SizeServiceCreateRequest, ctx: RequestContext) -> metalstack_dot_admin_dot_v2_dot_size__pb2.SizeServiceCreateResponse: raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") @@ -144,7 +151,7 @@ def delete(self, request: metalstack_dot_admin_dot_v2_dot_size__pb2.SizeServiceD class SizeServiceWSGIApplication(ConnectWSGIApplication): - def __init__(self, service: SizeServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: SizeServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( endpoints={ "/metalstack.admin.v2.SizeService/Create": EndpointSync.unary( @@ -180,6 +187,8 @@ def __init__(self, service: SizeServiceSync, interceptors: Iterable[InterceptorS }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -248,3 +257,5 @@ def delete( headers=headers, timeout_ms=timeout_ms, ) + + diff --git a/python/metalstack/admin/v2/size_imageconstraint_connect.py b/python/metalstack/admin/v2/size_imageconstraint_connect.py index 2a08837a..0c7f5803 100644 --- a/python/metalstack/admin/v2/size_imageconstraint_connect.py +++ b/python/metalstack/admin/v2/size_imageconstraint_connect.py @@ -7,6 +7,8 @@ from connectrpc.client import ConnectClient, ConnectClientSync from connectrpc.code import Code +from connectrpc.codec import Codec +from connectrpc.compression import Compression from connectrpc.errors import ConnectError from connectrpc.interceptor import Interceptor, InterceptorSync from connectrpc.method import IdempotencyLevel, MethodInfo @@ -33,7 +35,7 @@ async def list(self, request: metalstack_dot_admin_dot_v2_dot_size__imageconstra class SizeImageConstraintServiceASGIApplication(ConnectASGIApplication[SizeImageConstraintService]): - def __init__(self, service: SizeImageConstraintService | AsyncGenerator[SizeImageConstraintService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: SizeImageConstraintService | AsyncGenerator[SizeImageConstraintService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( service=service, endpoints=lambda svc: { @@ -90,6 +92,8 @@ def __init__(self, service: SizeImageConstraintService | AsyncGenerator[SizeImag }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -200,6 +204,9 @@ async def list( ) + + + class SizeImageConstraintServiceSync(Protocol): def create(self, request: metalstack_dot_admin_dot_v2_dot_size__imageconstraint__pb2.SizeImageConstraintServiceCreateRequest, ctx: RequestContext) -> metalstack_dot_admin_dot_v2_dot_size__imageconstraint__pb2.SizeImageConstraintServiceCreateResponse: raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") @@ -214,7 +221,7 @@ def list(self, request: metalstack_dot_admin_dot_v2_dot_size__imageconstraint__p class SizeImageConstraintServiceWSGIApplication(ConnectWSGIApplication): - def __init__(self, service: SizeImageConstraintServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: SizeImageConstraintServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( endpoints={ "/metalstack.admin.v2.SizeImageConstraintService/Create": EndpointSync.unary( @@ -270,6 +277,8 @@ def __init__(self, service: SizeImageConstraintServiceSync, interceptors: Iterab }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -378,3 +387,5 @@ def list( headers=headers, timeout_ms=timeout_ms, ) + + diff --git a/python/metalstack/admin/v2/size_reservation_connect.py b/python/metalstack/admin/v2/size_reservation_connect.py index e4c22017..a2dbf4be 100644 --- a/python/metalstack/admin/v2/size_reservation_connect.py +++ b/python/metalstack/admin/v2/size_reservation_connect.py @@ -7,6 +7,8 @@ from connectrpc.client import ConnectClient, ConnectClientSync from connectrpc.code import Code +from connectrpc.codec import Codec +from connectrpc.compression import Compression from connectrpc.errors import ConnectError from connectrpc.interceptor import Interceptor, InterceptorSync from connectrpc.method import IdempotencyLevel, MethodInfo @@ -30,7 +32,7 @@ async def list(self, request: metalstack_dot_admin_dot_v2_dot_size__reservation_ class SizeReservationServiceASGIApplication(ConnectASGIApplication[SizeReservationService]): - def __init__(self, service: SizeReservationService | AsyncGenerator[SizeReservationService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: SizeReservationService | AsyncGenerator[SizeReservationService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( service=service, endpoints=lambda svc: { @@ -77,6 +79,8 @@ def __init__(self, service: SizeReservationService | AsyncGenerator[SizeReservat }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -167,6 +171,9 @@ async def list( ) + + + class SizeReservationServiceSync(Protocol): def create(self, request: metalstack_dot_admin_dot_v2_dot_size__reservation__pb2.SizeReservationServiceCreateRequest, ctx: RequestContext) -> metalstack_dot_admin_dot_v2_dot_size__reservation__pb2.SizeReservationServiceCreateResponse: raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") @@ -179,7 +186,7 @@ def list(self, request: metalstack_dot_admin_dot_v2_dot_size__reservation__pb2.S class SizeReservationServiceWSGIApplication(ConnectWSGIApplication): - def __init__(self, service: SizeReservationServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: SizeReservationServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( endpoints={ "/metalstack.admin.v2.SizeReservationService/Create": EndpointSync.unary( @@ -225,6 +232,8 @@ def __init__(self, service: SizeReservationServiceSync, interceptors: Iterable[I }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -313,3 +322,5 @@ def list( headers=headers, timeout_ms=timeout_ms, ) + + diff --git a/python/metalstack/admin/v2/switch_connect.py b/python/metalstack/admin/v2/switch_connect.py index 698d8264..e67303ca 100644 --- a/python/metalstack/admin/v2/switch_connect.py +++ b/python/metalstack/admin/v2/switch_connect.py @@ -7,6 +7,8 @@ from connectrpc.client import ConnectClient, ConnectClientSync from connectrpc.code import Code +from connectrpc.codec import Codec +from connectrpc.compression import Compression from connectrpc.errors import ConnectError from connectrpc.interceptor import Interceptor, InterceptorSync from connectrpc.method import IdempotencyLevel, MethodInfo @@ -39,7 +41,7 @@ async def connected_machines(self, request: metalstack_dot_admin_dot_v2_dot_swit class SwitchServiceASGIApplication(ConnectASGIApplication[SwitchService]): - def __init__(self, service: SwitchService | AsyncGenerator[SwitchService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: SwitchService | AsyncGenerator[SwitchService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( service=service, endpoints=lambda svc: { @@ -116,6 +118,8 @@ def __init__(self, service: SwitchService | AsyncGenerator[SwitchService], *, in }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -266,6 +270,9 @@ async def connected_machines( ) + + + class SwitchServiceSync(Protocol): def get(self, request: metalstack_dot_admin_dot_v2_dot_switch__pb2.SwitchServiceGetRequest, ctx: RequestContext) -> metalstack_dot_admin_dot_v2_dot_switch__pb2.SwitchServiceGetResponse: raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") @@ -284,7 +291,7 @@ def connected_machines(self, request: metalstack_dot_admin_dot_v2_dot_switch__pb class SwitchServiceWSGIApplication(ConnectWSGIApplication): - def __init__(self, service: SwitchServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: SwitchServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( endpoints={ "/metalstack.admin.v2.SwitchService/Get": EndpointSync.unary( @@ -360,6 +367,8 @@ def __init__(self, service: SwitchServiceSync, interceptors: Iterable[Intercepto }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -508,3 +517,5 @@ def connected_machines( headers=headers, timeout_ms=timeout_ms, ) + + diff --git a/python/metalstack/admin/v2/task_connect.py b/python/metalstack/admin/v2/task_connect.py index d8951557..27ce8fb6 100644 --- a/python/metalstack/admin/v2/task_connect.py +++ b/python/metalstack/admin/v2/task_connect.py @@ -7,6 +7,8 @@ from connectrpc.client import ConnectClient, ConnectClientSync from connectrpc.code import Code +from connectrpc.codec import Codec +from connectrpc.compression import Compression from connectrpc.errors import ConnectError from connectrpc.interceptor import Interceptor, InterceptorSync from connectrpc.method import IdempotencyLevel, MethodInfo @@ -30,7 +32,7 @@ async def list(self, request: metalstack_dot_admin_dot_v2_dot_task__pb2.TaskServ class TaskServiceASGIApplication(ConnectASGIApplication[TaskService]): - def __init__(self, service: TaskService | AsyncGenerator[TaskService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: TaskService | AsyncGenerator[TaskService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( service=service, endpoints=lambda svc: { @@ -77,6 +79,8 @@ def __init__(self, service: TaskService | AsyncGenerator[TaskService], *, interc }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -167,6 +171,9 @@ async def list( ) + + + class TaskServiceSync(Protocol): def get(self, request: metalstack_dot_admin_dot_v2_dot_task__pb2.TaskServiceGetRequest, ctx: RequestContext) -> metalstack_dot_admin_dot_v2_dot_task__pb2.TaskServiceGetResponse: raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") @@ -179,7 +186,7 @@ def list(self, request: metalstack_dot_admin_dot_v2_dot_task__pb2.TaskServiceLis class TaskServiceWSGIApplication(ConnectWSGIApplication): - def __init__(self, service: TaskServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: TaskServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( endpoints={ "/metalstack.admin.v2.TaskService/Get": EndpointSync.unary( @@ -225,6 +232,8 @@ def __init__(self, service: TaskServiceSync, interceptors: Iterable[InterceptorS }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -313,3 +322,5 @@ def list( headers=headers, timeout_ms=timeout_ms, ) + + diff --git a/python/metalstack/admin/v2/tenant_connect.py b/python/metalstack/admin/v2/tenant_connect.py index cce11ae4..437b5e66 100644 --- a/python/metalstack/admin/v2/tenant_connect.py +++ b/python/metalstack/admin/v2/tenant_connect.py @@ -7,6 +7,8 @@ from connectrpc.client import ConnectClient, ConnectClientSync from connectrpc.code import Code +from connectrpc.codec import Codec +from connectrpc.compression import Compression from connectrpc.errors import ConnectError from connectrpc.interceptor import Interceptor, InterceptorSync from connectrpc.method import IdempotencyLevel, MethodInfo @@ -24,7 +26,7 @@ async def list(self, request: metalstack_dot_admin_dot_v2_dot_tenant__pb2.Tenant class TenantServiceASGIApplication(ConnectASGIApplication[TenantService]): - def __init__(self, service: TenantService | AsyncGenerator[TenantService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: TenantService | AsyncGenerator[TenantService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( service=service, endpoints=lambda svc: { @@ -51,6 +53,8 @@ def __init__(self, service: TenantService | AsyncGenerator[TenantService], *, in }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -101,6 +105,9 @@ async def list( ) + + + class TenantServiceSync(Protocol): def create(self, request: metalstack_dot_admin_dot_v2_dot_tenant__pb2.TenantServiceCreateRequest, ctx: RequestContext) -> metalstack_dot_admin_dot_v2_dot_tenant__pb2.TenantServiceCreateResponse: raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") @@ -109,7 +116,7 @@ def list(self, request: metalstack_dot_admin_dot_v2_dot_tenant__pb2.TenantServic class TenantServiceWSGIApplication(ConnectWSGIApplication): - def __init__(self, service: TenantServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: TenantServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( endpoints={ "/metalstack.admin.v2.TenantService/Create": EndpointSync.unary( @@ -135,6 +142,8 @@ def __init__(self, service: TenantServiceSync, interceptors: Iterable[Intercepto }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -183,3 +192,5 @@ def list( headers=headers, timeout_ms=timeout_ms, ) + + diff --git a/python/metalstack/admin/v2/token_connect.py b/python/metalstack/admin/v2/token_connect.py index b1df1e5b..8dcecad6 100644 --- a/python/metalstack/admin/v2/token_connect.py +++ b/python/metalstack/admin/v2/token_connect.py @@ -7,6 +7,8 @@ from connectrpc.client import ConnectClient, ConnectClientSync from connectrpc.code import Code +from connectrpc.codec import Codec +from connectrpc.compression import Compression from connectrpc.errors import ConnectError from connectrpc.interceptor import Interceptor, InterceptorSync from connectrpc.method import IdempotencyLevel, MethodInfo @@ -27,7 +29,7 @@ async def create(self, request: metalstack_dot_admin_dot_v2_dot_token__pb2.Token class TokenServiceASGIApplication(ConnectASGIApplication[TokenService]): - def __init__(self, service: TokenService | AsyncGenerator[TokenService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: TokenService | AsyncGenerator[TokenService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( service=service, endpoints=lambda svc: { @@ -64,6 +66,8 @@ def __init__(self, service: TokenService | AsyncGenerator[TokenService], *, inte }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -134,6 +138,9 @@ async def create( ) + + + class TokenServiceSync(Protocol): def list(self, request: metalstack_dot_admin_dot_v2_dot_token__pb2.TokenServiceListRequest, ctx: RequestContext) -> metalstack_dot_admin_dot_v2_dot_token__pb2.TokenServiceListResponse: raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") @@ -144,7 +151,7 @@ def create(self, request: metalstack_dot_admin_dot_v2_dot_token__pb2.TokenServic class TokenServiceWSGIApplication(ConnectWSGIApplication): - def __init__(self, service: TokenServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: TokenServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( endpoints={ "/metalstack.admin.v2.TokenService/List": EndpointSync.unary( @@ -180,6 +187,8 @@ def __init__(self, service: TokenServiceSync, interceptors: Iterable[Interceptor }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -248,3 +257,5 @@ def create( headers=headers, timeout_ms=timeout_ms, ) + + diff --git a/python/metalstack/admin/v2/vpn_connect.py b/python/metalstack/admin/v2/vpn_connect.py index c41a81ad..8e1523b0 100644 --- a/python/metalstack/admin/v2/vpn_connect.py +++ b/python/metalstack/admin/v2/vpn_connect.py @@ -7,6 +7,8 @@ from connectrpc.client import ConnectClient, ConnectClientSync from connectrpc.code import Code +from connectrpc.codec import Codec +from connectrpc.compression import Compression from connectrpc.errors import ConnectError from connectrpc.interceptor import Interceptor, InterceptorSync from connectrpc.method import IdempotencyLevel, MethodInfo @@ -24,7 +26,7 @@ async def list_nodes(self, request: metalstack_dot_admin_dot_v2_dot_vpn__pb2.VPN class VPNServiceASGIApplication(ConnectASGIApplication[VPNService]): - def __init__(self, service: VPNService | AsyncGenerator[VPNService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: VPNService | AsyncGenerator[VPNService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( service=service, endpoints=lambda svc: { @@ -51,6 +53,8 @@ def __init__(self, service: VPNService | AsyncGenerator[VPNService], *, intercep }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -101,6 +105,9 @@ async def list_nodes( ) + + + class VPNServiceSync(Protocol): def auth_key(self, request: metalstack_dot_admin_dot_v2_dot_vpn__pb2.VPNServiceAuthKeyRequest, ctx: RequestContext) -> metalstack_dot_admin_dot_v2_dot_vpn__pb2.VPNServiceAuthKeyResponse: raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") @@ -109,7 +116,7 @@ def list_nodes(self, request: metalstack_dot_admin_dot_v2_dot_vpn__pb2.VPNServic class VPNServiceWSGIApplication(ConnectWSGIApplication): - def __init__(self, service: VPNServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: VPNServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( endpoints={ "/metalstack.admin.v2.VPNService/AuthKey": EndpointSync.unary( @@ -135,6 +142,8 @@ def __init__(self, service: VPNServiceSync, interceptors: Iterable[InterceptorSy }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -183,3 +192,5 @@ def list_nodes( headers=headers, timeout_ms=timeout_ms, ) + + diff --git a/python/metalstack/api/v2/audit_connect.py b/python/metalstack/api/v2/audit_connect.py index 22eb53dd..222da9aa 100644 --- a/python/metalstack/api/v2/audit_connect.py +++ b/python/metalstack/api/v2/audit_connect.py @@ -7,6 +7,8 @@ from connectrpc.client import ConnectClient, ConnectClientSync from connectrpc.code import Code +from connectrpc.codec import Codec +from connectrpc.compression import Compression from connectrpc.errors import ConnectError from connectrpc.interceptor import Interceptor, InterceptorSync from connectrpc.method import IdempotencyLevel, MethodInfo @@ -24,7 +26,7 @@ async def list(self, request: metalstack_dot_api_dot_v2_dot_audit__pb2.AuditServ class AuditServiceASGIApplication(ConnectASGIApplication[AuditService]): - def __init__(self, service: AuditService | AsyncGenerator[AuditService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: AuditService | AsyncGenerator[AuditService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( service=service, endpoints=lambda svc: { @@ -51,6 +53,8 @@ def __init__(self, service: AuditService | AsyncGenerator[AuditService], *, inte }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -101,6 +105,9 @@ async def list( ) + + + class AuditServiceSync(Protocol): def get(self, request: metalstack_dot_api_dot_v2_dot_audit__pb2.AuditServiceGetRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_audit__pb2.AuditServiceGetResponse: raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") @@ -109,7 +116,7 @@ def list(self, request: metalstack_dot_api_dot_v2_dot_audit__pb2.AuditServiceLis class AuditServiceWSGIApplication(ConnectWSGIApplication): - def __init__(self, service: AuditServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: AuditServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( endpoints={ "/metalstack.api.v2.AuditService/Get": EndpointSync.unary( @@ -135,6 +142,8 @@ def __init__(self, service: AuditServiceSync, interceptors: Iterable[Interceptor }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -183,3 +192,5 @@ def list( headers=headers, timeout_ms=timeout_ms, ) + + diff --git a/python/metalstack/api/v2/filesystem_connect.py b/python/metalstack/api/v2/filesystem_connect.py index c32f7f85..1a5e5759 100644 --- a/python/metalstack/api/v2/filesystem_connect.py +++ b/python/metalstack/api/v2/filesystem_connect.py @@ -7,6 +7,8 @@ from connectrpc.client import ConnectClient, ConnectClientSync from connectrpc.code import Code +from connectrpc.codec import Codec +from connectrpc.compression import Compression from connectrpc.errors import ConnectError from connectrpc.interceptor import Interceptor, InterceptorSync from connectrpc.method import IdempotencyLevel, MethodInfo @@ -24,7 +26,7 @@ async def list(self, request: metalstack_dot_api_dot_v2_dot_filesystem__pb2.File class FilesystemServiceASGIApplication(ConnectASGIApplication[FilesystemService]): - def __init__(self, service: FilesystemService | AsyncGenerator[FilesystemService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: FilesystemService | AsyncGenerator[FilesystemService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( service=service, endpoints=lambda svc: { @@ -51,6 +53,8 @@ def __init__(self, service: FilesystemService | AsyncGenerator[FilesystemService }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -101,6 +105,9 @@ async def list( ) + + + class FilesystemServiceSync(Protocol): def get(self, request: metalstack_dot_api_dot_v2_dot_filesystem__pb2.FilesystemServiceGetRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_filesystem__pb2.FilesystemServiceGetResponse: raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") @@ -109,7 +116,7 @@ def list(self, request: metalstack_dot_api_dot_v2_dot_filesystem__pb2.Filesystem class FilesystemServiceWSGIApplication(ConnectWSGIApplication): - def __init__(self, service: FilesystemServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: FilesystemServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( endpoints={ "/metalstack.api.v2.FilesystemService/Get": EndpointSync.unary( @@ -135,6 +142,8 @@ def __init__(self, service: FilesystemServiceSync, interceptors: Iterable[Interc }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -183,3 +192,5 @@ def list( headers=headers, timeout_ms=timeout_ms, ) + + diff --git a/python/metalstack/api/v2/health_connect.py b/python/metalstack/api/v2/health_connect.py index e4864b56..4ab16f05 100644 --- a/python/metalstack/api/v2/health_connect.py +++ b/python/metalstack/api/v2/health_connect.py @@ -7,6 +7,8 @@ from connectrpc.client import ConnectClient, ConnectClientSync from connectrpc.code import Code +from connectrpc.codec import Codec +from connectrpc.compression import Compression from connectrpc.errors import ConnectError from connectrpc.interceptor import Interceptor, InterceptorSync from connectrpc.method import IdempotencyLevel, MethodInfo @@ -21,7 +23,7 @@ async def get(self, request: metalstack_dot_api_dot_v2_dot_health__pb2.HealthSer class HealthServiceASGIApplication(ConnectASGIApplication[HealthService]): - def __init__(self, service: HealthService | AsyncGenerator[HealthService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: HealthService | AsyncGenerator[HealthService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( service=service, endpoints=lambda svc: { @@ -38,6 +40,8 @@ def __init__(self, service: HealthService | AsyncGenerator[HealthService], *, in }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -68,13 +72,16 @@ async def get( ) + + + class HealthServiceSync(Protocol): def get(self, request: metalstack_dot_api_dot_v2_dot_health__pb2.HealthServiceGetRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_health__pb2.HealthServiceGetResponse: raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") class HealthServiceWSGIApplication(ConnectWSGIApplication): - def __init__(self, service: HealthServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: HealthServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( endpoints={ "/metalstack.api.v2.HealthService/Get": EndpointSync.unary( @@ -90,6 +97,8 @@ def __init__(self, service: HealthServiceSync, interceptors: Iterable[Intercepto }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -118,3 +127,5 @@ def get( headers=headers, timeout_ms=timeout_ms, ) + + diff --git a/python/metalstack/api/v2/image_connect.py b/python/metalstack/api/v2/image_connect.py index e1ff71e1..f002625d 100644 --- a/python/metalstack/api/v2/image_connect.py +++ b/python/metalstack/api/v2/image_connect.py @@ -7,6 +7,8 @@ from connectrpc.client import ConnectClient, ConnectClientSync from connectrpc.code import Code +from connectrpc.codec import Codec +from connectrpc.compression import Compression from connectrpc.errors import ConnectError from connectrpc.interceptor import Interceptor, InterceptorSync from connectrpc.method import IdempotencyLevel, MethodInfo @@ -27,7 +29,7 @@ async def latest(self, request: metalstack_dot_api_dot_v2_dot_image__pb2.ImageSe class ImageServiceASGIApplication(ConnectASGIApplication[ImageService]): - def __init__(self, service: ImageService | AsyncGenerator[ImageService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: ImageService | AsyncGenerator[ImageService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( service=service, endpoints=lambda svc: { @@ -64,6 +66,8 @@ def __init__(self, service: ImageService | AsyncGenerator[ImageService], *, inte }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -134,6 +138,9 @@ async def latest( ) + + + class ImageServiceSync(Protocol): def get(self, request: metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceGetRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceGetResponse: raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") @@ -144,7 +151,7 @@ def latest(self, request: metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceL class ImageServiceWSGIApplication(ConnectWSGIApplication): - def __init__(self, service: ImageServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: ImageServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( endpoints={ "/metalstack.api.v2.ImageService/Get": EndpointSync.unary( @@ -180,6 +187,8 @@ def __init__(self, service: ImageServiceSync, interceptors: Iterable[Interceptor }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -248,3 +257,5 @@ def latest( headers=headers, timeout_ms=timeout_ms, ) + + diff --git a/python/metalstack/api/v2/ip_connect.py b/python/metalstack/api/v2/ip_connect.py index 3dc3699c..0e87d82b 100644 --- a/python/metalstack/api/v2/ip_connect.py +++ b/python/metalstack/api/v2/ip_connect.py @@ -7,6 +7,8 @@ from connectrpc.client import ConnectClient, ConnectClientSync from connectrpc.code import Code +from connectrpc.codec import Codec +from connectrpc.compression import Compression from connectrpc.errors import ConnectError from connectrpc.interceptor import Interceptor, InterceptorSync from connectrpc.method import IdempotencyLevel, MethodInfo @@ -33,7 +35,7 @@ async def delete(self, request: metalstack_dot_api_dot_v2_dot_ip__pb2.IPServiceD class IPServiceASGIApplication(ConnectASGIApplication[IPService]): - def __init__(self, service: IPService | AsyncGenerator[IPService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: IPService | AsyncGenerator[IPService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( service=service, endpoints=lambda svc: { @@ -90,6 +92,8 @@ def __init__(self, service: IPService | AsyncGenerator[IPService], *, intercepto }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -200,6 +204,9 @@ async def delete( ) + + + class IPServiceSync(Protocol): def get(self, request: metalstack_dot_api_dot_v2_dot_ip__pb2.IPServiceGetRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_ip__pb2.IPServiceGetResponse: raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") @@ -214,7 +221,7 @@ def delete(self, request: metalstack_dot_api_dot_v2_dot_ip__pb2.IPServiceDeleteR class IPServiceWSGIApplication(ConnectWSGIApplication): - def __init__(self, service: IPServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: IPServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( endpoints={ "/metalstack.api.v2.IPService/Get": EndpointSync.unary( @@ -270,6 +277,8 @@ def __init__(self, service: IPServiceSync, interceptors: Iterable[InterceptorSyn }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -378,3 +387,5 @@ def delete( headers=headers, timeout_ms=timeout_ms, ) + + diff --git a/python/metalstack/api/v2/machine_connect.py b/python/metalstack/api/v2/machine_connect.py index 02b7185f..d219d7b7 100644 --- a/python/metalstack/api/v2/machine_connect.py +++ b/python/metalstack/api/v2/machine_connect.py @@ -7,6 +7,8 @@ from connectrpc.client import ConnectClient, ConnectClientSync from connectrpc.code import Code +from connectrpc.codec import Codec +from connectrpc.compression import Compression from connectrpc.errors import ConnectError from connectrpc.interceptor import Interceptor, InterceptorSync from connectrpc.method import IdempotencyLevel, MethodInfo @@ -39,7 +41,7 @@ async def get_b_m_c(self, request: metalstack_dot_api_dot_v2_dot_machine__pb2.Ma class MachineServiceASGIApplication(ConnectASGIApplication[MachineService]): - def __init__(self, service: MachineService | AsyncGenerator[MachineService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: MachineService | AsyncGenerator[MachineService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( service=service, endpoints=lambda svc: { @@ -116,6 +118,8 @@ def __init__(self, service: MachineService | AsyncGenerator[MachineService], *, }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -266,6 +270,9 @@ async def get_b_m_c( ) + + + class MachineServiceSync(Protocol): def get(self, request: metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceGetRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceGetResponse: raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") @@ -284,7 +291,7 @@ def get_b_m_c(self, request: metalstack_dot_api_dot_v2_dot_machine__pb2.MachineS class MachineServiceWSGIApplication(ConnectWSGIApplication): - def __init__(self, service: MachineServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: MachineServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( endpoints={ "/metalstack.api.v2.MachineService/Get": EndpointSync.unary( @@ -360,6 +367,8 @@ def __init__(self, service: MachineServiceSync, interceptors: Iterable[Intercept }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -508,3 +517,5 @@ def get_b_m_c( headers=headers, timeout_ms=timeout_ms, ) + + diff --git a/python/metalstack/api/v2/method_connect.py b/python/metalstack/api/v2/method_connect.py index 1aeba3b0..d0ac8fb9 100644 --- a/python/metalstack/api/v2/method_connect.py +++ b/python/metalstack/api/v2/method_connect.py @@ -7,6 +7,8 @@ from connectrpc.client import ConnectClient, ConnectClientSync from connectrpc.code import Code +from connectrpc.codec import Codec +from connectrpc.compression import Compression from connectrpc.errors import ConnectError from connectrpc.interceptor import Interceptor, InterceptorSync from connectrpc.method import IdempotencyLevel, MethodInfo @@ -24,7 +26,7 @@ async def token_scoped_list(self, request: metalstack_dot_api_dot_v2_dot_method_ class MethodServiceASGIApplication(ConnectASGIApplication[MethodService]): - def __init__(self, service: MethodService | AsyncGenerator[MethodService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: MethodService | AsyncGenerator[MethodService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( service=service, endpoints=lambda svc: { @@ -51,6 +53,8 @@ def __init__(self, service: MethodService | AsyncGenerator[MethodService], *, in }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -101,6 +105,9 @@ async def token_scoped_list( ) + + + class MethodServiceSync(Protocol): def list(self, request: metalstack_dot_api_dot_v2_dot_method__pb2.MethodServiceListRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_method__pb2.MethodServiceListResponse: raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") @@ -109,7 +116,7 @@ def token_scoped_list(self, request: metalstack_dot_api_dot_v2_dot_method__pb2.M class MethodServiceWSGIApplication(ConnectWSGIApplication): - def __init__(self, service: MethodServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: MethodServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( endpoints={ "/metalstack.api.v2.MethodService/List": EndpointSync.unary( @@ -135,6 +142,8 @@ def __init__(self, service: MethodServiceSync, interceptors: Iterable[Intercepto }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -183,3 +192,5 @@ def token_scoped_list( headers=headers, timeout_ms=timeout_ms, ) + + diff --git a/python/metalstack/api/v2/network_connect.py b/python/metalstack/api/v2/network_connect.py index 31ace3fe..e733d947 100644 --- a/python/metalstack/api/v2/network_connect.py +++ b/python/metalstack/api/v2/network_connect.py @@ -7,6 +7,8 @@ from connectrpc.client import ConnectClient, ConnectClientSync from connectrpc.code import Code +from connectrpc.codec import Codec +from connectrpc.compression import Compression from connectrpc.errors import ConnectError from connectrpc.interceptor import Interceptor, InterceptorSync from connectrpc.method import IdempotencyLevel, MethodInfo @@ -36,7 +38,7 @@ async def delete(self, request: metalstack_dot_api_dot_v2_dot_network__pb2.Netwo class NetworkServiceASGIApplication(ConnectASGIApplication[NetworkService]): - def __init__(self, service: NetworkService | AsyncGenerator[NetworkService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: NetworkService | AsyncGenerator[NetworkService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( service=service, endpoints=lambda svc: { @@ -103,6 +105,8 @@ def __init__(self, service: NetworkService | AsyncGenerator[NetworkService], *, }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -233,6 +237,9 @@ async def delete( ) + + + class NetworkServiceSync(Protocol): def get(self, request: metalstack_dot_api_dot_v2_dot_network__pb2.NetworkServiceGetRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_network__pb2.NetworkServiceGetResponse: raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") @@ -249,7 +256,7 @@ def delete(self, request: metalstack_dot_api_dot_v2_dot_network__pb2.NetworkServ class NetworkServiceWSGIApplication(ConnectWSGIApplication): - def __init__(self, service: NetworkServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: NetworkServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( endpoints={ "/metalstack.api.v2.NetworkService/Get": EndpointSync.unary( @@ -315,6 +322,8 @@ def __init__(self, service: NetworkServiceSync, interceptors: Iterable[Intercept }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -443,3 +452,5 @@ def delete( headers=headers, timeout_ms=timeout_ms, ) + + diff --git a/python/metalstack/api/v2/partition_connect.py b/python/metalstack/api/v2/partition_connect.py index 96497125..5e130940 100644 --- a/python/metalstack/api/v2/partition_connect.py +++ b/python/metalstack/api/v2/partition_connect.py @@ -7,6 +7,8 @@ from connectrpc.client import ConnectClient, ConnectClientSync from connectrpc.code import Code +from connectrpc.codec import Codec +from connectrpc.compression import Compression from connectrpc.errors import ConnectError from connectrpc.interceptor import Interceptor, InterceptorSync from connectrpc.method import IdempotencyLevel, MethodInfo @@ -24,7 +26,7 @@ async def list(self, request: metalstack_dot_api_dot_v2_dot_partition__pb2.Parti class PartitionServiceASGIApplication(ConnectASGIApplication[PartitionService]): - def __init__(self, service: PartitionService | AsyncGenerator[PartitionService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: PartitionService | AsyncGenerator[PartitionService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( service=service, endpoints=lambda svc: { @@ -51,6 +53,8 @@ def __init__(self, service: PartitionService | AsyncGenerator[PartitionService], }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -101,6 +105,9 @@ async def list( ) + + + class PartitionServiceSync(Protocol): def get(self, request: metalstack_dot_api_dot_v2_dot_partition__pb2.PartitionServiceGetRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_partition__pb2.PartitionServiceGetResponse: raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") @@ -109,7 +116,7 @@ def list(self, request: metalstack_dot_api_dot_v2_dot_partition__pb2.PartitionSe class PartitionServiceWSGIApplication(ConnectWSGIApplication): - def __init__(self, service: PartitionServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: PartitionServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( endpoints={ "/metalstack.api.v2.PartitionService/Get": EndpointSync.unary( @@ -135,6 +142,8 @@ def __init__(self, service: PartitionServiceSync, interceptors: Iterable[Interce }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -183,3 +192,5 @@ def list( headers=headers, timeout_ms=timeout_ms, ) + + diff --git a/python/metalstack/api/v2/project_connect.py b/python/metalstack/api/v2/project_connect.py index 6edb4567..25cf4405 100644 --- a/python/metalstack/api/v2/project_connect.py +++ b/python/metalstack/api/v2/project_connect.py @@ -7,6 +7,8 @@ from connectrpc.client import ConnectClient, ConnectClientSync from connectrpc.code import Code +from connectrpc.codec import Codec +from connectrpc.compression import Compression from connectrpc.errors import ConnectError from connectrpc.interceptor import Interceptor, InterceptorSync from connectrpc.method import IdempotencyLevel, MethodInfo @@ -57,7 +59,7 @@ async def invite_get(self, request: metalstack_dot_api_dot_v2_dot_project__pb2.P class ProjectServiceASGIApplication(ConnectASGIApplication[ProjectService]): - def __init__(self, service: ProjectService | AsyncGenerator[ProjectService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: ProjectService | AsyncGenerator[ProjectService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( service=service, endpoints=lambda svc: { @@ -194,6 +196,8 @@ def __init__(self, service: ProjectService | AsyncGenerator[ProjectService], *, }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -464,6 +468,9 @@ async def invite_get( ) + + + class ProjectServiceSync(Protocol): def list(self, request: metalstack_dot_api_dot_v2_dot_project__pb2.ProjectServiceListRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_project__pb2.ProjectServiceListResponse: raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") @@ -494,7 +501,7 @@ def invite_get(self, request: metalstack_dot_api_dot_v2_dot_project__pb2.Project class ProjectServiceWSGIApplication(ConnectWSGIApplication): - def __init__(self, service: ProjectServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: ProjectServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( endpoints={ "/metalstack.api.v2.ProjectService/List": EndpointSync.unary( @@ -630,6 +637,8 @@ def __init__(self, service: ProjectServiceSync, interceptors: Iterable[Intercept }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -898,3 +907,5 @@ def invite_get( headers=headers, timeout_ms=timeout_ms, ) + + diff --git a/python/metalstack/api/v2/size_connect.py b/python/metalstack/api/v2/size_connect.py index 5d53e3d4..4ed02112 100644 --- a/python/metalstack/api/v2/size_connect.py +++ b/python/metalstack/api/v2/size_connect.py @@ -7,6 +7,8 @@ from connectrpc.client import ConnectClient, ConnectClientSync from connectrpc.code import Code +from connectrpc.codec import Codec +from connectrpc.compression import Compression from connectrpc.errors import ConnectError from connectrpc.interceptor import Interceptor, InterceptorSync from connectrpc.method import IdempotencyLevel, MethodInfo @@ -24,7 +26,7 @@ async def list(self, request: metalstack_dot_api_dot_v2_dot_size__pb2.SizeServic class SizeServiceASGIApplication(ConnectASGIApplication[SizeService]): - def __init__(self, service: SizeService | AsyncGenerator[SizeService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: SizeService | AsyncGenerator[SizeService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( service=service, endpoints=lambda svc: { @@ -51,6 +53,8 @@ def __init__(self, service: SizeService | AsyncGenerator[SizeService], *, interc }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -101,6 +105,9 @@ async def list( ) + + + class SizeServiceSync(Protocol): def get(self, request: metalstack_dot_api_dot_v2_dot_size__pb2.SizeServiceGetRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_size__pb2.SizeServiceGetResponse: raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") @@ -109,7 +116,7 @@ def list(self, request: metalstack_dot_api_dot_v2_dot_size__pb2.SizeServiceListR class SizeServiceWSGIApplication(ConnectWSGIApplication): - def __init__(self, service: SizeServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: SizeServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( endpoints={ "/metalstack.api.v2.SizeService/Get": EndpointSync.unary( @@ -135,6 +142,8 @@ def __init__(self, service: SizeServiceSync, interceptors: Iterable[InterceptorS }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -183,3 +192,5 @@ def list( headers=headers, timeout_ms=timeout_ms, ) + + diff --git a/python/metalstack/api/v2/size_imageconstraint_connect.py b/python/metalstack/api/v2/size_imageconstraint_connect.py index 184c1490..ab3bc4cb 100644 --- a/python/metalstack/api/v2/size_imageconstraint_connect.py +++ b/python/metalstack/api/v2/size_imageconstraint_connect.py @@ -7,6 +7,8 @@ from connectrpc.client import ConnectClient, ConnectClientSync from connectrpc.code import Code +from connectrpc.codec import Codec +from connectrpc.compression import Compression from connectrpc.errors import ConnectError from connectrpc.interceptor import Interceptor, InterceptorSync from connectrpc.method import IdempotencyLevel, MethodInfo @@ -21,7 +23,7 @@ async def try_(self, request: metalstack_dot_api_dot_v2_dot_size__imageconstrain class SizeImageConstraintServiceASGIApplication(ConnectASGIApplication[SizeImageConstraintService]): - def __init__(self, service: SizeImageConstraintService | AsyncGenerator[SizeImageConstraintService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: SizeImageConstraintService | AsyncGenerator[SizeImageConstraintService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( service=service, endpoints=lambda svc: { @@ -38,6 +40,8 @@ def __init__(self, service: SizeImageConstraintService | AsyncGenerator[SizeImag }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -68,13 +72,16 @@ async def try_( ) + + + class SizeImageConstraintServiceSync(Protocol): def try_(self, request: metalstack_dot_api_dot_v2_dot_size__imageconstraint__pb2.SizeImageConstraintServiceTryRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_size__imageconstraint__pb2.SizeImageConstraintServiceTryResponse: raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") class SizeImageConstraintServiceWSGIApplication(ConnectWSGIApplication): - def __init__(self, service: SizeImageConstraintServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: SizeImageConstraintServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( endpoints={ "/metalstack.api.v2.SizeImageConstraintService/Try": EndpointSync.unary( @@ -90,6 +97,8 @@ def __init__(self, service: SizeImageConstraintServiceSync, interceptors: Iterab }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -118,3 +127,5 @@ def try_( headers=headers, timeout_ms=timeout_ms, ) + + diff --git a/python/metalstack/api/v2/size_reservation_connect.py b/python/metalstack/api/v2/size_reservation_connect.py index 21699f85..6d139d0a 100644 --- a/python/metalstack/api/v2/size_reservation_connect.py +++ b/python/metalstack/api/v2/size_reservation_connect.py @@ -7,6 +7,8 @@ from connectrpc.client import ConnectClient, ConnectClientSync from connectrpc.code import Code +from connectrpc.codec import Codec +from connectrpc.compression import Compression from connectrpc.errors import ConnectError from connectrpc.interceptor import Interceptor, InterceptorSync from connectrpc.method import IdempotencyLevel, MethodInfo @@ -24,7 +26,7 @@ async def list(self, request: metalstack_dot_api_dot_v2_dot_size__reservation__p class SizeReservationServiceASGIApplication(ConnectASGIApplication[SizeReservationService]): - def __init__(self, service: SizeReservationService | AsyncGenerator[SizeReservationService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: SizeReservationService | AsyncGenerator[SizeReservationService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( service=service, endpoints=lambda svc: { @@ -51,6 +53,8 @@ def __init__(self, service: SizeReservationService | AsyncGenerator[SizeReservat }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -101,6 +105,9 @@ async def list( ) + + + class SizeReservationServiceSync(Protocol): def get(self, request: metalstack_dot_api_dot_v2_dot_size__reservation__pb2.SizeReservationServiceGetRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_size__reservation__pb2.SizeReservationServiceGetResponse: raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") @@ -109,7 +116,7 @@ def list(self, request: metalstack_dot_api_dot_v2_dot_size__reservation__pb2.Siz class SizeReservationServiceWSGIApplication(ConnectWSGIApplication): - def __init__(self, service: SizeReservationServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: SizeReservationServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( endpoints={ "/metalstack.api.v2.SizeReservationService/Get": EndpointSync.unary( @@ -135,6 +142,8 @@ def __init__(self, service: SizeReservationServiceSync, interceptors: Iterable[I }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -183,3 +192,5 @@ def list( headers=headers, timeout_ms=timeout_ms, ) + + diff --git a/python/metalstack/api/v2/tenant_connect.py b/python/metalstack/api/v2/tenant_connect.py index b3327b0b..5b116b08 100644 --- a/python/metalstack/api/v2/tenant_connect.py +++ b/python/metalstack/api/v2/tenant_connect.py @@ -7,6 +7,8 @@ from connectrpc.client import ConnectClient, ConnectClientSync from connectrpc.code import Code +from connectrpc.codec import Codec +from connectrpc.compression import Compression from connectrpc.errors import ConnectError from connectrpc.interceptor import Interceptor, InterceptorSync from connectrpc.method import IdempotencyLevel, MethodInfo @@ -57,7 +59,7 @@ async def invite_get(self, request: metalstack_dot_api_dot_v2_dot_tenant__pb2.Te class TenantServiceASGIApplication(ConnectASGIApplication[TenantService]): - def __init__(self, service: TenantService | AsyncGenerator[TenantService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: TenantService | AsyncGenerator[TenantService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( service=service, endpoints=lambda svc: { @@ -194,6 +196,8 @@ def __init__(self, service: TenantService | AsyncGenerator[TenantService], *, in }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -464,6 +468,9 @@ async def invite_get( ) + + + class TenantServiceSync(Protocol): def create(self, request: metalstack_dot_api_dot_v2_dot_tenant__pb2.TenantServiceCreateRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_tenant__pb2.TenantServiceCreateResponse: raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") @@ -494,7 +501,7 @@ def invite_get(self, request: metalstack_dot_api_dot_v2_dot_tenant__pb2.TenantSe class TenantServiceWSGIApplication(ConnectWSGIApplication): - def __init__(self, service: TenantServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: TenantServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( endpoints={ "/metalstack.api.v2.TenantService/Create": EndpointSync.unary( @@ -630,6 +637,8 @@ def __init__(self, service: TenantServiceSync, interceptors: Iterable[Intercepto }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -898,3 +907,5 @@ def invite_get( headers=headers, timeout_ms=timeout_ms, ) + + diff --git a/python/metalstack/api/v2/token_connect.py b/python/metalstack/api/v2/token_connect.py index ba726fda..bb4bdbd0 100644 --- a/python/metalstack/api/v2/token_connect.py +++ b/python/metalstack/api/v2/token_connect.py @@ -7,6 +7,8 @@ from connectrpc.client import ConnectClient, ConnectClientSync from connectrpc.code import Code +from connectrpc.codec import Codec +from connectrpc.compression import Compression from connectrpc.errors import ConnectError from connectrpc.interceptor import Interceptor, InterceptorSync from connectrpc.method import IdempotencyLevel, MethodInfo @@ -36,7 +38,7 @@ async def refresh(self, request: metalstack_dot_api_dot_v2_dot_token__pb2.TokenS class TokenServiceASGIApplication(ConnectASGIApplication[TokenService]): - def __init__(self, service: TokenService | AsyncGenerator[TokenService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: TokenService | AsyncGenerator[TokenService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( service=service, endpoints=lambda svc: { @@ -103,6 +105,8 @@ def __init__(self, service: TokenService | AsyncGenerator[TokenService], *, inte }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -233,6 +237,9 @@ async def refresh( ) + + + class TokenServiceSync(Protocol): def get(self, request: metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceGetRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceGetResponse: raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") @@ -249,7 +256,7 @@ def refresh(self, request: metalstack_dot_api_dot_v2_dot_token__pb2.TokenService class TokenServiceWSGIApplication(ConnectWSGIApplication): - def __init__(self, service: TokenServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: TokenServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( endpoints={ "/metalstack.api.v2.TokenService/Get": EndpointSync.unary( @@ -315,6 +322,8 @@ def __init__(self, service: TokenServiceSync, interceptors: Iterable[Interceptor }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -443,3 +452,5 @@ def refresh( headers=headers, timeout_ms=timeout_ms, ) + + diff --git a/python/metalstack/api/v2/user_connect.py b/python/metalstack/api/v2/user_connect.py index 797f9bc2..de4c204a 100644 --- a/python/metalstack/api/v2/user_connect.py +++ b/python/metalstack/api/v2/user_connect.py @@ -7,6 +7,8 @@ from connectrpc.client import ConnectClient, ConnectClientSync from connectrpc.code import Code +from connectrpc.codec import Codec +from connectrpc.compression import Compression from connectrpc.errors import ConnectError from connectrpc.interceptor import Interceptor, InterceptorSync from connectrpc.method import IdempotencyLevel, MethodInfo @@ -21,7 +23,7 @@ async def get(self, request: metalstack_dot_api_dot_v2_dot_user__pb2.UserService class UserServiceASGIApplication(ConnectASGIApplication[UserService]): - def __init__(self, service: UserService | AsyncGenerator[UserService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: UserService | AsyncGenerator[UserService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( service=service, endpoints=lambda svc: { @@ -38,6 +40,8 @@ def __init__(self, service: UserService | AsyncGenerator[UserService], *, interc }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -68,13 +72,16 @@ async def get( ) + + + class UserServiceSync(Protocol): def get(self, request: metalstack_dot_api_dot_v2_dot_user__pb2.UserServiceGetRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_user__pb2.UserServiceGetResponse: raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") class UserServiceWSGIApplication(ConnectWSGIApplication): - def __init__(self, service: UserServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: UserServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( endpoints={ "/metalstack.api.v2.UserService/Get": EndpointSync.unary( @@ -90,6 +97,8 @@ def __init__(self, service: UserServiceSync, interceptors: Iterable[InterceptorS }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -118,3 +127,5 @@ def get( headers=headers, timeout_ms=timeout_ms, ) + + diff --git a/python/metalstack/api/v2/version_connect.py b/python/metalstack/api/v2/version_connect.py index b83555cd..08d1350f 100644 --- a/python/metalstack/api/v2/version_connect.py +++ b/python/metalstack/api/v2/version_connect.py @@ -7,6 +7,8 @@ from connectrpc.client import ConnectClient, ConnectClientSync from connectrpc.code import Code +from connectrpc.codec import Codec +from connectrpc.compression import Compression from connectrpc.errors import ConnectError from connectrpc.interceptor import Interceptor, InterceptorSync from connectrpc.method import IdempotencyLevel, MethodInfo @@ -21,7 +23,7 @@ async def get(self, request: metalstack_dot_api_dot_v2_dot_version__pb2.VersionS class VersionServiceASGIApplication(ConnectASGIApplication[VersionService]): - def __init__(self, service: VersionService | AsyncGenerator[VersionService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: VersionService | AsyncGenerator[VersionService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( service=service, endpoints=lambda svc: { @@ -38,6 +40,8 @@ def __init__(self, service: VersionService | AsyncGenerator[VersionService], *, }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -68,13 +72,16 @@ async def get( ) + + + class VersionServiceSync(Protocol): def get(self, request: metalstack_dot_api_dot_v2_dot_version__pb2.VersionServiceGetRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_version__pb2.VersionServiceGetResponse: raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") class VersionServiceWSGIApplication(ConnectWSGIApplication): - def __init__(self, service: VersionServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: VersionServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( endpoints={ "/metalstack.api.v2.VersionService/Get": EndpointSync.unary( @@ -90,6 +97,8 @@ def __init__(self, service: VersionServiceSync, interceptors: Iterable[Intercept }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -118,3 +127,5 @@ def get( headers=headers, timeout_ms=timeout_ms, ) + + diff --git a/python/metalstack/infra/v2/bmc_connect.py b/python/metalstack/infra/v2/bmc_connect.py index a5252ca7..71141f57 100644 --- a/python/metalstack/infra/v2/bmc_connect.py +++ b/python/metalstack/infra/v2/bmc_connect.py @@ -7,6 +7,8 @@ from connectrpc.client import ConnectClient, ConnectClientSync from connectrpc.code import Code +from connectrpc.codec import Codec +from connectrpc.compression import Compression from connectrpc.errors import ConnectError from connectrpc.interceptor import Interceptor, InterceptorSync from connectrpc.method import IdempotencyLevel, MethodInfo @@ -27,7 +29,7 @@ async def b_m_c_command_done(self, request: metalstack_dot_infra_dot_v2_dot_bmc_ class BMCServiceASGIApplication(ConnectASGIApplication[BMCService]): - def __init__(self, service: BMCService | AsyncGenerator[BMCService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: BMCService | AsyncGenerator[BMCService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( service=service, endpoints=lambda svc: { @@ -64,6 +66,8 @@ def __init__(self, service: BMCService | AsyncGenerator[BMCService], *, intercep }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -134,6 +138,9 @@ async def b_m_c_command_done( ) + + + class BMCServiceSync(Protocol): def update_b_m_c_info(self, request: metalstack_dot_infra_dot_v2_dot_bmc__pb2.UpdateBMCInfoRequest, ctx: RequestContext) -> metalstack_dot_infra_dot_v2_dot_bmc__pb2.UpdateBMCInfoResponse: raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") @@ -144,7 +151,7 @@ def b_m_c_command_done(self, request: metalstack_dot_infra_dot_v2_dot_bmc__pb2.B class BMCServiceWSGIApplication(ConnectWSGIApplication): - def __init__(self, service: BMCServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: BMCServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( endpoints={ "/metalstack.infra.v2.BMCService/UpdateBMCInfo": EndpointSync.unary( @@ -180,6 +187,8 @@ def __init__(self, service: BMCServiceSync, interceptors: Iterable[InterceptorSy }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -248,3 +257,5 @@ def b_m_c_command_done( headers=headers, timeout_ms=timeout_ms, ) + + diff --git a/python/metalstack/infra/v2/boot_connect.py b/python/metalstack/infra/v2/boot_connect.py index 7addd9e0..3cc39a22 100644 --- a/python/metalstack/infra/v2/boot_connect.py +++ b/python/metalstack/infra/v2/boot_connect.py @@ -7,6 +7,8 @@ from connectrpc.client import ConnectClient, ConnectClientSync from connectrpc.code import Code +from connectrpc.codec import Codec +from connectrpc.compression import Compression from connectrpc.errors import ConnectError from connectrpc.interceptor import Interceptor, InterceptorSync from connectrpc.method import IdempotencyLevel, MethodInfo @@ -36,7 +38,7 @@ async def installation_succeeded(self, request: metalstack_dot_infra_dot_v2_dot_ class BootServiceASGIApplication(ConnectASGIApplication[BootService]): - def __init__(self, service: BootService | AsyncGenerator[BootService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: BootService | AsyncGenerator[BootService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( service=service, endpoints=lambda svc: { @@ -103,6 +105,8 @@ def __init__(self, service: BootService | AsyncGenerator[BootService], *, interc }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -233,6 +237,9 @@ async def installation_succeeded( ) + + + class BootServiceSync(Protocol): def dhcp(self, request: metalstack_dot_infra_dot_v2_dot_boot__pb2.BootServiceDhcpRequest, ctx: RequestContext) -> metalstack_dot_infra_dot_v2_dot_boot__pb2.BootServiceDhcpResponse: raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") @@ -249,7 +256,7 @@ def installation_succeeded(self, request: metalstack_dot_infra_dot_v2_dot_boot__ class BootServiceWSGIApplication(ConnectWSGIApplication): - def __init__(self, service: BootServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: BootServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( endpoints={ "/metalstack.infra.v2.BootService/Dhcp": EndpointSync.unary( @@ -315,6 +322,8 @@ def __init__(self, service: BootServiceSync, interceptors: Iterable[InterceptorS }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -443,3 +452,5 @@ def installation_succeeded( headers=headers, timeout_ms=timeout_ms, ) + + diff --git a/python/metalstack/infra/v2/component_connect.py b/python/metalstack/infra/v2/component_connect.py index bc9113c1..38d4a515 100644 --- a/python/metalstack/infra/v2/component_connect.py +++ b/python/metalstack/infra/v2/component_connect.py @@ -7,6 +7,8 @@ from connectrpc.client import ConnectClient, ConnectClientSync from connectrpc.code import Code +from connectrpc.codec import Codec +from connectrpc.compression import Compression from connectrpc.errors import ConnectError from connectrpc.interceptor import Interceptor, InterceptorSync from connectrpc.method import IdempotencyLevel, MethodInfo @@ -21,7 +23,7 @@ async def ping(self, request: metalstack_dot_infra_dot_v2_dot_component__pb2.Com class ComponentServiceASGIApplication(ConnectASGIApplication[ComponentService]): - def __init__(self, service: ComponentService | AsyncGenerator[ComponentService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: ComponentService | AsyncGenerator[ComponentService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( service=service, endpoints=lambda svc: { @@ -38,6 +40,8 @@ def __init__(self, service: ComponentService | AsyncGenerator[ComponentService], }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -68,13 +72,16 @@ async def ping( ) + + + class ComponentServiceSync(Protocol): def ping(self, request: metalstack_dot_infra_dot_v2_dot_component__pb2.ComponentServicePingRequest, ctx: RequestContext) -> metalstack_dot_infra_dot_v2_dot_component__pb2.ComponentServicePingResponse: raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") class ComponentServiceWSGIApplication(ConnectWSGIApplication): - def __init__(self, service: ComponentServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: ComponentServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( endpoints={ "/metalstack.infra.v2.ComponentService/Ping": EndpointSync.unary( @@ -90,6 +97,8 @@ def __init__(self, service: ComponentServiceSync, interceptors: Iterable[Interce }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -118,3 +127,5 @@ def ping( headers=headers, timeout_ms=timeout_ms, ) + + diff --git a/python/metalstack/infra/v2/event_connect.py b/python/metalstack/infra/v2/event_connect.py index c5bb73f7..6eaf0274 100644 --- a/python/metalstack/infra/v2/event_connect.py +++ b/python/metalstack/infra/v2/event_connect.py @@ -7,6 +7,8 @@ from connectrpc.client import ConnectClient, ConnectClientSync from connectrpc.code import Code +from connectrpc.codec import Codec +from connectrpc.compression import Compression from connectrpc.errors import ConnectError from connectrpc.interceptor import Interceptor, InterceptorSync from connectrpc.method import IdempotencyLevel, MethodInfo @@ -21,7 +23,7 @@ async def send(self, request: metalstack_dot_infra_dot_v2_dot_event__pb2.EventSe class EventServiceASGIApplication(ConnectASGIApplication[EventService]): - def __init__(self, service: EventService | AsyncGenerator[EventService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: EventService | AsyncGenerator[EventService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( service=service, endpoints=lambda svc: { @@ -38,6 +40,8 @@ def __init__(self, service: EventService | AsyncGenerator[EventService], *, inte }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -68,13 +72,16 @@ async def send( ) + + + class EventServiceSync(Protocol): def send(self, request: metalstack_dot_infra_dot_v2_dot_event__pb2.EventServiceSendRequest, ctx: RequestContext) -> metalstack_dot_infra_dot_v2_dot_event__pb2.EventServiceSendResponse: raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") class EventServiceWSGIApplication(ConnectWSGIApplication): - def __init__(self, service: EventServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: EventServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( endpoints={ "/metalstack.infra.v2.EventService/Send": EndpointSync.unary( @@ -90,6 +97,8 @@ def __init__(self, service: EventServiceSync, interceptors: Iterable[Interceptor }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -118,3 +127,5 @@ def send( headers=headers, timeout_ms=timeout_ms, ) + + diff --git a/python/metalstack/infra/v2/switch_connect.py b/python/metalstack/infra/v2/switch_connect.py index 68be8a2c..764b6274 100644 --- a/python/metalstack/infra/v2/switch_connect.py +++ b/python/metalstack/infra/v2/switch_connect.py @@ -7,6 +7,8 @@ from connectrpc.client import ConnectClient, ConnectClientSync from connectrpc.code import Code +from connectrpc.codec import Codec +from connectrpc.compression import Compression from connectrpc.errors import ConnectError from connectrpc.interceptor import Interceptor, InterceptorSync from connectrpc.method import IdempotencyLevel, MethodInfo @@ -27,7 +29,7 @@ async def heartbeat(self, request: metalstack_dot_infra_dot_v2_dot_switch__pb2.S class SwitchServiceASGIApplication(ConnectASGIApplication[SwitchService]): - def __init__(self, service: SwitchService | AsyncGenerator[SwitchService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: SwitchService | AsyncGenerator[SwitchService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( service=service, endpoints=lambda svc: { @@ -64,6 +66,8 @@ def __init__(self, service: SwitchService | AsyncGenerator[SwitchService], *, in }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -134,6 +138,9 @@ async def heartbeat( ) + + + class SwitchServiceSync(Protocol): def get(self, request: metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceGetRequest, ctx: RequestContext) -> metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceGetResponse: raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") @@ -144,7 +151,7 @@ def heartbeat(self, request: metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchS class SwitchServiceWSGIApplication(ConnectWSGIApplication): - def __init__(self, service: SwitchServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None) -> None: + def __init__(self, service: SwitchServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = None) -> None: super().__init__( endpoints={ "/metalstack.infra.v2.SwitchService/Get": EndpointSync.unary( @@ -180,6 +187,8 @@ def __init__(self, service: SwitchServiceSync, interceptors: Iterable[Intercepto }, interceptors=interceptors, read_max_bytes=read_max_bytes, + compressions=compressions, + codecs=codecs, ) @property @@ -248,3 +257,5 @@ def heartbeat( headers=headers, timeout_ms=timeout_ms, ) + + diff --git a/python/setup.py b/python/setup.py index 348e2746..25f1c212 100644 --- a/python/setup.py +++ b/python/setup.py @@ -4,8 +4,8 @@ NAME = "metal-stack-api" REQUIRES = [ - "connect-python>=0.7.0", - "protovalidate>=1.1.0", + "connect-python>=0.10.0", + "protovalidate>=1.2.0", ] setup( From af6cc578c769b500f47c0735822c5ac29c76666a Mon Sep 17 00:00:00 2001 From: Gerrit Date: Mon, 1 Jun 2026 13:32:34 +0200 Subject: [PATCH 2/2] Update to new package name. --- python/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/setup.py b/python/setup.py index 25f1c212..c9d0298b 100644 --- a/python/setup.py +++ b/python/setup.py @@ -4,7 +4,7 @@ NAME = "metal-stack-api" REQUIRES = [ - "connect-python>=0.10.0", + "connectrpc>=0.10.0", "protovalidate>=1.2.0", ]