diff --git a/go.mod b/go.mod index 463acc71..5d186d31 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,6 @@ require ( buf.build/go/protovalidate v1.1.0 connectrpc.com/connect v1.19.1 github.com/bufbuild/protocompile v0.14.1 - github.com/davecgh/go-spew v1.1.1 github.com/go-task/slim-sprig/v3 v3.0.0 github.com/golang-jwt/jwt/v5 v5.3.0 github.com/google/go-cmp v0.7.0 @@ -19,17 +18,18 @@ require ( require ( cel.dev/expr v0.25.1 // indirect github.com/antlr4-go/antlr/v4 v4.13.1 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect github.com/google/cel-go v0.26.1 // indirect - github.com/klauspost/compress v1.18.2 // indirect + github.com/klauspost/compress v1.18.3 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/minio/minlz v1.0.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/stoewer/go-strcase v1.3.1 // indirect github.com/stretchr/objx v0.5.3 // indirect - golang.org/x/exp v0.0.0-20251209150349-8475f28825e9 // indirect - golang.org/x/text v0.32.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20251213004720-97cd9d5aeac2 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20251213004720-97cd9d5aeac2 // indirect + golang.org/x/exp v0.0.0-20260112195511-716be5621a96 // indirect + golang.org/x/text v0.33.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3 // 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 faa47374..51d0c265 100644 --- a/go.sum +++ b/go.sum @@ -24,8 +24,8 @@ github.com/google/cel-go v0.26.1 h1:iPbVVEdkhTX++hpe3lzSk7D3G3QSYqLGoHOcEio+UXQ= github.com/google/cel-go v0.26.1/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= -github.com/klauspost/compress v1.18.2 h1:iiPHWW0YrcFgpBYhsA6D1+fqHssJscY/Tm/y2Uqnapk= -github.com/klauspost/compress v1.18.2/go.mod h1:R0h/fSBs8DE4ENlcrlib3PsXS61voFxhIs2DeRhCvJ4= +github.com/klauspost/compress v1.18.3 h1:9PJRvfbmTabkOX8moIpXPbMMbYN60bWImDDU7L+/6zw= +github.com/klauspost/compress v1.18.3/go.mod h1:R0h/fSBs8DE4ENlcrlib3PsXS61voFxhIs2DeRhCvJ4= github.com/klauspost/connect-compress/v2 v2.1.0 h1:8fM8QrVeHT69e5VVSh4yjDaQASYIvOp2uMZq7nVLj2U= github.com/klauspost/connect-compress/v2 v2.1.0/go.mod h1:Ayurh2wscMMx3AwdGGVL+ylSR5316WfApREDgsqHyH8= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= @@ -56,14 +56,14 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= -golang.org/x/exp v0.0.0-20251209150349-8475f28825e9 h1:MDfG8Cvcqlt9XXrmEiD4epKn7VJHZO84hejP9Jmp0MM= -golang.org/x/exp v0.0.0-20251209150349-8475f28825e9/go.mod h1:EPRbTFwzwjXj9NpYyyrvenVh9Y+GFeEvMNh7Xuz7xgU= -golang.org/x/text v0.32.0 h1:ZD01bjUt1FQ9WJ0ClOL5vxgxOI/sVCNgX1YtKwcY0mU= -golang.org/x/text v0.32.0/go.mod h1:o/rUWzghvpD5TXrTIBuJU77MTaN0ljMWE47kxGJQ7jY= -google.golang.org/genproto/googleapis/api v0.0.0-20251213004720-97cd9d5aeac2 h1:7LRqPCEdE4TP4/9psdaB7F2nhZFfBiGJomA5sojLWdU= -google.golang.org/genproto/googleapis/api v0.0.0-20251213004720-97cd9d5aeac2/go.mod h1:+rXWjjaukWZun3mLfjmVnQi18E1AsFbDN9QdJ5YXLto= -google.golang.org/genproto/googleapis/rpc v0.0.0-20251213004720-97cd9d5aeac2 h1:2I6GHUeJ/4shcDpoUlLs/2WPnhg7yJwvXtqcMJt9liA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20251213004720-97cd9d5aeac2/go.mod h1:7i2o+ce6H/6BluujYR+kqX3GKH+dChPTQU19wjRPiGk= +golang.org/x/exp v0.0.0-20260112195511-716be5621a96 h1:Z/6YuSHTLOHfNFdb8zVZomZr7cqNgTJvA8+Qz75D8gU= +golang.org/x/exp v0.0.0-20260112195511-716be5621a96/go.mod h1:nzimsREAkjBCIEFtHiYkrJyT+2uy9YZJB7H1k68CXZU= +golang.org/x/text v0.33.0 h1:B3njUFyqtHDUI5jMn1YIr5B0IE2U0qck04r6d4KPAxE= +golang.org/x/text v0.33.0/go.mod h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8= +google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3 h1:X9z6obt+cWRX8XjDVOn+SZWhWe5kZHm46TThU9j+jss= +google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3/go.mod h1:dd646eSK+Dk9kxVBl1nChEOhJPtMXriCcVb4x3o6J+E= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3 h1:C4WAdL+FbjnGlpp2S+HMVhBeCq2Lcib4xZqfPNF6OoQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3/go.mod h1:j9x/tPzZkyxcgEFkiKEEGxfvyumM01BEtsW8xzOahRQ= 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/Makefile b/proto/Makefile index cc9283d3..068f31a0 100644 --- a/proto/Makefile +++ b/proto/Makefile @@ -1,5 +1,5 @@ MAKEFLAGS += --no-print-directory -BUF_VERSION := 1.63.0 +BUF_VERSION := 1.64.0 _buf: docker run --rm \ diff --git a/proto/buf.gen.yaml b/proto/buf.gen.yaml index 8b1c86e4..91849f6f 100644 --- a/proto/buf.gen.yaml +++ b/proto/buf.gen.yaml @@ -20,11 +20,11 @@ plugins: out: ../go opt: paths=source_relative,simple # python - - remote: buf.build/protocolbuffers/python:v32.1 + - remote: buf.build/protocolbuffers/python:v33.4 out: ../python - - remote: buf.build/protocolbuffers/pyi:v32.1 + - remote: buf.build/protocolbuffers/pyi:v33.4 out: ../python - - remote: buf.build/connectrpc/python:v0.5.0 + - remote: buf.build/connectrpc/python:v0.7.1 out: ../python # docs - remote: buf.build/community/pseudomuto-doc:v1.5.1 diff --git a/python/metalstack/admin/v2/filesystem_connect.py b/python/metalstack/admin/v2/filesystem_connect.py index 8591a88a..ed1b5c9f 100644 --- a/python/metalstack/admin/v2/filesystem_connect.py +++ b/python/metalstack/admin/v2/filesystem_connect.py @@ -2,7 +2,7 @@ # Generated by https://github.com/connectrpc/connect-python. DO NOT EDIT! # source: metalstack/admin/v2/filesystem.proto -from collections.abc import AsyncIterator, Iterable, Iterator, Mapping +from collections.abc import AsyncGenerator, AsyncIterator, Iterable, Iterator, Mapping from typing import Protocol from connectrpc.client import ConnectClient, ConnectClientSync @@ -26,10 +26,11 @@ async def delete(self, request: metalstack_dot_admin_dot_v2_dot_filesystem__pb2. raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") -class FilesystemServiceASGIApplication(ConnectASGIApplication): - def __init__(self, service: FilesystemService, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: +class FilesystemServiceASGIApplication(ConnectASGIApplication[FilesystemService]): + def __init__(self, service: FilesystemService | AsyncGenerator[FilesystemService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: super().__init__( - endpoints={ + service=service, + endpoints=lambda svc: { "/metalstack.admin.v2.FilesystemService/Create": Endpoint.unary( method=MethodInfo( name="Create", @@ -38,7 +39,7 @@ def __init__(self, service: FilesystemService, *, interceptors: Iterable[Interce output=metalstack_dot_admin_dot_v2_dot_filesystem__pb2.FilesystemServiceCreateResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.create, + function=svc.create, ), "/metalstack.admin.v2.FilesystemService/Update": Endpoint.unary( method=MethodInfo( @@ -48,7 +49,7 @@ def __init__(self, service: FilesystemService, *, interceptors: Iterable[Interce output=metalstack_dot_admin_dot_v2_dot_filesystem__pb2.FilesystemServiceUpdateResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.update, + function=svc.update, ), "/metalstack.admin.v2.FilesystemService/Delete": Endpoint.unary( method=MethodInfo( @@ -58,7 +59,7 @@ def __init__(self, service: FilesystemService, *, interceptors: Iterable[Interce output=metalstack_dot_admin_dot_v2_dot_filesystem__pb2.FilesystemServiceDeleteResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.delete, + function=svc.delete, ), }, interceptors=interceptors, diff --git a/python/metalstack/admin/v2/filesystem_pb2.py b/python/metalstack/admin/v2/filesystem_pb2.py index 250e4e34..5f40ed6d 100644 --- a/python/metalstack/admin/v2/filesystem_pb2.py +++ b/python/metalstack/admin/v2/filesystem_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: metalstack/admin/v2/filesystem.proto -# Protobuf Python Version: 6.32.1 +# Protobuf Python Version: 6.33.4 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 6, - 32, - 1, + 33, + 4, '', 'metalstack/admin/v2/filesystem.proto' ) diff --git a/python/metalstack/admin/v2/image_connect.py b/python/metalstack/admin/v2/image_connect.py index 253d713a..0ea45643 100644 --- a/python/metalstack/admin/v2/image_connect.py +++ b/python/metalstack/admin/v2/image_connect.py @@ -2,7 +2,7 @@ # Generated by https://github.com/connectrpc/connect-python. DO NOT EDIT! # source: metalstack/admin/v2/image.proto -from collections.abc import AsyncIterator, Iterable, Iterator, Mapping +from collections.abc import AsyncGenerator, AsyncIterator, Iterable, Iterator, Mapping from typing import Protocol from connectrpc.client import ConnectClient, ConnectClientSync @@ -29,10 +29,11 @@ async def usage(self, request: metalstack_dot_admin_dot_v2_dot_image__pb2.ImageS raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") -class ImageServiceASGIApplication(ConnectASGIApplication): - def __init__(self, service: ImageService, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: +class ImageServiceASGIApplication(ConnectASGIApplication[ImageService]): + def __init__(self, service: ImageService | AsyncGenerator[ImageService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: super().__init__( - endpoints={ + service=service, + endpoints=lambda svc: { "/metalstack.admin.v2.ImageService/Create": Endpoint.unary( method=MethodInfo( name="Create", @@ -41,7 +42,7 @@ def __init__(self, service: ImageService, *, interceptors: Iterable[Interceptor] output=metalstack_dot_admin_dot_v2_dot_image__pb2.ImageServiceCreateResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.create, + function=svc.create, ), "/metalstack.admin.v2.ImageService/Update": Endpoint.unary( method=MethodInfo( @@ -51,7 +52,7 @@ def __init__(self, service: ImageService, *, interceptors: Iterable[Interceptor] output=metalstack_dot_admin_dot_v2_dot_image__pb2.ImageServiceUpdateResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.update, + function=svc.update, ), "/metalstack.admin.v2.ImageService/Delete": Endpoint.unary( method=MethodInfo( @@ -61,7 +62,7 @@ def __init__(self, service: ImageService, *, interceptors: Iterable[Interceptor] output=metalstack_dot_admin_dot_v2_dot_image__pb2.ImageServiceDeleteResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.delete, + function=svc.delete, ), "/metalstack.admin.v2.ImageService/Usage": Endpoint.unary( method=MethodInfo( @@ -71,7 +72,7 @@ def __init__(self, service: ImageService, *, interceptors: Iterable[Interceptor] output=metalstack_dot_admin_dot_v2_dot_image__pb2.ImageServiceUsageResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.usage, + function=svc.usage, ), }, interceptors=interceptors, diff --git a/python/metalstack/admin/v2/image_pb2.py b/python/metalstack/admin/v2/image_pb2.py index b5646d2c..33650ed4 100644 --- a/python/metalstack/admin/v2/image_pb2.py +++ b/python/metalstack/admin/v2/image_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: metalstack/admin/v2/image.proto -# Protobuf Python Version: 6.32.1 +# Protobuf Python Version: 6.33.4 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 6, - 32, - 1, + 33, + 4, '', 'metalstack/admin/v2/image.proto' ) diff --git a/python/metalstack/admin/v2/ip_connect.py b/python/metalstack/admin/v2/ip_connect.py index 6733dc97..5d8701e5 100644 --- a/python/metalstack/admin/v2/ip_connect.py +++ b/python/metalstack/admin/v2/ip_connect.py @@ -2,7 +2,7 @@ # Generated by https://github.com/connectrpc/connect-python. DO NOT EDIT! # source: metalstack/admin/v2/ip.proto -from collections.abc import AsyncIterator, Iterable, Iterator, Mapping +from collections.abc import AsyncGenerator, AsyncIterator, Iterable, Iterator, Mapping from typing import Protocol from connectrpc.client import ConnectClient, ConnectClientSync @@ -20,10 +20,11 @@ async def list(self, request: metalstack_dot_admin_dot_v2_dot_ip__pb2.IPServiceL raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") -class IPServiceASGIApplication(ConnectASGIApplication): - def __init__(self, service: IPService, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: +class IPServiceASGIApplication(ConnectASGIApplication[IPService]): + def __init__(self, service: IPService | AsyncGenerator[IPService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: super().__init__( - endpoints={ + service=service, + endpoints=lambda svc: { "/metalstack.admin.v2.IPService/List": Endpoint.unary( method=MethodInfo( name="List", @@ -32,7 +33,7 @@ def __init__(self, service: IPService, *, interceptors: Iterable[Interceptor]=() output=metalstack_dot_admin_dot_v2_dot_ip__pb2.IPServiceListResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.list, + function=svc.list, ), }, interceptors=interceptors, diff --git a/python/metalstack/admin/v2/ip_pb2.py b/python/metalstack/admin/v2/ip_pb2.py index f045c68a..dfdb59ef 100644 --- a/python/metalstack/admin/v2/ip_pb2.py +++ b/python/metalstack/admin/v2/ip_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: metalstack/admin/v2/ip.proto -# Protobuf Python Version: 6.32.1 +# Protobuf Python Version: 6.33.4 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 6, - 32, - 1, + 33, + 4, '', 'metalstack/admin/v2/ip.proto' ) diff --git a/python/metalstack/admin/v2/machine_connect.py b/python/metalstack/admin/v2/machine_connect.py index 93bc9092..9031bc05 100644 --- a/python/metalstack/admin/v2/machine_connect.py +++ b/python/metalstack/admin/v2/machine_connect.py @@ -2,7 +2,7 @@ # Generated by https://github.com/connectrpc/connect-python. DO NOT EDIT! # source: metalstack/admin/v2/machine.proto -from collections.abc import AsyncIterator, Iterable, Iterator, Mapping +from collections.abc import AsyncGenerator, AsyncIterator, Iterable, Iterator, Mapping from typing import Protocol from connectrpc.client import ConnectClient, ConnectClientSync @@ -23,10 +23,11 @@ async def list(self, request: metalstack_dot_admin_dot_v2_dot_machine__pb2.Machi raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") -class MachineServiceASGIApplication(ConnectASGIApplication): - def __init__(self, service: MachineService, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: +class MachineServiceASGIApplication(ConnectASGIApplication[MachineService]): + def __init__(self, service: MachineService | AsyncGenerator[MachineService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: super().__init__( - endpoints={ + service=service, + endpoints=lambda svc: { "/metalstack.admin.v2.MachineService/Get": Endpoint.unary( method=MethodInfo( name="Get", @@ -35,7 +36,7 @@ def __init__(self, service: MachineService, *, interceptors: Iterable[Intercepto output=metalstack_dot_admin_dot_v2_dot_machine__pb2.MachineServiceGetResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.get, + function=svc.get, ), "/metalstack.admin.v2.MachineService/List": Endpoint.unary( method=MethodInfo( @@ -45,7 +46,7 @@ def __init__(self, service: MachineService, *, interceptors: Iterable[Intercepto output=metalstack_dot_admin_dot_v2_dot_machine__pb2.MachineServiceListResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.list, + function=svc.list, ), }, interceptors=interceptors, diff --git a/python/metalstack/admin/v2/machine_pb2.py b/python/metalstack/admin/v2/machine_pb2.py index c141a7d9..c96cbb10 100644 --- a/python/metalstack/admin/v2/machine_pb2.py +++ b/python/metalstack/admin/v2/machine_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: metalstack/admin/v2/machine.proto -# Protobuf Python Version: 6.32.1 +# Protobuf Python Version: 6.33.4 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 6, - 32, - 1, + 33, + 4, '', 'metalstack/admin/v2/machine.proto' ) diff --git a/python/metalstack/admin/v2/network_connect.py b/python/metalstack/admin/v2/network_connect.py index a18d0f06..77416cb3 100644 --- a/python/metalstack/admin/v2/network_connect.py +++ b/python/metalstack/admin/v2/network_connect.py @@ -2,7 +2,7 @@ # Generated by https://github.com/connectrpc/connect-python. DO NOT EDIT! # source: metalstack/admin/v2/network.proto -from collections.abc import AsyncIterator, Iterable, Iterator, Mapping +from collections.abc import AsyncGenerator, AsyncIterator, Iterable, Iterator, Mapping from typing import Protocol from connectrpc.client import ConnectClient, ConnectClientSync @@ -32,10 +32,11 @@ async def list(self, request: metalstack_dot_admin_dot_v2_dot_network__pb2.Netwo raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") -class NetworkServiceASGIApplication(ConnectASGIApplication): - def __init__(self, service: NetworkService, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: +class NetworkServiceASGIApplication(ConnectASGIApplication[NetworkService]): + def __init__(self, service: NetworkService | AsyncGenerator[NetworkService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: super().__init__( - endpoints={ + service=service, + endpoints=lambda svc: { "/metalstack.admin.v2.NetworkService/Get": Endpoint.unary( method=MethodInfo( name="Get", @@ -44,7 +45,7 @@ def __init__(self, service: NetworkService, *, interceptors: Iterable[Intercepto output=metalstack_dot_admin_dot_v2_dot_network__pb2.NetworkServiceGetResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.get, + function=svc.get, ), "/metalstack.admin.v2.NetworkService/Create": Endpoint.unary( method=MethodInfo( @@ -54,7 +55,7 @@ def __init__(self, service: NetworkService, *, interceptors: Iterable[Intercepto output=metalstack_dot_admin_dot_v2_dot_network__pb2.NetworkServiceCreateResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.create, + function=svc.create, ), "/metalstack.admin.v2.NetworkService/Update": Endpoint.unary( method=MethodInfo( @@ -64,7 +65,7 @@ def __init__(self, service: NetworkService, *, interceptors: Iterable[Intercepto output=metalstack_dot_admin_dot_v2_dot_network__pb2.NetworkServiceUpdateResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.update, + function=svc.update, ), "/metalstack.admin.v2.NetworkService/Delete": Endpoint.unary( method=MethodInfo( @@ -74,7 +75,7 @@ def __init__(self, service: NetworkService, *, interceptors: Iterable[Intercepto output=metalstack_dot_admin_dot_v2_dot_network__pb2.NetworkServiceDeleteResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.delete, + function=svc.delete, ), "/metalstack.admin.v2.NetworkService/List": Endpoint.unary( method=MethodInfo( @@ -84,7 +85,7 @@ def __init__(self, service: NetworkService, *, interceptors: Iterable[Intercepto output=metalstack_dot_admin_dot_v2_dot_network__pb2.NetworkServiceListResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.list, + function=svc.list, ), }, interceptors=interceptors, diff --git a/python/metalstack/admin/v2/network_pb2.py b/python/metalstack/admin/v2/network_pb2.py index 6b5c7170..760b60e6 100644 --- a/python/metalstack/admin/v2/network_pb2.py +++ b/python/metalstack/admin/v2/network_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: metalstack/admin/v2/network.proto -# Protobuf Python Version: 6.32.1 +# Protobuf Python Version: 6.33.4 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 6, - 32, - 1, + 33, + 4, '', 'metalstack/admin/v2/network.proto' ) diff --git a/python/metalstack/admin/v2/partition_connect.py b/python/metalstack/admin/v2/partition_connect.py index 6ee1528e..bbe6ac0f 100644 --- a/python/metalstack/admin/v2/partition_connect.py +++ b/python/metalstack/admin/v2/partition_connect.py @@ -2,7 +2,7 @@ # Generated by https://github.com/connectrpc/connect-python. DO NOT EDIT! # source: metalstack/admin/v2/partition.proto -from collections.abc import AsyncIterator, Iterable, Iterator, Mapping +from collections.abc import AsyncGenerator, AsyncIterator, Iterable, Iterator, Mapping from typing import Protocol from connectrpc.client import ConnectClient, ConnectClientSync @@ -29,10 +29,11 @@ async def capacity(self, request: metalstack_dot_admin_dot_v2_dot_partition__pb2 raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") -class PartitionServiceASGIApplication(ConnectASGIApplication): - def __init__(self, service: PartitionService, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: +class PartitionServiceASGIApplication(ConnectASGIApplication[PartitionService]): + def __init__(self, service: PartitionService | AsyncGenerator[PartitionService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: super().__init__( - endpoints={ + service=service, + endpoints=lambda svc: { "/metalstack.admin.v2.PartitionService/Create": Endpoint.unary( method=MethodInfo( name="Create", @@ -41,7 +42,7 @@ def __init__(self, service: PartitionService, *, interceptors: Iterable[Intercep output=metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceCreateResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.create, + function=svc.create, ), "/metalstack.admin.v2.PartitionService/Update": Endpoint.unary( method=MethodInfo( @@ -51,7 +52,7 @@ def __init__(self, service: PartitionService, *, interceptors: Iterable[Intercep output=metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceUpdateResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.update, + function=svc.update, ), "/metalstack.admin.v2.PartitionService/Delete": Endpoint.unary( method=MethodInfo( @@ -61,7 +62,7 @@ def __init__(self, service: PartitionService, *, interceptors: Iterable[Intercep output=metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceDeleteResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.delete, + function=svc.delete, ), "/metalstack.admin.v2.PartitionService/Capacity": Endpoint.unary( method=MethodInfo( @@ -71,7 +72,7 @@ def __init__(self, service: PartitionService, *, interceptors: Iterable[Intercep output=metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceCapacityResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.capacity, + function=svc.capacity, ), }, interceptors=interceptors, diff --git a/python/metalstack/admin/v2/partition_pb2.py b/python/metalstack/admin/v2/partition_pb2.py index 92b4dd0a..2f34a586 100644 --- a/python/metalstack/admin/v2/partition_pb2.py +++ b/python/metalstack/admin/v2/partition_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: metalstack/admin/v2/partition.proto -# Protobuf Python Version: 6.32.1 +# Protobuf Python Version: 6.33.4 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 6, - 32, - 1, + 33, + 4, '', 'metalstack/admin/v2/partition.proto' ) diff --git a/python/metalstack/admin/v2/project_connect.py b/python/metalstack/admin/v2/project_connect.py index abb8efa1..ca4a2942 100644 --- a/python/metalstack/admin/v2/project_connect.py +++ b/python/metalstack/admin/v2/project_connect.py @@ -2,7 +2,7 @@ # Generated by https://github.com/connectrpc/connect-python. DO NOT EDIT! # source: metalstack/admin/v2/project.proto -from collections.abc import AsyncIterator, Iterable, Iterator, Mapping +from collections.abc import AsyncGenerator, AsyncIterator, Iterable, Iterator, Mapping from typing import Protocol from connectrpc.client import ConnectClient, ConnectClientSync @@ -20,10 +20,11 @@ async def list(self, request: metalstack_dot_admin_dot_v2_dot_project__pb2.Proje raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") -class ProjectServiceASGIApplication(ConnectASGIApplication): - def __init__(self, service: ProjectService, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: +class ProjectServiceASGIApplication(ConnectASGIApplication[ProjectService]): + def __init__(self, service: ProjectService | AsyncGenerator[ProjectService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: super().__init__( - endpoints={ + service=service, + endpoints=lambda svc: { "/metalstack.admin.v2.ProjectService/List": Endpoint.unary( method=MethodInfo( name="List", @@ -32,7 +33,7 @@ def __init__(self, service: ProjectService, *, interceptors: Iterable[Intercepto output=metalstack_dot_admin_dot_v2_dot_project__pb2.ProjectServiceListResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.list, + function=svc.list, ), }, interceptors=interceptors, diff --git a/python/metalstack/admin/v2/project_pb2.py b/python/metalstack/admin/v2/project_pb2.py index 6f38e349..352ece48 100644 --- a/python/metalstack/admin/v2/project_pb2.py +++ b/python/metalstack/admin/v2/project_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: metalstack/admin/v2/project.proto -# Protobuf Python Version: 6.32.1 +# Protobuf Python Version: 6.33.4 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 6, - 32, - 1, + 33, + 4, '', 'metalstack/admin/v2/project.proto' ) diff --git a/python/metalstack/admin/v2/size_connect.py b/python/metalstack/admin/v2/size_connect.py index 8e6d6546..6135081d 100644 --- a/python/metalstack/admin/v2/size_connect.py +++ b/python/metalstack/admin/v2/size_connect.py @@ -2,7 +2,7 @@ # Generated by https://github.com/connectrpc/connect-python. DO NOT EDIT! # source: metalstack/admin/v2/size.proto -from collections.abc import AsyncIterator, Iterable, Iterator, Mapping +from collections.abc import AsyncGenerator, AsyncIterator, Iterable, Iterator, Mapping from typing import Protocol from connectrpc.client import ConnectClient, ConnectClientSync @@ -26,10 +26,11 @@ async def delete(self, request: metalstack_dot_admin_dot_v2_dot_size__pb2.SizeSe raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") -class SizeServiceASGIApplication(ConnectASGIApplication): - def __init__(self, service: SizeService, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: +class SizeServiceASGIApplication(ConnectASGIApplication[SizeService]): + def __init__(self, service: SizeService | AsyncGenerator[SizeService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: super().__init__( - endpoints={ + service=service, + endpoints=lambda svc: { "/metalstack.admin.v2.SizeService/Create": Endpoint.unary( method=MethodInfo( name="Create", @@ -38,7 +39,7 @@ def __init__(self, service: SizeService, *, interceptors: Iterable[Interceptor]= output=metalstack_dot_admin_dot_v2_dot_size__pb2.SizeServiceCreateResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.create, + function=svc.create, ), "/metalstack.admin.v2.SizeService/Update": Endpoint.unary( method=MethodInfo( @@ -48,7 +49,7 @@ def __init__(self, service: SizeService, *, interceptors: Iterable[Interceptor]= output=metalstack_dot_admin_dot_v2_dot_size__pb2.SizeServiceUpdateResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.update, + function=svc.update, ), "/metalstack.admin.v2.SizeService/Delete": Endpoint.unary( method=MethodInfo( @@ -58,7 +59,7 @@ def __init__(self, service: SizeService, *, interceptors: Iterable[Interceptor]= output=metalstack_dot_admin_dot_v2_dot_size__pb2.SizeServiceDeleteResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.delete, + function=svc.delete, ), }, interceptors=interceptors, diff --git a/python/metalstack/admin/v2/size_pb2.py b/python/metalstack/admin/v2/size_pb2.py index 42676295..79977085 100644 --- a/python/metalstack/admin/v2/size_pb2.py +++ b/python/metalstack/admin/v2/size_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: metalstack/admin/v2/size.proto -# Protobuf Python Version: 6.32.1 +# Protobuf Python Version: 6.33.4 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 6, - 32, - 1, + 33, + 4, '', 'metalstack/admin/v2/size.proto' ) diff --git a/python/metalstack/admin/v2/switch_connect.py b/python/metalstack/admin/v2/switch_connect.py index b703d406..8bc418b0 100644 --- a/python/metalstack/admin/v2/switch_connect.py +++ b/python/metalstack/admin/v2/switch_connect.py @@ -2,7 +2,7 @@ # Generated by https://github.com/connectrpc/connect-python. DO NOT EDIT! # source: metalstack/admin/v2/switch.proto -from collections.abc import AsyncIterator, Iterable, Iterator, Mapping +from collections.abc import AsyncGenerator, AsyncIterator, Iterable, Iterator, Mapping from typing import Protocol from connectrpc.client import ConnectClient, ConnectClientSync @@ -35,10 +35,11 @@ async def port(self, request: metalstack_dot_admin_dot_v2_dot_switch__pb2.Switch raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") -class SwitchServiceASGIApplication(ConnectASGIApplication): - def __init__(self, service: SwitchService, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: +class SwitchServiceASGIApplication(ConnectASGIApplication[SwitchService]): + def __init__(self, service: SwitchService | AsyncGenerator[SwitchService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: super().__init__( - endpoints={ + service=service, + endpoints=lambda svc: { "/metalstack.admin.v2.SwitchService/Get": Endpoint.unary( method=MethodInfo( name="Get", @@ -47,7 +48,7 @@ def __init__(self, service: SwitchService, *, interceptors: Iterable[Interceptor output=metalstack_dot_admin_dot_v2_dot_switch__pb2.SwitchServiceGetResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.get, + function=svc.get, ), "/metalstack.admin.v2.SwitchService/List": Endpoint.unary( method=MethodInfo( @@ -57,7 +58,7 @@ def __init__(self, service: SwitchService, *, interceptors: Iterable[Interceptor output=metalstack_dot_admin_dot_v2_dot_switch__pb2.SwitchServiceListResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.list, + function=svc.list, ), "/metalstack.admin.v2.SwitchService/Update": Endpoint.unary( method=MethodInfo( @@ -67,7 +68,7 @@ def __init__(self, service: SwitchService, *, interceptors: Iterable[Interceptor output=metalstack_dot_admin_dot_v2_dot_switch__pb2.SwitchServiceUpdateResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.update, + function=svc.update, ), "/metalstack.admin.v2.SwitchService/Delete": Endpoint.unary( method=MethodInfo( @@ -77,7 +78,7 @@ def __init__(self, service: SwitchService, *, interceptors: Iterable[Interceptor output=metalstack_dot_admin_dot_v2_dot_switch__pb2.SwitchServiceDeleteResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.delete, + function=svc.delete, ), "/metalstack.admin.v2.SwitchService/Migrate": Endpoint.unary( method=MethodInfo( @@ -87,7 +88,7 @@ def __init__(self, service: SwitchService, *, interceptors: Iterable[Interceptor output=metalstack_dot_admin_dot_v2_dot_switch__pb2.SwitchServiceMigrateResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.migrate, + function=svc.migrate, ), "/metalstack.admin.v2.SwitchService/Port": Endpoint.unary( method=MethodInfo( @@ -97,7 +98,7 @@ def __init__(self, service: SwitchService, *, interceptors: Iterable[Interceptor output=metalstack_dot_admin_dot_v2_dot_switch__pb2.SwitchServicePortResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.port, + function=svc.port, ), }, interceptors=interceptors, diff --git a/python/metalstack/admin/v2/switch_pb2.py b/python/metalstack/admin/v2/switch_pb2.py index 95165be6..16e72a90 100644 --- a/python/metalstack/admin/v2/switch_pb2.py +++ b/python/metalstack/admin/v2/switch_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: metalstack/admin/v2/switch.proto -# Protobuf Python Version: 6.32.1 +# Protobuf Python Version: 6.33.4 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 6, - 32, - 1, + 33, + 4, '', 'metalstack/admin/v2/switch.proto' ) diff --git a/python/metalstack/admin/v2/tenant_connect.py b/python/metalstack/admin/v2/tenant_connect.py index 574c50d2..cce11ae4 100644 --- a/python/metalstack/admin/v2/tenant_connect.py +++ b/python/metalstack/admin/v2/tenant_connect.py @@ -2,7 +2,7 @@ # Generated by https://github.com/connectrpc/connect-python. DO NOT EDIT! # source: metalstack/admin/v2/tenant.proto -from collections.abc import AsyncIterator, Iterable, Iterator, Mapping +from collections.abc import AsyncGenerator, AsyncIterator, Iterable, Iterator, Mapping from typing import Protocol from connectrpc.client import ConnectClient, ConnectClientSync @@ -23,10 +23,11 @@ async def list(self, request: metalstack_dot_admin_dot_v2_dot_tenant__pb2.Tenant raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") -class TenantServiceASGIApplication(ConnectASGIApplication): - def __init__(self, service: TenantService, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: +class TenantServiceASGIApplication(ConnectASGIApplication[TenantService]): + def __init__(self, service: TenantService | AsyncGenerator[TenantService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: super().__init__( - endpoints={ + service=service, + endpoints=lambda svc: { "/metalstack.admin.v2.TenantService/Create": Endpoint.unary( method=MethodInfo( name="Create", @@ -35,7 +36,7 @@ def __init__(self, service: TenantService, *, interceptors: Iterable[Interceptor output=metalstack_dot_admin_dot_v2_dot_tenant__pb2.TenantServiceCreateResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.create, + function=svc.create, ), "/metalstack.admin.v2.TenantService/List": Endpoint.unary( method=MethodInfo( @@ -45,7 +46,7 @@ def __init__(self, service: TenantService, *, interceptors: Iterable[Interceptor output=metalstack_dot_admin_dot_v2_dot_tenant__pb2.TenantServiceListResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.list, + function=svc.list, ), }, interceptors=interceptors, diff --git a/python/metalstack/admin/v2/tenant_pb2.py b/python/metalstack/admin/v2/tenant_pb2.py index bb13e599..17cce1b7 100644 --- a/python/metalstack/admin/v2/tenant_pb2.py +++ b/python/metalstack/admin/v2/tenant_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: metalstack/admin/v2/tenant.proto -# Protobuf Python Version: 6.32.1 +# Protobuf Python Version: 6.33.4 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 6, - 32, - 1, + 33, + 4, '', 'metalstack/admin/v2/tenant.proto' ) diff --git a/python/metalstack/admin/v2/token_connect.py b/python/metalstack/admin/v2/token_connect.py index bd42a6da..b1df1e5b 100644 --- a/python/metalstack/admin/v2/token_connect.py +++ b/python/metalstack/admin/v2/token_connect.py @@ -2,7 +2,7 @@ # Generated by https://github.com/connectrpc/connect-python. DO NOT EDIT! # source: metalstack/admin/v2/token.proto -from collections.abc import AsyncIterator, Iterable, Iterator, Mapping +from collections.abc import AsyncGenerator, AsyncIterator, Iterable, Iterator, Mapping from typing import Protocol from connectrpc.client import ConnectClient, ConnectClientSync @@ -26,10 +26,11 @@ async def create(self, request: metalstack_dot_admin_dot_v2_dot_token__pb2.Token raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") -class TokenServiceASGIApplication(ConnectASGIApplication): - def __init__(self, service: TokenService, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: +class TokenServiceASGIApplication(ConnectASGIApplication[TokenService]): + def __init__(self, service: TokenService | AsyncGenerator[TokenService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: super().__init__( - endpoints={ + service=service, + endpoints=lambda svc: { "/metalstack.admin.v2.TokenService/List": Endpoint.unary( method=MethodInfo( name="List", @@ -38,7 +39,7 @@ def __init__(self, service: TokenService, *, interceptors: Iterable[Interceptor] output=metalstack_dot_admin_dot_v2_dot_token__pb2.TokenServiceListResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.list, + function=svc.list, ), "/metalstack.admin.v2.TokenService/Revoke": Endpoint.unary( method=MethodInfo( @@ -48,7 +49,7 @@ def __init__(self, service: TokenService, *, interceptors: Iterable[Interceptor] output=metalstack_dot_admin_dot_v2_dot_token__pb2.TokenServiceRevokeResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.revoke, + function=svc.revoke, ), "/metalstack.admin.v2.TokenService/Create": Endpoint.unary( method=MethodInfo( @@ -58,7 +59,7 @@ def __init__(self, service: TokenService, *, interceptors: Iterable[Interceptor] output=metalstack_dot_admin_dot_v2_dot_token__pb2.TokenServiceCreateResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.create, + function=svc.create, ), }, interceptors=interceptors, diff --git a/python/metalstack/admin/v2/token_pb2.py b/python/metalstack/admin/v2/token_pb2.py index 4356527c..84a2583a 100644 --- a/python/metalstack/admin/v2/token_pb2.py +++ b/python/metalstack/admin/v2/token_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: metalstack/admin/v2/token.proto -# Protobuf Python Version: 6.32.1 +# Protobuf Python Version: 6.33.4 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 6, - 32, - 1, + 33, + 4, '', 'metalstack/admin/v2/token.proto' ) diff --git a/python/metalstack/admin/v2/vpn_connect.py b/python/metalstack/admin/v2/vpn_connect.py index 0377337c..c41a81ad 100644 --- a/python/metalstack/admin/v2/vpn_connect.py +++ b/python/metalstack/admin/v2/vpn_connect.py @@ -2,7 +2,7 @@ # Generated by https://github.com/connectrpc/connect-python. DO NOT EDIT! # source: metalstack/admin/v2/vpn.proto -from collections.abc import AsyncIterator, Iterable, Iterator, Mapping +from collections.abc import AsyncGenerator, AsyncIterator, Iterable, Iterator, Mapping from typing import Protocol from connectrpc.client import ConnectClient, ConnectClientSync @@ -23,10 +23,11 @@ async def list_nodes(self, request: metalstack_dot_admin_dot_v2_dot_vpn__pb2.VPN raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") -class VPNServiceASGIApplication(ConnectASGIApplication): - def __init__(self, service: VPNService, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: +class VPNServiceASGIApplication(ConnectASGIApplication[VPNService]): + def __init__(self, service: VPNService | AsyncGenerator[VPNService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: super().__init__( - endpoints={ + service=service, + endpoints=lambda svc: { "/metalstack.admin.v2.VPNService/AuthKey": Endpoint.unary( method=MethodInfo( name="AuthKey", @@ -35,7 +36,7 @@ def __init__(self, service: VPNService, *, interceptors: Iterable[Interceptor]=( output=metalstack_dot_admin_dot_v2_dot_vpn__pb2.VPNServiceAuthKeyResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.auth_key, + function=svc.auth_key, ), "/metalstack.admin.v2.VPNService/ListNodes": Endpoint.unary( method=MethodInfo( @@ -45,7 +46,7 @@ def __init__(self, service: VPNService, *, interceptors: Iterable[Interceptor]=( output=metalstack_dot_admin_dot_v2_dot_vpn__pb2.VPNServiceListNodesResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.list_nodes, + function=svc.list_nodes, ), }, interceptors=interceptors, diff --git a/python/metalstack/admin/v2/vpn_pb2.py b/python/metalstack/admin/v2/vpn_pb2.py index ddb3929b..edd9ef83 100644 --- a/python/metalstack/admin/v2/vpn_pb2.py +++ b/python/metalstack/admin/v2/vpn_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: metalstack/admin/v2/vpn.proto -# Protobuf Python Version: 6.32.1 +# Protobuf Python Version: 6.33.4 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 6, - 32, - 1, + 33, + 4, '', 'metalstack/admin/v2/vpn.proto' ) diff --git a/python/metalstack/api/v2/common_pb2.py b/python/metalstack/api/v2/common_pb2.py index bc8ff12e..57024cef 100644 --- a/python/metalstack/api/v2/common_pb2.py +++ b/python/metalstack/api/v2/common_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: metalstack/api/v2/common.proto -# Protobuf Python Version: 6.32.1 +# Protobuf Python Version: 6.33.4 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 6, - 32, - 1, + 33, + 4, '', 'metalstack/api/v2/common.proto' ) diff --git a/python/metalstack/api/v2/filesystem_connect.py b/python/metalstack/api/v2/filesystem_connect.py index 456abc60..e2c66ba9 100644 --- a/python/metalstack/api/v2/filesystem_connect.py +++ b/python/metalstack/api/v2/filesystem_connect.py @@ -2,7 +2,7 @@ # Generated by https://github.com/connectrpc/connect-python. DO NOT EDIT! # source: metalstack/api/v2/filesystem.proto -from collections.abc import AsyncIterator, Iterable, Iterator, Mapping +from collections.abc import AsyncGenerator, AsyncIterator, Iterable, Iterator, Mapping from typing import Protocol from connectrpc.client import ConnectClient, ConnectClientSync @@ -26,10 +26,11 @@ async def match(self, request: metalstack_dot_api_dot_v2_dot_filesystem__pb2.Fil raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") -class FilesystemServiceASGIApplication(ConnectASGIApplication): - def __init__(self, service: FilesystemService, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: +class FilesystemServiceASGIApplication(ConnectASGIApplication[FilesystemService]): + def __init__(self, service: FilesystemService | AsyncGenerator[FilesystemService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: super().__init__( - endpoints={ + service=service, + endpoints=lambda svc: { "/metalstack.api.v2.FilesystemService/Get": Endpoint.unary( method=MethodInfo( name="Get", @@ -38,7 +39,7 @@ def __init__(self, service: FilesystemService, *, interceptors: Iterable[Interce output=metalstack_dot_api_dot_v2_dot_filesystem__pb2.FilesystemServiceGetResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.get, + function=svc.get, ), "/metalstack.api.v2.FilesystemService/List": Endpoint.unary( method=MethodInfo( @@ -48,7 +49,7 @@ def __init__(self, service: FilesystemService, *, interceptors: Iterable[Interce output=metalstack_dot_api_dot_v2_dot_filesystem__pb2.FilesystemServiceListResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.list, + function=svc.list, ), "/metalstack.api.v2.FilesystemService/Match": Endpoint.unary( method=MethodInfo( @@ -58,7 +59,7 @@ def __init__(self, service: FilesystemService, *, interceptors: Iterable[Interce output=metalstack_dot_api_dot_v2_dot_filesystem__pb2.FilesystemServiceMatchResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.match, + function=svc.match, ), }, interceptors=interceptors, diff --git a/python/metalstack/api/v2/filesystem_pb2.py b/python/metalstack/api/v2/filesystem_pb2.py index c2675649..3b0bf193 100644 --- a/python/metalstack/api/v2/filesystem_pb2.py +++ b/python/metalstack/api/v2/filesystem_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: metalstack/api/v2/filesystem.proto -# Protobuf Python Version: 6.32.1 +# Protobuf Python Version: 6.33.4 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 6, - 32, - 1, + 33, + 4, '', 'metalstack/api/v2/filesystem.proto' ) diff --git a/python/metalstack/api/v2/health_connect.py b/python/metalstack/api/v2/health_connect.py index 27b6117a..e4864b56 100644 --- a/python/metalstack/api/v2/health_connect.py +++ b/python/metalstack/api/v2/health_connect.py @@ -2,7 +2,7 @@ # Generated by https://github.com/connectrpc/connect-python. DO NOT EDIT! # source: metalstack/api/v2/health.proto -from collections.abc import AsyncIterator, Iterable, Iterator, Mapping +from collections.abc import AsyncGenerator, AsyncIterator, Iterable, Iterator, Mapping from typing import Protocol from connectrpc.client import ConnectClient, ConnectClientSync @@ -20,10 +20,11 @@ async def get(self, request: metalstack_dot_api_dot_v2_dot_health__pb2.HealthSer raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") -class HealthServiceASGIApplication(ConnectASGIApplication): - def __init__(self, service: HealthService, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: +class HealthServiceASGIApplication(ConnectASGIApplication[HealthService]): + def __init__(self, service: HealthService | AsyncGenerator[HealthService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: super().__init__( - endpoints={ + service=service, + endpoints=lambda svc: { "/metalstack.api.v2.HealthService/Get": Endpoint.unary( method=MethodInfo( name="Get", @@ -32,7 +33,7 @@ def __init__(self, service: HealthService, *, interceptors: Iterable[Interceptor output=metalstack_dot_api_dot_v2_dot_health__pb2.HealthServiceGetResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.get, + function=svc.get, ), }, interceptors=interceptors, diff --git a/python/metalstack/api/v2/health_pb2.py b/python/metalstack/api/v2/health_pb2.py index d676db6a..684c2bf4 100644 --- a/python/metalstack/api/v2/health_pb2.py +++ b/python/metalstack/api/v2/health_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: metalstack/api/v2/health.proto -# Protobuf Python Version: 6.32.1 +# Protobuf Python Version: 6.33.4 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 6, - 32, - 1, + 33, + 4, '', 'metalstack/api/v2/health.proto' ) diff --git a/python/metalstack/api/v2/image_connect.py b/python/metalstack/api/v2/image_connect.py index 193795e7..e1ff71e1 100644 --- a/python/metalstack/api/v2/image_connect.py +++ b/python/metalstack/api/v2/image_connect.py @@ -2,7 +2,7 @@ # Generated by https://github.com/connectrpc/connect-python. DO NOT EDIT! # source: metalstack/api/v2/image.proto -from collections.abc import AsyncIterator, Iterable, Iterator, Mapping +from collections.abc import AsyncGenerator, AsyncIterator, Iterable, Iterator, Mapping from typing import Protocol from connectrpc.client import ConnectClient, ConnectClientSync @@ -26,10 +26,11 @@ async def latest(self, request: metalstack_dot_api_dot_v2_dot_image__pb2.ImageSe raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") -class ImageServiceASGIApplication(ConnectASGIApplication): - def __init__(self, service: ImageService, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: +class ImageServiceASGIApplication(ConnectASGIApplication[ImageService]): + def __init__(self, service: ImageService | AsyncGenerator[ImageService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: super().__init__( - endpoints={ + service=service, + endpoints=lambda svc: { "/metalstack.api.v2.ImageService/Get": Endpoint.unary( method=MethodInfo( name="Get", @@ -38,7 +39,7 @@ def __init__(self, service: ImageService, *, interceptors: Iterable[Interceptor] output=metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceGetResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.get, + function=svc.get, ), "/metalstack.api.v2.ImageService/List": Endpoint.unary( method=MethodInfo( @@ -48,7 +49,7 @@ def __init__(self, service: ImageService, *, interceptors: Iterable[Interceptor] output=metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceListResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.list, + function=svc.list, ), "/metalstack.api.v2.ImageService/Latest": Endpoint.unary( method=MethodInfo( @@ -58,7 +59,7 @@ def __init__(self, service: ImageService, *, interceptors: Iterable[Interceptor] output=metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceLatestResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.latest, + function=svc.latest, ), }, interceptors=interceptors, diff --git a/python/metalstack/api/v2/image_pb2.py b/python/metalstack/api/v2/image_pb2.py index 99beacc2..38438a27 100644 --- a/python/metalstack/api/v2/image_pb2.py +++ b/python/metalstack/api/v2/image_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: metalstack/api/v2/image.proto -# Protobuf Python Version: 6.32.1 +# Protobuf Python Version: 6.33.4 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 6, - 32, - 1, + 33, + 4, '', 'metalstack/api/v2/image.proto' ) diff --git a/python/metalstack/api/v2/ip_connect.py b/python/metalstack/api/v2/ip_connect.py index df8d9b5c..3dc3699c 100644 --- a/python/metalstack/api/v2/ip_connect.py +++ b/python/metalstack/api/v2/ip_connect.py @@ -2,7 +2,7 @@ # Generated by https://github.com/connectrpc/connect-python. DO NOT EDIT! # source: metalstack/api/v2/ip.proto -from collections.abc import AsyncIterator, Iterable, Iterator, Mapping +from collections.abc import AsyncGenerator, AsyncIterator, Iterable, Iterator, Mapping from typing import Protocol from connectrpc.client import ConnectClient, ConnectClientSync @@ -32,10 +32,11 @@ async def delete(self, request: metalstack_dot_api_dot_v2_dot_ip__pb2.IPServiceD raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") -class IPServiceASGIApplication(ConnectASGIApplication): - def __init__(self, service: IPService, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: +class IPServiceASGIApplication(ConnectASGIApplication[IPService]): + def __init__(self, service: IPService | AsyncGenerator[IPService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: super().__init__( - endpoints={ + service=service, + endpoints=lambda svc: { "/metalstack.api.v2.IPService/Get": Endpoint.unary( method=MethodInfo( name="Get", @@ -44,7 +45,7 @@ def __init__(self, service: IPService, *, interceptors: Iterable[Interceptor]=() output=metalstack_dot_api_dot_v2_dot_ip__pb2.IPServiceGetResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.get, + function=svc.get, ), "/metalstack.api.v2.IPService/Create": Endpoint.unary( method=MethodInfo( @@ -54,7 +55,7 @@ def __init__(self, service: IPService, *, interceptors: Iterable[Interceptor]=() output=metalstack_dot_api_dot_v2_dot_ip__pb2.IPServiceCreateResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.create, + function=svc.create, ), "/metalstack.api.v2.IPService/Update": Endpoint.unary( method=MethodInfo( @@ -64,7 +65,7 @@ def __init__(self, service: IPService, *, interceptors: Iterable[Interceptor]=() output=metalstack_dot_api_dot_v2_dot_ip__pb2.IPServiceUpdateResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.update, + function=svc.update, ), "/metalstack.api.v2.IPService/List": Endpoint.unary( method=MethodInfo( @@ -74,7 +75,7 @@ def __init__(self, service: IPService, *, interceptors: Iterable[Interceptor]=() output=metalstack_dot_api_dot_v2_dot_ip__pb2.IPServiceListResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.list, + function=svc.list, ), "/metalstack.api.v2.IPService/Delete": Endpoint.unary( method=MethodInfo( @@ -84,7 +85,7 @@ def __init__(self, service: IPService, *, interceptors: Iterable[Interceptor]=() output=metalstack_dot_api_dot_v2_dot_ip__pb2.IPServiceDeleteResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.delete, + function=svc.delete, ), }, interceptors=interceptors, diff --git a/python/metalstack/api/v2/ip_pb2.py b/python/metalstack/api/v2/ip_pb2.py index 574be62d..b8bbe91f 100644 --- a/python/metalstack/api/v2/ip_pb2.py +++ b/python/metalstack/api/v2/ip_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: metalstack/api/v2/ip.proto -# Protobuf Python Version: 6.32.1 +# Protobuf Python Version: 6.33.4 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 6, - 32, - 1, + 33, + 4, '', 'metalstack/api/v2/ip.proto' ) diff --git a/python/metalstack/api/v2/machine_connect.py b/python/metalstack/api/v2/machine_connect.py index abb078aa..e09498da 100644 --- a/python/metalstack/api/v2/machine_connect.py +++ b/python/metalstack/api/v2/machine_connect.py @@ -2,7 +2,7 @@ # Generated by https://github.com/connectrpc/connect-python. DO NOT EDIT! # source: metalstack/api/v2/machine.proto -from collections.abc import AsyncIterator, Iterable, Iterator, Mapping +from collections.abc import AsyncGenerator, AsyncIterator, Iterable, Iterator, Mapping from typing import Protocol from connectrpc.client import ConnectClient, ConnectClientSync @@ -32,10 +32,11 @@ async def delete(self, request: metalstack_dot_api_dot_v2_dot_machine__pb2.Machi raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") -class MachineServiceASGIApplication(ConnectASGIApplication): - def __init__(self, service: MachineService, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: +class MachineServiceASGIApplication(ConnectASGIApplication[MachineService]): + def __init__(self, service: MachineService | AsyncGenerator[MachineService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: super().__init__( - endpoints={ + service=service, + endpoints=lambda svc: { "/metalstack.api.v2.MachineService/Get": Endpoint.unary( method=MethodInfo( name="Get", @@ -44,7 +45,7 @@ def __init__(self, service: MachineService, *, interceptors: Iterable[Intercepto output=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceGetResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.get, + function=svc.get, ), "/metalstack.api.v2.MachineService/Create": Endpoint.unary( method=MethodInfo( @@ -54,7 +55,7 @@ def __init__(self, service: MachineService, *, interceptors: Iterable[Intercepto output=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceCreateResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.create, + function=svc.create, ), "/metalstack.api.v2.MachineService/Update": Endpoint.unary( method=MethodInfo( @@ -64,7 +65,7 @@ def __init__(self, service: MachineService, *, interceptors: Iterable[Intercepto output=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceUpdateResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.update, + function=svc.update, ), "/metalstack.api.v2.MachineService/List": Endpoint.unary( method=MethodInfo( @@ -74,7 +75,7 @@ def __init__(self, service: MachineService, *, interceptors: Iterable[Intercepto output=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceListResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.list, + function=svc.list, ), "/metalstack.api.v2.MachineService/Delete": Endpoint.unary( method=MethodInfo( @@ -84,7 +85,7 @@ def __init__(self, service: MachineService, *, interceptors: Iterable[Intercepto output=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceDeleteResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.delete, + function=svc.delete, ), }, interceptors=interceptors, diff --git a/python/metalstack/api/v2/machine_pb2.py b/python/metalstack/api/v2/machine_pb2.py index db71f836..1155222a 100644 --- a/python/metalstack/api/v2/machine_pb2.py +++ b/python/metalstack/api/v2/machine_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: metalstack/api/v2/machine.proto -# Protobuf Python Version: 6.32.1 +# Protobuf Python Version: 6.33.4 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 6, - 32, - 1, + 33, + 4, '', 'metalstack/api/v2/machine.proto' ) diff --git a/python/metalstack/api/v2/method_connect.py b/python/metalstack/api/v2/method_connect.py index 86ace2db..1aeba3b0 100644 --- a/python/metalstack/api/v2/method_connect.py +++ b/python/metalstack/api/v2/method_connect.py @@ -2,7 +2,7 @@ # Generated by https://github.com/connectrpc/connect-python. DO NOT EDIT! # source: metalstack/api/v2/method.proto -from collections.abc import AsyncIterator, Iterable, Iterator, Mapping +from collections.abc import AsyncGenerator, AsyncIterator, Iterable, Iterator, Mapping from typing import Protocol from connectrpc.client import ConnectClient, ConnectClientSync @@ -23,10 +23,11 @@ async def token_scoped_list(self, request: metalstack_dot_api_dot_v2_dot_method_ raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") -class MethodServiceASGIApplication(ConnectASGIApplication): - def __init__(self, service: MethodService, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: +class MethodServiceASGIApplication(ConnectASGIApplication[MethodService]): + def __init__(self, service: MethodService | AsyncGenerator[MethodService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: super().__init__( - endpoints={ + service=service, + endpoints=lambda svc: { "/metalstack.api.v2.MethodService/List": Endpoint.unary( method=MethodInfo( name="List", @@ -35,7 +36,7 @@ def __init__(self, service: MethodService, *, interceptors: Iterable[Interceptor output=metalstack_dot_api_dot_v2_dot_method__pb2.MethodServiceListResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.list, + function=svc.list, ), "/metalstack.api.v2.MethodService/TokenScopedList": Endpoint.unary( method=MethodInfo( @@ -45,7 +46,7 @@ def __init__(self, service: MethodService, *, interceptors: Iterable[Interceptor output=metalstack_dot_api_dot_v2_dot_method__pb2.MethodServiceTokenScopedListResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.token_scoped_list, + function=svc.token_scoped_list, ), }, interceptors=interceptors, diff --git a/python/metalstack/api/v2/method_pb2.py b/python/metalstack/api/v2/method_pb2.py index db00bc4c..8c0fe746 100644 --- a/python/metalstack/api/v2/method_pb2.py +++ b/python/metalstack/api/v2/method_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: metalstack/api/v2/method.proto -# Protobuf Python Version: 6.32.1 +# Protobuf Python Version: 6.33.4 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 6, - 32, - 1, + 33, + 4, '', 'metalstack/api/v2/method.proto' ) diff --git a/python/metalstack/api/v2/network_connect.py b/python/metalstack/api/v2/network_connect.py index b49475de..31ace3fe 100644 --- a/python/metalstack/api/v2/network_connect.py +++ b/python/metalstack/api/v2/network_connect.py @@ -2,7 +2,7 @@ # Generated by https://github.com/connectrpc/connect-python. DO NOT EDIT! # source: metalstack/api/v2/network.proto -from collections.abc import AsyncIterator, Iterable, Iterator, Mapping +from collections.abc import AsyncGenerator, AsyncIterator, Iterable, Iterator, Mapping from typing import Protocol from connectrpc.client import ConnectClient, ConnectClientSync @@ -35,10 +35,11 @@ async def delete(self, request: metalstack_dot_api_dot_v2_dot_network__pb2.Netwo raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") -class NetworkServiceASGIApplication(ConnectASGIApplication): - def __init__(self, service: NetworkService, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: +class NetworkServiceASGIApplication(ConnectASGIApplication[NetworkService]): + def __init__(self, service: NetworkService | AsyncGenerator[NetworkService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: super().__init__( - endpoints={ + service=service, + endpoints=lambda svc: { "/metalstack.api.v2.NetworkService/Get": Endpoint.unary( method=MethodInfo( name="Get", @@ -47,7 +48,7 @@ def __init__(self, service: NetworkService, *, interceptors: Iterable[Intercepto output=metalstack_dot_api_dot_v2_dot_network__pb2.NetworkServiceGetResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.get, + function=svc.get, ), "/metalstack.api.v2.NetworkService/Create": Endpoint.unary( method=MethodInfo( @@ -57,7 +58,7 @@ def __init__(self, service: NetworkService, *, interceptors: Iterable[Intercepto output=metalstack_dot_api_dot_v2_dot_network__pb2.NetworkServiceCreateResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.create, + function=svc.create, ), "/metalstack.api.v2.NetworkService/Update": Endpoint.unary( method=MethodInfo( @@ -67,7 +68,7 @@ def __init__(self, service: NetworkService, *, interceptors: Iterable[Intercepto output=metalstack_dot_api_dot_v2_dot_network__pb2.NetworkServiceUpdateResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.update, + function=svc.update, ), "/metalstack.api.v2.NetworkService/List": Endpoint.unary( method=MethodInfo( @@ -77,7 +78,7 @@ def __init__(self, service: NetworkService, *, interceptors: Iterable[Intercepto output=metalstack_dot_api_dot_v2_dot_network__pb2.NetworkServiceListResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.list, + function=svc.list, ), "/metalstack.api.v2.NetworkService/ListBaseNetworks": Endpoint.unary( method=MethodInfo( @@ -87,7 +88,7 @@ def __init__(self, service: NetworkService, *, interceptors: Iterable[Intercepto output=metalstack_dot_api_dot_v2_dot_network__pb2.NetworkServiceListBaseNetworksResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.list_base_networks, + function=svc.list_base_networks, ), "/metalstack.api.v2.NetworkService/Delete": Endpoint.unary( method=MethodInfo( @@ -97,7 +98,7 @@ def __init__(self, service: NetworkService, *, interceptors: Iterable[Intercepto output=metalstack_dot_api_dot_v2_dot_network__pb2.NetworkServiceDeleteResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.delete, + function=svc.delete, ), }, interceptors=interceptors, diff --git a/python/metalstack/api/v2/network_pb2.py b/python/metalstack/api/v2/network_pb2.py index 8f9b196c..a7e569f8 100644 --- a/python/metalstack/api/v2/network_pb2.py +++ b/python/metalstack/api/v2/network_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: metalstack/api/v2/network.proto -# Protobuf Python Version: 6.32.1 +# Protobuf Python Version: 6.33.4 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 6, - 32, - 1, + 33, + 4, '', 'metalstack/api/v2/network.proto' ) diff --git a/python/metalstack/api/v2/partition_connect.py b/python/metalstack/api/v2/partition_connect.py index 9ef40e67..96497125 100644 --- a/python/metalstack/api/v2/partition_connect.py +++ b/python/metalstack/api/v2/partition_connect.py @@ -2,7 +2,7 @@ # Generated by https://github.com/connectrpc/connect-python. DO NOT EDIT! # source: metalstack/api/v2/partition.proto -from collections.abc import AsyncIterator, Iterable, Iterator, Mapping +from collections.abc import AsyncGenerator, AsyncIterator, Iterable, Iterator, Mapping from typing import Protocol from connectrpc.client import ConnectClient, ConnectClientSync @@ -23,10 +23,11 @@ async def list(self, request: metalstack_dot_api_dot_v2_dot_partition__pb2.Parti raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") -class PartitionServiceASGIApplication(ConnectASGIApplication): - def __init__(self, service: PartitionService, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: +class PartitionServiceASGIApplication(ConnectASGIApplication[PartitionService]): + def __init__(self, service: PartitionService | AsyncGenerator[PartitionService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: super().__init__( - endpoints={ + service=service, + endpoints=lambda svc: { "/metalstack.api.v2.PartitionService/Get": Endpoint.unary( method=MethodInfo( name="Get", @@ -35,7 +36,7 @@ def __init__(self, service: PartitionService, *, interceptors: Iterable[Intercep output=metalstack_dot_api_dot_v2_dot_partition__pb2.PartitionServiceGetResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.get, + function=svc.get, ), "/metalstack.api.v2.PartitionService/List": Endpoint.unary( method=MethodInfo( @@ -45,7 +46,7 @@ def __init__(self, service: PartitionService, *, interceptors: Iterable[Intercep output=metalstack_dot_api_dot_v2_dot_partition__pb2.PartitionServiceListResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.list, + function=svc.list, ), }, interceptors=interceptors, diff --git a/python/metalstack/api/v2/partition_pb2.py b/python/metalstack/api/v2/partition_pb2.py index e45b9027..27d1084c 100644 --- a/python/metalstack/api/v2/partition_pb2.py +++ b/python/metalstack/api/v2/partition_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: metalstack/api/v2/partition.proto -# Protobuf Python Version: 6.32.1 +# Protobuf Python Version: 6.33.4 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 6, - 32, - 1, + 33, + 4, '', 'metalstack/api/v2/partition.proto' ) diff --git a/python/metalstack/api/v2/predefined_rules_pb2.py b/python/metalstack/api/v2/predefined_rules_pb2.py index 4bac89d5..7b009888 100644 --- a/python/metalstack/api/v2/predefined_rules_pb2.py +++ b/python/metalstack/api/v2/predefined_rules_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: metalstack/api/v2/predefined_rules.proto -# Protobuf Python Version: 6.32.1 +# Protobuf Python Version: 6.33.4 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 6, - 32, - 1, + 33, + 4, '', 'metalstack/api/v2/predefined_rules.proto' ) diff --git a/python/metalstack/api/v2/project_connect.py b/python/metalstack/api/v2/project_connect.py index 3bf2a913..6edb4567 100644 --- a/python/metalstack/api/v2/project_connect.py +++ b/python/metalstack/api/v2/project_connect.py @@ -2,7 +2,7 @@ # Generated by https://github.com/connectrpc/connect-python. DO NOT EDIT! # source: metalstack/api/v2/project.proto -from collections.abc import AsyncIterator, Iterable, Iterator, Mapping +from collections.abc import AsyncGenerator, AsyncIterator, Iterable, Iterator, Mapping from typing import Protocol from connectrpc.client import ConnectClient, ConnectClientSync @@ -56,10 +56,11 @@ async def invite_get(self, request: metalstack_dot_api_dot_v2_dot_project__pb2.P raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") -class ProjectServiceASGIApplication(ConnectASGIApplication): - def __init__(self, service: ProjectService, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: +class ProjectServiceASGIApplication(ConnectASGIApplication[ProjectService]): + def __init__(self, service: ProjectService | AsyncGenerator[ProjectService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: super().__init__( - endpoints={ + service=service, + endpoints=lambda svc: { "/metalstack.api.v2.ProjectService/List": Endpoint.unary( method=MethodInfo( name="List", @@ -68,7 +69,7 @@ def __init__(self, service: ProjectService, *, interceptors: Iterable[Intercepto output=metalstack_dot_api_dot_v2_dot_project__pb2.ProjectServiceListResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.list, + function=svc.list, ), "/metalstack.api.v2.ProjectService/Get": Endpoint.unary( method=MethodInfo( @@ -78,7 +79,7 @@ def __init__(self, service: ProjectService, *, interceptors: Iterable[Intercepto output=metalstack_dot_api_dot_v2_dot_project__pb2.ProjectServiceGetResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.get, + function=svc.get, ), "/metalstack.api.v2.ProjectService/Create": Endpoint.unary( method=MethodInfo( @@ -88,7 +89,7 @@ def __init__(self, service: ProjectService, *, interceptors: Iterable[Intercepto output=metalstack_dot_api_dot_v2_dot_project__pb2.ProjectServiceCreateResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.create, + function=svc.create, ), "/metalstack.api.v2.ProjectService/Delete": Endpoint.unary( method=MethodInfo( @@ -98,7 +99,7 @@ def __init__(self, service: ProjectService, *, interceptors: Iterable[Intercepto output=metalstack_dot_api_dot_v2_dot_project__pb2.ProjectServiceDeleteResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.delete, + function=svc.delete, ), "/metalstack.api.v2.ProjectService/Update": Endpoint.unary( method=MethodInfo( @@ -108,7 +109,7 @@ def __init__(self, service: ProjectService, *, interceptors: Iterable[Intercepto output=metalstack_dot_api_dot_v2_dot_project__pb2.ProjectServiceUpdateResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.update, + function=svc.update, ), "/metalstack.api.v2.ProjectService/Leave": Endpoint.unary( method=MethodInfo( @@ -118,7 +119,7 @@ def __init__(self, service: ProjectService, *, interceptors: Iterable[Intercepto output=metalstack_dot_api_dot_v2_dot_project__pb2.ProjectServiceLeaveResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.leave, + function=svc.leave, ), "/metalstack.api.v2.ProjectService/RemoveMember": Endpoint.unary( method=MethodInfo( @@ -128,7 +129,7 @@ def __init__(self, service: ProjectService, *, interceptors: Iterable[Intercepto output=metalstack_dot_api_dot_v2_dot_project__pb2.ProjectServiceRemoveMemberResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.remove_member, + function=svc.remove_member, ), "/metalstack.api.v2.ProjectService/UpdateMember": Endpoint.unary( method=MethodInfo( @@ -138,7 +139,7 @@ def __init__(self, service: ProjectService, *, interceptors: Iterable[Intercepto output=metalstack_dot_api_dot_v2_dot_project__pb2.ProjectServiceUpdateMemberResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.update_member, + function=svc.update_member, ), "/metalstack.api.v2.ProjectService/Invite": Endpoint.unary( method=MethodInfo( @@ -148,7 +149,7 @@ def __init__(self, service: ProjectService, *, interceptors: Iterable[Intercepto output=metalstack_dot_api_dot_v2_dot_project__pb2.ProjectServiceInviteResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.invite, + function=svc.invite, ), "/metalstack.api.v2.ProjectService/InviteAccept": Endpoint.unary( method=MethodInfo( @@ -158,7 +159,7 @@ def __init__(self, service: ProjectService, *, interceptors: Iterable[Intercepto output=metalstack_dot_api_dot_v2_dot_project__pb2.ProjectServiceInviteAcceptResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.invite_accept, + function=svc.invite_accept, ), "/metalstack.api.v2.ProjectService/InviteDelete": Endpoint.unary( method=MethodInfo( @@ -168,7 +169,7 @@ def __init__(self, service: ProjectService, *, interceptors: Iterable[Intercepto output=metalstack_dot_api_dot_v2_dot_project__pb2.ProjectServiceInviteDeleteResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.invite_delete, + function=svc.invite_delete, ), "/metalstack.api.v2.ProjectService/InvitesList": Endpoint.unary( method=MethodInfo( @@ -178,7 +179,7 @@ def __init__(self, service: ProjectService, *, interceptors: Iterable[Intercepto output=metalstack_dot_api_dot_v2_dot_project__pb2.ProjectServiceInvitesListResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.invites_list, + function=svc.invites_list, ), "/metalstack.api.v2.ProjectService/InviteGet": Endpoint.unary( method=MethodInfo( @@ -188,7 +189,7 @@ def __init__(self, service: ProjectService, *, interceptors: Iterable[Intercepto output=metalstack_dot_api_dot_v2_dot_project__pb2.ProjectServiceInviteGetResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.invite_get, + function=svc.invite_get, ), }, interceptors=interceptors, diff --git a/python/metalstack/api/v2/project_pb2.py b/python/metalstack/api/v2/project_pb2.py index 285e3d78..a4afb31c 100644 --- a/python/metalstack/api/v2/project_pb2.py +++ b/python/metalstack/api/v2/project_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: metalstack/api/v2/project.proto -# Protobuf Python Version: 6.32.1 +# Protobuf Python Version: 6.33.4 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 6, - 32, - 1, + 33, + 4, '', 'metalstack/api/v2/project.proto' ) diff --git a/python/metalstack/api/v2/size_connect.py b/python/metalstack/api/v2/size_connect.py index 5ce731d8..5d53e3d4 100644 --- a/python/metalstack/api/v2/size_connect.py +++ b/python/metalstack/api/v2/size_connect.py @@ -2,7 +2,7 @@ # Generated by https://github.com/connectrpc/connect-python. DO NOT EDIT! # source: metalstack/api/v2/size.proto -from collections.abc import AsyncIterator, Iterable, Iterator, Mapping +from collections.abc import AsyncGenerator, AsyncIterator, Iterable, Iterator, Mapping from typing import Protocol from connectrpc.client import ConnectClient, ConnectClientSync @@ -23,10 +23,11 @@ async def list(self, request: metalstack_dot_api_dot_v2_dot_size__pb2.SizeServic raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") -class SizeServiceASGIApplication(ConnectASGIApplication): - def __init__(self, service: SizeService, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: +class SizeServiceASGIApplication(ConnectASGIApplication[SizeService]): + def __init__(self, service: SizeService | AsyncGenerator[SizeService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: super().__init__( - endpoints={ + service=service, + endpoints=lambda svc: { "/metalstack.api.v2.SizeService/Get": Endpoint.unary( method=MethodInfo( name="Get", @@ -35,7 +36,7 @@ def __init__(self, service: SizeService, *, interceptors: Iterable[Interceptor]= output=metalstack_dot_api_dot_v2_dot_size__pb2.SizeServiceGetResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.get, + function=svc.get, ), "/metalstack.api.v2.SizeService/List": Endpoint.unary( method=MethodInfo( @@ -45,7 +46,7 @@ def __init__(self, service: SizeService, *, interceptors: Iterable[Interceptor]= output=metalstack_dot_api_dot_v2_dot_size__pb2.SizeServiceListResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.list, + function=svc.list, ), }, interceptors=interceptors, diff --git a/python/metalstack/api/v2/size_pb2.py b/python/metalstack/api/v2/size_pb2.py index 6c7a9607..30879317 100644 --- a/python/metalstack/api/v2/size_pb2.py +++ b/python/metalstack/api/v2/size_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: metalstack/api/v2/size.proto -# Protobuf Python Version: 6.32.1 +# Protobuf Python Version: 6.33.4 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 6, - 32, - 1, + 33, + 4, '', 'metalstack/api/v2/size.proto' ) diff --git a/python/metalstack/api/v2/switch_pb2.py b/python/metalstack/api/v2/switch_pb2.py index 198e6582..338fdb2a 100644 --- a/python/metalstack/api/v2/switch_pb2.py +++ b/python/metalstack/api/v2/switch_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: metalstack/api/v2/switch.proto -# Protobuf Python Version: 6.32.1 +# Protobuf Python Version: 6.33.4 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 6, - 32, - 1, + 33, + 4, '', 'metalstack/api/v2/switch.proto' ) diff --git a/python/metalstack/api/v2/tenant_connect.py b/python/metalstack/api/v2/tenant_connect.py index c4a79f87..b3327b0b 100644 --- a/python/metalstack/api/v2/tenant_connect.py +++ b/python/metalstack/api/v2/tenant_connect.py @@ -2,7 +2,7 @@ # Generated by https://github.com/connectrpc/connect-python. DO NOT EDIT! # source: metalstack/api/v2/tenant.proto -from collections.abc import AsyncIterator, Iterable, Iterator, Mapping +from collections.abc import AsyncGenerator, AsyncIterator, Iterable, Iterator, Mapping from typing import Protocol from connectrpc.client import ConnectClient, ConnectClientSync @@ -56,10 +56,11 @@ async def invite_get(self, request: metalstack_dot_api_dot_v2_dot_tenant__pb2.Te raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") -class TenantServiceASGIApplication(ConnectASGIApplication): - def __init__(self, service: TenantService, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: +class TenantServiceASGIApplication(ConnectASGIApplication[TenantService]): + def __init__(self, service: TenantService | AsyncGenerator[TenantService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: super().__init__( - endpoints={ + service=service, + endpoints=lambda svc: { "/metalstack.api.v2.TenantService/Create": Endpoint.unary( method=MethodInfo( name="Create", @@ -68,7 +69,7 @@ def __init__(self, service: TenantService, *, interceptors: Iterable[Interceptor output=metalstack_dot_api_dot_v2_dot_tenant__pb2.TenantServiceCreateResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.create, + function=svc.create, ), "/metalstack.api.v2.TenantService/List": Endpoint.unary( method=MethodInfo( @@ -78,7 +79,7 @@ def __init__(self, service: TenantService, *, interceptors: Iterable[Interceptor output=metalstack_dot_api_dot_v2_dot_tenant__pb2.TenantServiceListResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.list, + function=svc.list, ), "/metalstack.api.v2.TenantService/Get": Endpoint.unary( method=MethodInfo( @@ -88,7 +89,7 @@ def __init__(self, service: TenantService, *, interceptors: Iterable[Interceptor output=metalstack_dot_api_dot_v2_dot_tenant__pb2.TenantServiceGetResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.get, + function=svc.get, ), "/metalstack.api.v2.TenantService/Update": Endpoint.unary( method=MethodInfo( @@ -98,7 +99,7 @@ def __init__(self, service: TenantService, *, interceptors: Iterable[Interceptor output=metalstack_dot_api_dot_v2_dot_tenant__pb2.TenantServiceUpdateResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.update, + function=svc.update, ), "/metalstack.api.v2.TenantService/Delete": Endpoint.unary( method=MethodInfo( @@ -108,7 +109,7 @@ def __init__(self, service: TenantService, *, interceptors: Iterable[Interceptor output=metalstack_dot_api_dot_v2_dot_tenant__pb2.TenantServiceDeleteResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.delete, + function=svc.delete, ), "/metalstack.api.v2.TenantService/Leave": Endpoint.unary( method=MethodInfo( @@ -118,7 +119,7 @@ def __init__(self, service: TenantService, *, interceptors: Iterable[Interceptor output=metalstack_dot_api_dot_v2_dot_tenant__pb2.TenantServiceLeaveResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.leave, + function=svc.leave, ), "/metalstack.api.v2.TenantService/RemoveMember": Endpoint.unary( method=MethodInfo( @@ -128,7 +129,7 @@ def __init__(self, service: TenantService, *, interceptors: Iterable[Interceptor output=metalstack_dot_api_dot_v2_dot_tenant__pb2.TenantServiceRemoveMemberResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.remove_member, + function=svc.remove_member, ), "/metalstack.api.v2.TenantService/UpdateMember": Endpoint.unary( method=MethodInfo( @@ -138,7 +139,7 @@ def __init__(self, service: TenantService, *, interceptors: Iterable[Interceptor output=metalstack_dot_api_dot_v2_dot_tenant__pb2.TenantServiceUpdateMemberResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.update_member, + function=svc.update_member, ), "/metalstack.api.v2.TenantService/Invite": Endpoint.unary( method=MethodInfo( @@ -148,7 +149,7 @@ def __init__(self, service: TenantService, *, interceptors: Iterable[Interceptor output=metalstack_dot_api_dot_v2_dot_tenant__pb2.TenantServiceInviteResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.invite, + function=svc.invite, ), "/metalstack.api.v2.TenantService/InviteAccept": Endpoint.unary( method=MethodInfo( @@ -158,7 +159,7 @@ def __init__(self, service: TenantService, *, interceptors: Iterable[Interceptor output=metalstack_dot_api_dot_v2_dot_tenant__pb2.TenantServiceInviteAcceptResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.invite_accept, + function=svc.invite_accept, ), "/metalstack.api.v2.TenantService/InviteDelete": Endpoint.unary( method=MethodInfo( @@ -168,7 +169,7 @@ def __init__(self, service: TenantService, *, interceptors: Iterable[Interceptor output=metalstack_dot_api_dot_v2_dot_tenant__pb2.TenantServiceInviteDeleteResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.invite_delete, + function=svc.invite_delete, ), "/metalstack.api.v2.TenantService/InvitesList": Endpoint.unary( method=MethodInfo( @@ -178,7 +179,7 @@ def __init__(self, service: TenantService, *, interceptors: Iterable[Interceptor output=metalstack_dot_api_dot_v2_dot_tenant__pb2.TenantServiceInvitesListResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.invites_list, + function=svc.invites_list, ), "/metalstack.api.v2.TenantService/InviteGet": Endpoint.unary( method=MethodInfo( @@ -188,7 +189,7 @@ def __init__(self, service: TenantService, *, interceptors: Iterable[Interceptor output=metalstack_dot_api_dot_v2_dot_tenant__pb2.TenantServiceInviteGetResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.invite_get, + function=svc.invite_get, ), }, interceptors=interceptors, diff --git a/python/metalstack/api/v2/tenant_pb2.py b/python/metalstack/api/v2/tenant_pb2.py index 148b76e3..e4b72368 100644 --- a/python/metalstack/api/v2/tenant_pb2.py +++ b/python/metalstack/api/v2/tenant_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: metalstack/api/v2/tenant.proto -# Protobuf Python Version: 6.32.1 +# Protobuf Python Version: 6.33.4 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 6, - 32, - 1, + 33, + 4, '', 'metalstack/api/v2/tenant.proto' ) diff --git a/python/metalstack/api/v2/token_connect.py b/python/metalstack/api/v2/token_connect.py index 367f203c..ba726fda 100644 --- a/python/metalstack/api/v2/token_connect.py +++ b/python/metalstack/api/v2/token_connect.py @@ -2,7 +2,7 @@ # Generated by https://github.com/connectrpc/connect-python. DO NOT EDIT! # source: metalstack/api/v2/token.proto -from collections.abc import AsyncIterator, Iterable, Iterator, Mapping +from collections.abc import AsyncGenerator, AsyncIterator, Iterable, Iterator, Mapping from typing import Protocol from connectrpc.client import ConnectClient, ConnectClientSync @@ -35,10 +35,11 @@ async def refresh(self, request: metalstack_dot_api_dot_v2_dot_token__pb2.TokenS raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") -class TokenServiceASGIApplication(ConnectASGIApplication): - def __init__(self, service: TokenService, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: +class TokenServiceASGIApplication(ConnectASGIApplication[TokenService]): + def __init__(self, service: TokenService | AsyncGenerator[TokenService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: super().__init__( - endpoints={ + service=service, + endpoints=lambda svc: { "/metalstack.api.v2.TokenService/Get": Endpoint.unary( method=MethodInfo( name="Get", @@ -47,7 +48,7 @@ def __init__(self, service: TokenService, *, interceptors: Iterable[Interceptor] output=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceGetResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.get, + function=svc.get, ), "/metalstack.api.v2.TokenService/Create": Endpoint.unary( method=MethodInfo( @@ -57,7 +58,7 @@ def __init__(self, service: TokenService, *, interceptors: Iterable[Interceptor] output=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceCreateResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.create, + function=svc.create, ), "/metalstack.api.v2.TokenService/Update": Endpoint.unary( method=MethodInfo( @@ -67,7 +68,7 @@ def __init__(self, service: TokenService, *, interceptors: Iterable[Interceptor] output=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceUpdateResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.update, + function=svc.update, ), "/metalstack.api.v2.TokenService/List": Endpoint.unary( method=MethodInfo( @@ -77,7 +78,7 @@ def __init__(self, service: TokenService, *, interceptors: Iterable[Interceptor] output=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceListResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.list, + function=svc.list, ), "/metalstack.api.v2.TokenService/Revoke": Endpoint.unary( method=MethodInfo( @@ -87,7 +88,7 @@ def __init__(self, service: TokenService, *, interceptors: Iterable[Interceptor] output=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceRevokeResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.revoke, + function=svc.revoke, ), "/metalstack.api.v2.TokenService/Refresh": Endpoint.unary( method=MethodInfo( @@ -97,7 +98,7 @@ def __init__(self, service: TokenService, *, interceptors: Iterable[Interceptor] output=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceRefreshResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.refresh, + function=svc.refresh, ), }, interceptors=interceptors, diff --git a/python/metalstack/api/v2/token_pb2.py b/python/metalstack/api/v2/token_pb2.py index 5a600d7e..437e62ef 100644 --- a/python/metalstack/api/v2/token_pb2.py +++ b/python/metalstack/api/v2/token_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: metalstack/api/v2/token.proto -# Protobuf Python Version: 6.32.1 +# Protobuf Python Version: 6.33.4 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 6, - 32, - 1, + 33, + 4, '', 'metalstack/api/v2/token.proto' ) diff --git a/python/metalstack/api/v2/user_connect.py b/python/metalstack/api/v2/user_connect.py index 1cf00cbf..797f9bc2 100644 --- a/python/metalstack/api/v2/user_connect.py +++ b/python/metalstack/api/v2/user_connect.py @@ -2,7 +2,7 @@ # Generated by https://github.com/connectrpc/connect-python. DO NOT EDIT! # source: metalstack/api/v2/user.proto -from collections.abc import AsyncIterator, Iterable, Iterator, Mapping +from collections.abc import AsyncGenerator, AsyncIterator, Iterable, Iterator, Mapping from typing import Protocol from connectrpc.client import ConnectClient, ConnectClientSync @@ -20,10 +20,11 @@ async def get(self, request: metalstack_dot_api_dot_v2_dot_user__pb2.UserService raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") -class UserServiceASGIApplication(ConnectASGIApplication): - def __init__(self, service: UserService, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: +class UserServiceASGIApplication(ConnectASGIApplication[UserService]): + def __init__(self, service: UserService | AsyncGenerator[UserService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: super().__init__( - endpoints={ + service=service, + endpoints=lambda svc: { "/metalstack.api.v2.UserService/Get": Endpoint.unary( method=MethodInfo( name="Get", @@ -32,7 +33,7 @@ def __init__(self, service: UserService, *, interceptors: Iterable[Interceptor]= output=metalstack_dot_api_dot_v2_dot_user__pb2.UserServiceGetResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.get, + function=svc.get, ), }, interceptors=interceptors, diff --git a/python/metalstack/api/v2/user_pb2.py b/python/metalstack/api/v2/user_pb2.py index 02ab90f8..1d3d5a45 100644 --- a/python/metalstack/api/v2/user_pb2.py +++ b/python/metalstack/api/v2/user_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: metalstack/api/v2/user.proto -# Protobuf Python Version: 6.32.1 +# Protobuf Python Version: 6.33.4 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 6, - 32, - 1, + 33, + 4, '', 'metalstack/api/v2/user.proto' ) diff --git a/python/metalstack/api/v2/version_connect.py b/python/metalstack/api/v2/version_connect.py index 395896e8..b83555cd 100644 --- a/python/metalstack/api/v2/version_connect.py +++ b/python/metalstack/api/v2/version_connect.py @@ -2,7 +2,7 @@ # Generated by https://github.com/connectrpc/connect-python. DO NOT EDIT! # source: metalstack/api/v2/version.proto -from collections.abc import AsyncIterator, Iterable, Iterator, Mapping +from collections.abc import AsyncGenerator, AsyncIterator, Iterable, Iterator, Mapping from typing import Protocol from connectrpc.client import ConnectClient, ConnectClientSync @@ -20,10 +20,11 @@ async def get(self, request: metalstack_dot_api_dot_v2_dot_version__pb2.VersionS raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") -class VersionServiceASGIApplication(ConnectASGIApplication): - def __init__(self, service: VersionService, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: +class VersionServiceASGIApplication(ConnectASGIApplication[VersionService]): + def __init__(self, service: VersionService | AsyncGenerator[VersionService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: super().__init__( - endpoints={ + service=service, + endpoints=lambda svc: { "/metalstack.api.v2.VersionService/Get": Endpoint.unary( method=MethodInfo( name="Get", @@ -32,7 +33,7 @@ def __init__(self, service: VersionService, *, interceptors: Iterable[Intercepto output=metalstack_dot_api_dot_v2_dot_version__pb2.VersionServiceGetResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.get, + function=svc.get, ), }, interceptors=interceptors, diff --git a/python/metalstack/api/v2/version_pb2.py b/python/metalstack/api/v2/version_pb2.py index 0e360bbc..6c94eb53 100644 --- a/python/metalstack/api/v2/version_pb2.py +++ b/python/metalstack/api/v2/version_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: metalstack/api/v2/version.proto -# Protobuf Python Version: 6.32.1 +# Protobuf Python Version: 6.33.4 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 6, - 32, - 1, + 33, + 4, '', 'metalstack/api/v2/version.proto' ) diff --git a/python/metalstack/api/v2/vpn_pb2.py b/python/metalstack/api/v2/vpn_pb2.py index 18ca5c30..d360a0f6 100644 --- a/python/metalstack/api/v2/vpn_pb2.py +++ b/python/metalstack/api/v2/vpn_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: metalstack/api/v2/vpn.proto -# Protobuf Python Version: 6.32.1 +# Protobuf Python Version: 6.33.4 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 6, - 32, - 1, + 33, + 4, '', 'metalstack/api/v2/vpn.proto' ) diff --git a/python/metalstack/infra/v2/bmc_connect.py b/python/metalstack/infra/v2/bmc_connect.py index bf9951a0..b0087275 100644 --- a/python/metalstack/infra/v2/bmc_connect.py +++ b/python/metalstack/infra/v2/bmc_connect.py @@ -2,7 +2,7 @@ # Generated by https://github.com/connectrpc/connect-python. DO NOT EDIT! # source: metalstack/infra/v2/bmc.proto -from collections.abc import AsyncIterator, Iterable, Iterator, Mapping +from collections.abc import AsyncGenerator, AsyncIterator, Iterable, Iterator, Mapping from typing import Protocol from connectrpc.client import ConnectClient, ConnectClientSync @@ -23,10 +23,11 @@ def wait_for_machine_event(self, request: metalstack_dot_infra_dot_v2_dot_bmc__p raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") -class BMCServiceASGIApplication(ConnectASGIApplication): - def __init__(self, service: BMCService, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: +class BMCServiceASGIApplication(ConnectASGIApplication[BMCService]): + def __init__(self, service: BMCService | AsyncGenerator[BMCService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: super().__init__( - endpoints={ + service=service, + endpoints=lambda svc: { "/metalstack.infra.v2.BMCService/UpdateBMCInfo": Endpoint.unary( method=MethodInfo( name="UpdateBMCInfo", @@ -35,7 +36,7 @@ def __init__(self, service: BMCService, *, interceptors: Iterable[Interceptor]=( output=metalstack_dot_infra_dot_v2_dot_bmc__pb2.UpdateBMCInfoResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.update_b_m_c_info, + function=svc.update_b_m_c_info, ), "/metalstack.infra.v2.BMCService/WaitForMachineEvent": Endpoint.server_stream( method=MethodInfo( @@ -45,7 +46,7 @@ def __init__(self, service: BMCService, *, interceptors: Iterable[Interceptor]=( output=metalstack_dot_infra_dot_v2_dot_bmc__pb2.WaitForMachineEventResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.wait_for_machine_event, + function=svc.wait_for_machine_event, ), }, interceptors=interceptors, diff --git a/python/metalstack/infra/v2/bmc_pb2.py b/python/metalstack/infra/v2/bmc_pb2.py index fb5c4d19..349b7c2e 100644 --- a/python/metalstack/infra/v2/bmc_pb2.py +++ b/python/metalstack/infra/v2/bmc_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: metalstack/infra/v2/bmc.proto -# Protobuf Python Version: 6.32.1 +# Protobuf Python Version: 6.33.4 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 6, - 32, - 1, + 33, + 4, '', 'metalstack/infra/v2/bmc.proto' ) diff --git a/python/metalstack/infra/v2/event_connect.py b/python/metalstack/infra/v2/event_connect.py index 2cbfdb39..c5bb73f7 100644 --- a/python/metalstack/infra/v2/event_connect.py +++ b/python/metalstack/infra/v2/event_connect.py @@ -2,7 +2,7 @@ # Generated by https://github.com/connectrpc/connect-python. DO NOT EDIT! # source: metalstack/infra/v2/event.proto -from collections.abc import AsyncIterator, Iterable, Iterator, Mapping +from collections.abc import AsyncGenerator, AsyncIterator, Iterable, Iterator, Mapping from typing import Protocol from connectrpc.client import ConnectClient, ConnectClientSync @@ -20,10 +20,11 @@ async def send(self, request: metalstack_dot_infra_dot_v2_dot_event__pb2.EventSe raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") -class EventServiceASGIApplication(ConnectASGIApplication): - def __init__(self, service: EventService, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: +class EventServiceASGIApplication(ConnectASGIApplication[EventService]): + def __init__(self, service: EventService | AsyncGenerator[EventService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: super().__init__( - endpoints={ + service=service, + endpoints=lambda svc: { "/metalstack.infra.v2.EventService/Send": Endpoint.unary( method=MethodInfo( name="Send", @@ -32,7 +33,7 @@ def __init__(self, service: EventService, *, interceptors: Iterable[Interceptor] output=metalstack_dot_infra_dot_v2_dot_event__pb2.EventServiceSendResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.send, + function=svc.send, ), }, interceptors=interceptors, diff --git a/python/metalstack/infra/v2/event_pb2.py b/python/metalstack/infra/v2/event_pb2.py index a0003be4..f9095106 100644 --- a/python/metalstack/infra/v2/event_pb2.py +++ b/python/metalstack/infra/v2/event_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: metalstack/infra/v2/event.proto -# Protobuf Python Version: 6.32.1 +# Protobuf Python Version: 6.33.4 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 6, - 32, - 1, + 33, + 4, '', 'metalstack/infra/v2/event.proto' ) diff --git a/python/metalstack/infra/v2/switch_connect.py b/python/metalstack/infra/v2/switch_connect.py index 8f51f96a..68be8a2c 100644 --- a/python/metalstack/infra/v2/switch_connect.py +++ b/python/metalstack/infra/v2/switch_connect.py @@ -2,7 +2,7 @@ # Generated by https://github.com/connectrpc/connect-python. DO NOT EDIT! # source: metalstack/infra/v2/switch.proto -from collections.abc import AsyncIterator, Iterable, Iterator, Mapping +from collections.abc import AsyncGenerator, AsyncIterator, Iterable, Iterator, Mapping from typing import Protocol from connectrpc.client import ConnectClient, ConnectClientSync @@ -26,10 +26,11 @@ async def heartbeat(self, request: metalstack_dot_infra_dot_v2_dot_switch__pb2.S raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") -class SwitchServiceASGIApplication(ConnectASGIApplication): - def __init__(self, service: SwitchService, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: +class SwitchServiceASGIApplication(ConnectASGIApplication[SwitchService]): + def __init__(self, service: SwitchService | AsyncGenerator[SwitchService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None: super().__init__( - endpoints={ + service=service, + endpoints=lambda svc: { "/metalstack.infra.v2.SwitchService/Get": Endpoint.unary( method=MethodInfo( name="Get", @@ -38,7 +39,7 @@ def __init__(self, service: SwitchService, *, interceptors: Iterable[Interceptor output=metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceGetResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.get, + function=svc.get, ), "/metalstack.infra.v2.SwitchService/Register": Endpoint.unary( method=MethodInfo( @@ -48,7 +49,7 @@ def __init__(self, service: SwitchService, *, interceptors: Iterable[Interceptor output=metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.register, + function=svc.register, ), "/metalstack.infra.v2.SwitchService/Heartbeat": Endpoint.unary( method=MethodInfo( @@ -58,7 +59,7 @@ def __init__(self, service: SwitchService, *, interceptors: Iterable[Interceptor output=metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceHeartbeatResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), - function=service.heartbeat, + function=svc.heartbeat, ), }, interceptors=interceptors, diff --git a/python/metalstack/infra/v2/switch_pb2.py b/python/metalstack/infra/v2/switch_pb2.py index 81489c09..049ba9df 100644 --- a/python/metalstack/infra/v2/switch_pb2.py +++ b/python/metalstack/infra/v2/switch_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: metalstack/infra/v2/switch.proto -# Protobuf Python Version: 6.32.1 +# Protobuf Python Version: 6.33.4 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 6, - 32, - 1, + 33, + 4, '', 'metalstack/infra/v2/switch.proto' ) diff --git a/python/setup.py b/python/setup.py index 3ae95f1b..348e2746 100644 --- a/python/setup.py +++ b/python/setup.py @@ -4,8 +4,8 @@ NAME = "metal-stack-api" REQUIRES = [ - "connect-python>=0.5.0", - "protovalidate>=1.0.0", + "connect-python>=0.7.0", + "protovalidate>=1.1.0", ] setup(