metal-stack-api 0.0.22__py3-none-any.whl → 0.0.24__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {metal_stack_api-0.0.22.dist-info → metal_stack_api-0.0.24.dist-info}/METADATA +3 -2
- metal_stack_api-0.0.24.dist-info/RECORD +97 -0
- {metal_stack_api-0.0.22.dist-info → metal_stack_api-0.0.24.dist-info}/top_level.txt +0 -1
- metalstack/admin/v2/{filesystem_connecpy.py → filesystem_connect.py} +22 -22
- metalstack/admin/v2/filesystem_pb2.py +20 -19
- metalstack/admin/v2/filesystem_pb2.pyi +1 -0
- metalstack/admin/v2/{image_connecpy.py → image_connect.py} +24 -24
- metalstack/admin/v2/image_pb2.py +24 -23
- metalstack/admin/v2/image_pb2.pyi +1 -0
- metalstack/admin/v2/{ip_connecpy.py → ip_connect.py} +20 -20
- metalstack/admin/v2/ip_pb2.py +2 -2
- metalstack/admin/v2/{machine_connecpy.py → machine_connect.py} +20 -20
- metalstack/admin/v2/machine_pb2.py +15 -14
- metalstack/admin/v2/machine_pb2.pyi +1 -0
- metalstack/admin/v2/{network_connecpy.py → network_connect.py} +26 -26
- metalstack/admin/v2/network_pb2.py +45 -36
- metalstack/admin/v2/network_pb2.pyi +1 -0
- metalstack/admin/v2/{partition_connecpy.py → partition_connect.py} +24 -24
- metalstack/admin/v2/partition_pb2.py +23 -22
- metalstack/admin/v2/partition_pb2.pyi +1 -0
- metalstack/admin/v2/{size_connecpy.py → size_connect.py} +22 -22
- metalstack/admin/v2/size_pb2.py +20 -19
- metalstack/admin/v2/size_pb2.pyi +1 -0
- metalstack/admin/v2/switch_connect.py +444 -0
- metalstack/admin/v2/switch_pb2.py +108 -0
- metalstack/admin/v2/switch_pb2.pyi +114 -0
- metalstack/admin/v2/{tenant_connecpy.py → tenant_connect.py} +20 -20
- metalstack/admin/v2/tenant_pb2.py +18 -15
- metalstack/admin/v2/tenant_pb2.pyi +1 -0
- metalstack/admin/v2/{token_connecpy.py → token_connect.py} +20 -20
- metalstack/admin/v2/token_pb2.py +2 -2
- metalstack/api/v2/common_pb2.py +2 -2
- metalstack/api/v2/{filesystem_connecpy.py → filesystem_connect.py} +22 -22
- metalstack/api/v2/filesystem_pb2.py +54 -53
- metalstack/api/v2/filesystem_pb2.pyi +1 -0
- metalstack/api/v2/{health_connecpy.py → health_connect.py} +18 -18
- metalstack/api/v2/health_pb2.py +2 -2
- metalstack/api/v2/{image_connecpy.py → image_connect.py} +22 -22
- metalstack/api/v2/image_pb2.py +32 -31
- metalstack/api/v2/image_pb2.pyi +1 -0
- metalstack/api/v2/{ip_connecpy.py → ip_connect.py} +26 -26
- metalstack/api/v2/ip_pb2.py +41 -40
- metalstack/api/v2/ip_pb2.pyi +1 -0
- metalstack/api/v2/{machine_connecpy.py → machine_connect.py} +26 -26
- metalstack/api/v2/machine_pb2.py +122 -121
- metalstack/api/v2/machine_pb2.pyi +1 -0
- metalstack/api/v2/{method_connecpy.py → method_connect.py} +20 -20
- metalstack/api/v2/method_pb2.py +2 -2
- metalstack/api/v2/{network_connecpy.py → network_connect.py} +28 -28
- metalstack/api/v2/network_pb2.py +73 -66
- metalstack/api/v2/network_pb2.pyi +1 -0
- metalstack/api/v2/{partition_connecpy.py → partition_connect.py} +20 -20
- metalstack/api/v2/partition_pb2.py +25 -24
- metalstack/api/v2/partition_pb2.pyi +1 -0
- metalstack/api/v2/predefined_rules_pb2.py +50 -0
- metalstack/api/v2/predefined_rules_pb2.pyi +19 -0
- metalstack/api/v2/{project_connecpy.py → project_connect.py} +40 -40
- metalstack/api/v2/project_pb2.py +69 -64
- metalstack/api/v2/project_pb2.pyi +1 -0
- metalstack/api/v2/{size_connecpy.py → size_connect.py} +20 -20
- metalstack/api/v2/size_pb2.py +26 -25
- metalstack/api/v2/size_pb2.pyi +1 -0
- metalstack/api/v2/switch_pb2.py +62 -41
- metalstack/api/v2/switch_pb2.pyi +54 -11
- metalstack/api/v2/{tenant_connecpy.py → tenant_connect.py} +40 -40
- metalstack/api/v2/tenant_pb2.py +69 -64
- metalstack/api/v2/tenant_pb2.pyi +1 -0
- metalstack/api/v2/{token_connecpy.py → token_connect.py} +28 -28
- metalstack/api/v2/token_pb2.py +51 -50
- metalstack/api/v2/token_pb2.pyi +1 -0
- metalstack/api/v2/{user_connecpy.py → user_connect.py} +18 -18
- metalstack/api/v2/user_pb2.py +15 -11
- metalstack/api/v2/user_pb2.pyi +2 -0
- metalstack/api/v2/{version_connecpy.py → version_connect.py} +18 -18
- metalstack/api/v2/version_pb2.py +2 -2
- metalstack/client/client.py +56 -52
- metalstack/infra/v2/{bmc_connecpy.py → bmc_connect.py} +18 -18
- metalstack/infra/v2/bmc_pb2.py +2 -2
- metalstack/infra/v2/{switch_connecpy.py → switch_connect.py} +83 -18
- metalstack/infra/v2/switch_pb2.py +28 -10
- metalstack/infra/v2/switch_pb2.pyi +51 -0
- buf/__init__.py +0 -0
- buf/validate/__init__.py +0 -0
- buf/validate/validate_pb2.py +0 -450
- buf/validate/validate_pb2.pyi +0 -627
- buf/validate/validate_pb2_grpc.py +0 -4
- metal_stack_api-0.0.22.dist-info/RECORD +0 -124
- metalstack/admin/v2/filesystem_pb2_grpc.py +0 -169
- metalstack/admin/v2/image_pb2_grpc.py +0 -213
- metalstack/admin/v2/ip_pb2_grpc.py +0 -125
- metalstack/admin/v2/machine_pb2_grpc.py +0 -125
- metalstack/admin/v2/network_pb2_grpc.py +0 -257
- metalstack/admin/v2/partition_pb2_grpc.py +0 -213
- metalstack/admin/v2/size_pb2_grpc.py +0 -169
- metalstack/admin/v2/tenant_pb2_grpc.py +0 -125
- metalstack/admin/v2/token_pb2_grpc.py +0 -125
- metalstack/api/v2/common_pb2_grpc.py +0 -4
- metalstack/api/v2/filesystem_pb2_grpc.py +0 -169
- metalstack/api/v2/health_pb2_grpc.py +0 -81
- metalstack/api/v2/image_pb2_grpc.py +0 -169
- metalstack/api/v2/ip_pb2_grpc.py +0 -257
- metalstack/api/v2/machine_pb2_grpc.py +0 -257
- metalstack/api/v2/method_pb2_grpc.py +0 -128
- metalstack/api/v2/network_pb2_grpc.py +0 -301
- metalstack/api/v2/partition_pb2_grpc.py +0 -125
- metalstack/api/v2/project_pb2_grpc.py +0 -565
- metalstack/api/v2/size_pb2_grpc.py +0 -125
- metalstack/api/v2/switch_pb2_grpc.py +0 -4
- metalstack/api/v2/tenant_pb2_grpc.py +0 -565
- metalstack/api/v2/token_pb2_grpc.py +0 -301
- metalstack/api/v2/user_pb2_grpc.py +0 -81
- metalstack/api/v2/version_pb2_grpc.py +0 -81
- metalstack/infra/v2/bmc_pb2_grpc.py +0 -81
- metalstack/infra/v2/switch_pb2_grpc.py +0 -81
- {metal_stack_api-0.0.22.dist-info → metal_stack_api-0.0.24.dist-info}/WHEEL +0 -0
|
@@ -1,27 +1,30 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
|
-
# Generated by https://github.com/
|
|
2
|
+
# Generated by https://github.com/connectrpc/connect-python. DO NOT EDIT!
|
|
3
3
|
# source: metalstack/infra/v2/switch.proto
|
|
4
4
|
|
|
5
5
|
from collections.abc import AsyncIterator, Iterable, Iterator, Mapping
|
|
6
6
|
from typing import Protocol
|
|
7
7
|
|
|
8
|
-
from
|
|
9
|
-
from
|
|
10
|
-
from
|
|
11
|
-
from
|
|
12
|
-
from
|
|
13
|
-
from
|
|
14
|
-
from
|
|
8
|
+
from connectrpc.client import ConnectClient, ConnectClientSync
|
|
9
|
+
from connectrpc.code import Code
|
|
10
|
+
from connectrpc.errors import ConnectError
|
|
11
|
+
from connectrpc.interceptor import Interceptor, InterceptorSync
|
|
12
|
+
from connectrpc.method import IdempotencyLevel, MethodInfo
|
|
13
|
+
from connectrpc.request import Headers, RequestContext
|
|
14
|
+
from connectrpc.server import ConnectASGIApplication, ConnectWSGIApplication, Endpoint, EndpointSync
|
|
15
15
|
import metalstack.infra.v2.switch_pb2 as metalstack_dot_infra_dot_v2_dot_switch__pb2
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
class SwitchService(Protocol):
|
|
19
19
|
async def register(self, request: metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterRequest, ctx: RequestContext) -> metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterResponse:
|
|
20
|
-
raise
|
|
20
|
+
raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
|
|
21
21
|
|
|
22
|
+
async def heartbeat(self, request: metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceHeartbeatRequest, ctx: RequestContext) -> metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceHeartbeatResponse:
|
|
23
|
+
raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
|
|
22
24
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
+
|
|
26
|
+
class SwitchServiceASGIApplication(ConnectASGIApplication):
|
|
27
|
+
def __init__(self, service: SwitchService, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None:
|
|
25
28
|
super().__init__(
|
|
26
29
|
endpoints={
|
|
27
30
|
"/metalstack.infra.v2.SwitchService/Register": Endpoint.unary(
|
|
@@ -34,18 +37,28 @@ class SwitchServiceASGIApplication(ConnecpyASGIApplication):
|
|
|
34
37
|
),
|
|
35
38
|
function=service.register,
|
|
36
39
|
),
|
|
40
|
+
"/metalstack.infra.v2.SwitchService/Heartbeat": Endpoint.unary(
|
|
41
|
+
method=MethodInfo(
|
|
42
|
+
name="Heartbeat",
|
|
43
|
+
service_name="metalstack.infra.v2.SwitchService",
|
|
44
|
+
input=metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceHeartbeatRequest,
|
|
45
|
+
output=metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceHeartbeatResponse,
|
|
46
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
47
|
+
),
|
|
48
|
+
function=service.heartbeat,
|
|
49
|
+
),
|
|
37
50
|
},
|
|
38
51
|
interceptors=interceptors,
|
|
39
52
|
read_max_bytes=read_max_bytes,
|
|
40
53
|
)
|
|
41
54
|
|
|
42
55
|
@property
|
|
43
|
-
def path(self):
|
|
56
|
+
def path(self) -> str:
|
|
44
57
|
"""Returns the URL path to mount the application to when serving multiple applications."""
|
|
45
58
|
return "/metalstack.infra.v2.SwitchService"
|
|
46
59
|
|
|
47
60
|
|
|
48
|
-
class SwitchServiceClient(
|
|
61
|
+
class SwitchServiceClient(ConnectClient):
|
|
49
62
|
async def register(
|
|
50
63
|
self,
|
|
51
64
|
request: metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterRequest,
|
|
@@ -66,14 +79,36 @@ class SwitchServiceClient(ConnecpyClient):
|
|
|
66
79
|
timeout_ms=timeout_ms,
|
|
67
80
|
)
|
|
68
81
|
|
|
82
|
+
async def heartbeat(
|
|
83
|
+
self,
|
|
84
|
+
request: metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceHeartbeatRequest,
|
|
85
|
+
*,
|
|
86
|
+
headers: Headers | Mapping[str, str] | None = None,
|
|
87
|
+
timeout_ms: int | None = None,
|
|
88
|
+
) -> metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceHeartbeatResponse:
|
|
89
|
+
return await self.execute_unary(
|
|
90
|
+
request=request,
|
|
91
|
+
method=MethodInfo(
|
|
92
|
+
name="Heartbeat",
|
|
93
|
+
service_name="metalstack.infra.v2.SwitchService",
|
|
94
|
+
input=metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceHeartbeatRequest,
|
|
95
|
+
output=metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceHeartbeatResponse,
|
|
96
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
97
|
+
),
|
|
98
|
+
headers=headers,
|
|
99
|
+
timeout_ms=timeout_ms,
|
|
100
|
+
)
|
|
101
|
+
|
|
69
102
|
|
|
70
103
|
class SwitchServiceSync(Protocol):
|
|
71
104
|
def register(self, request: metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterRequest, ctx: RequestContext) -> metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterResponse:
|
|
72
|
-
raise
|
|
105
|
+
raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
|
|
106
|
+
def heartbeat(self, request: metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceHeartbeatRequest, ctx: RequestContext) -> metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceHeartbeatResponse:
|
|
107
|
+
raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
|
|
73
108
|
|
|
74
109
|
|
|
75
|
-
class SwitchServiceWSGIApplication(
|
|
76
|
-
def __init__(self, service: SwitchServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None):
|
|
110
|
+
class SwitchServiceWSGIApplication(ConnectWSGIApplication):
|
|
111
|
+
def __init__(self, service: SwitchServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None) -> None:
|
|
77
112
|
super().__init__(
|
|
78
113
|
endpoints={
|
|
79
114
|
"/metalstack.infra.v2.SwitchService/Register": EndpointSync.unary(
|
|
@@ -86,18 +121,28 @@ class SwitchServiceWSGIApplication(ConnecpyWSGIApplication):
|
|
|
86
121
|
),
|
|
87
122
|
function=service.register,
|
|
88
123
|
),
|
|
124
|
+
"/metalstack.infra.v2.SwitchService/Heartbeat": EndpointSync.unary(
|
|
125
|
+
method=MethodInfo(
|
|
126
|
+
name="Heartbeat",
|
|
127
|
+
service_name="metalstack.infra.v2.SwitchService",
|
|
128
|
+
input=metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceHeartbeatRequest,
|
|
129
|
+
output=metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceHeartbeatResponse,
|
|
130
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
131
|
+
),
|
|
132
|
+
function=service.heartbeat,
|
|
133
|
+
),
|
|
89
134
|
},
|
|
90
135
|
interceptors=interceptors,
|
|
91
136
|
read_max_bytes=read_max_bytes,
|
|
92
137
|
)
|
|
93
138
|
|
|
94
139
|
@property
|
|
95
|
-
def path(self):
|
|
140
|
+
def path(self) -> str:
|
|
96
141
|
"""Returns the URL path to mount the application to when serving multiple applications."""
|
|
97
142
|
return "/metalstack.infra.v2.SwitchService"
|
|
98
143
|
|
|
99
144
|
|
|
100
|
-
class SwitchServiceClientSync(
|
|
145
|
+
class SwitchServiceClientSync(ConnectClientSync):
|
|
101
146
|
def register(
|
|
102
147
|
self,
|
|
103
148
|
request: metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterRequest,
|
|
@@ -117,3 +162,23 @@ class SwitchServiceClientSync(ConnecpyClientSync):
|
|
|
117
162
|
headers=headers,
|
|
118
163
|
timeout_ms=timeout_ms,
|
|
119
164
|
)
|
|
165
|
+
|
|
166
|
+
def heartbeat(
|
|
167
|
+
self,
|
|
168
|
+
request: metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceHeartbeatRequest,
|
|
169
|
+
*,
|
|
170
|
+
headers: Headers | Mapping[str, str] | None = None,
|
|
171
|
+
timeout_ms: int | None = None,
|
|
172
|
+
) -> metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceHeartbeatResponse:
|
|
173
|
+
return self.execute_unary(
|
|
174
|
+
request=request,
|
|
175
|
+
method=MethodInfo(
|
|
176
|
+
name="Heartbeat",
|
|
177
|
+
service_name="metalstack.infra.v2.SwitchService",
|
|
178
|
+
input=metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceHeartbeatRequest,
|
|
179
|
+
output=metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceHeartbeatResponse,
|
|
180
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
181
|
+
),
|
|
182
|
+
headers=headers,
|
|
183
|
+
timeout_ms=timeout_ms,
|
|
184
|
+
)
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
3
|
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
4
|
# source: metalstack/infra/v2/switch.proto
|
|
5
|
-
# Protobuf Python Version: 6.32.
|
|
5
|
+
# Protobuf Python Version: 6.32.1
|
|
6
6
|
"""Generated protocol buffer code."""
|
|
7
7
|
from google.protobuf import descriptor as _descriptor
|
|
8
8
|
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
@@ -13,7 +13,7 @@ _runtime_version.ValidateProtobufRuntimeVersion(
|
|
|
13
13
|
_runtime_version.Domain.PUBLIC,
|
|
14
14
|
6,
|
|
15
15
|
32,
|
|
16
|
-
|
|
16
|
+
1,
|
|
17
17
|
'',
|
|
18
18
|
'metalstack/infra/v2/switch.proto'
|
|
19
19
|
)
|
|
@@ -22,11 +22,13 @@ _runtime_version.ValidateProtobufRuntimeVersion(
|
|
|
22
22
|
_sym_db = _symbol_database.Default()
|
|
23
23
|
|
|
24
24
|
|
|
25
|
+
from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2
|
|
26
|
+
from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
|
|
25
27
|
from metalstack.api.v2 import common_pb2 as metalstack_dot_api_dot_v2_dot_common__pb2
|
|
26
28
|
from metalstack.api.v2 import switch_pb2 as metalstack_dot_api_dot_v2_dot_switch__pb2
|
|
27
29
|
|
|
28
30
|
|
|
29
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n metalstack/infra/v2/switch.proto\x12\x13metalstack.infra.v2\x1a\x1emetalstack/api/v2/common.proto\x1a\x1emetalstack/api/v2/switch.proto\"Q\n\x1cSwitchServiceRegisterRequest\x12\x31\n\x06switch\x18\x01 \x01(\x0b\x32\x19.metalstack.api.v2.SwitchR\x06switch\"R\n\x1dSwitchServiceRegisterResponse\x12\x31\n\x06switch\x18\x01 \x01(\x0b\x32\x19.metalstack.api.v2.SwitchR\
|
|
31
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n metalstack/infra/v2/switch.proto\x12\x13metalstack.infra.v2\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1emetalstack/api/v2/common.proto\x1a\x1emetalstack/api/v2/switch.proto\"Q\n\x1cSwitchServiceRegisterRequest\x12\x31\n\x06switch\x18\x01 \x01(\x0b\x32\x19.metalstack.api.v2.SwitchR\x06switch\"R\n\x1dSwitchServiceRegisterResponse\x12\x31\n\x06switch\x18\x01 \x01(\x0b\x32\x19.metalstack.api.v2.SwitchR\x06switch\"\x9c\x04\n\x1dSwitchServiceHeartbeatRequest\x12\x35\n\x08\x64uration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationR\x08\x64uration\x12\x19\n\x05\x65rror\x18\x02 \x01(\tH\x00R\x05\x65rror\x88\x01\x01\x12\x63\n\x0bport_states\x18\x03 \x03(\x0b\x32\x42.metalstack.infra.v2.SwitchServiceHeartbeatRequest.PortStatesEntryR\nportStates\x12m\n\x0f\x62gp_port_states\x18\x04 \x03(\x0b\x32\x45.metalstack.infra.v2.SwitchServiceHeartbeatRequest.BgpPortStatesEntryR\rbgpPortStates\x1a\x62\n\x0fPortStatesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x39\n\x05value\x18\x02 \x01(\x0e\x32#.metalstack.api.v2.SwitchPortStatusR\x05value:\x02\x38\x01\x1ag\n\x12\x42gpPortStatesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12;\n\x05value\x18\x02 \x01(\x0b\x32%.metalstack.api.v2.SwitchBGPPortStateR\x05value:\x02\x38\x01\x42\x08\n\x06_error\"\xb7\x01\n\x1eSwitchServiceHeartbeatResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12<\n\tlast_sync\x18\x02 \x01(\x0b\x32\x1f.metalstack.infra.v2.SwitchSyncR\x08lastSync\x12G\n\x0flast_sync_error\x18\x03 \x01(\x0b\x32\x1f.metalstack.infra.v2.SwitchSyncR\rlastSyncError\"\x98\x01\n\nSwitchSync\x12.\n\x04time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x04time\x12\x35\n\x08\x64uration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationR\x08\x64uration\x12\x19\n\x05\x65rror\x18\x03 \x01(\tH\x00R\x05\x65rror\x88\x01\x01\x42\x08\n\x06_error2\x8e\x02\n\rSwitchService\x12|\n\x08Register\x12\x31.metalstack.infra.v2.SwitchServiceRegisterRequest\x1a\x32.metalstack.infra.v2.SwitchServiceRegisterResponse\"\t\xe0\xf3\x18\x02\xea\xf3\x18\x01\x01\x12\x7f\n\tHeartbeat\x12\x32.metalstack.infra.v2.SwitchServiceHeartbeatRequest\x1a\x33.metalstack.infra.v2.SwitchServiceHeartbeatResponse\"\t\xe0\xf3\x18\x02\xea\xf3\x18\x01\x01\x42\xcf\x01\n\x17\x63om.metalstack.infra.v2B\x0bSwitchProtoP\x01Z9github.com/metal-stack/api/go/metalstack/infra/v2;infrav2\xa2\x02\x03MIX\xaa\x02\x13Metalstack.Infra.V2\xca\x02\x13Metalstack\\Infra\\V2\xe2\x02\x1fMetalstack\\Infra\\V2\\GPBMetadata\xea\x02\x15Metalstack::Infra::V2b\x06proto3')
|
|
30
32
|
|
|
31
33
|
_globals = globals()
|
|
32
34
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
@@ -34,12 +36,28 @@ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'metalstack.infra.v2.switch_
|
|
|
34
36
|
if not _descriptor._USE_C_DESCRIPTORS:
|
|
35
37
|
_globals['DESCRIPTOR']._loaded_options = None
|
|
36
38
|
_globals['DESCRIPTOR']._serialized_options = b'\n\027com.metalstack.infra.v2B\013SwitchProtoP\001Z9github.com/metal-stack/api/go/metalstack/infra/v2;infrav2\242\002\003MIX\252\002\023Metalstack.Infra.V2\312\002\023Metalstack\\Infra\\V2\342\002\037Metalstack\\Infra\\V2\\GPBMetadata\352\002\025Metalstack::Infra::V2'
|
|
39
|
+
_globals['_SWITCHSERVICEHEARTBEATREQUEST_PORTSTATESENTRY']._loaded_options = None
|
|
40
|
+
_globals['_SWITCHSERVICEHEARTBEATREQUEST_PORTSTATESENTRY']._serialized_options = b'8\001'
|
|
41
|
+
_globals['_SWITCHSERVICEHEARTBEATREQUEST_BGPPORTSTATESENTRY']._loaded_options = None
|
|
42
|
+
_globals['_SWITCHSERVICEHEARTBEATREQUEST_BGPPORTSTATESENTRY']._serialized_options = b'8\001'
|
|
37
43
|
_globals['_SWITCHSERVICE'].methods_by_name['Register']._loaded_options = None
|
|
38
|
-
_globals['_SWITCHSERVICE'].methods_by_name['Register']._serialized_options = b'\340\363\030\002\352\363\030\
|
|
39
|
-
_globals['
|
|
40
|
-
_globals['
|
|
41
|
-
_globals['
|
|
42
|
-
_globals['
|
|
43
|
-
_globals['
|
|
44
|
-
_globals['
|
|
44
|
+
_globals['_SWITCHSERVICE'].methods_by_name['Register']._serialized_options = b'\340\363\030\002\352\363\030\001\001'
|
|
45
|
+
_globals['_SWITCHSERVICE'].methods_by_name['Heartbeat']._loaded_options = None
|
|
46
|
+
_globals['_SWITCHSERVICE'].methods_by_name['Heartbeat']._serialized_options = b'\340\363\030\002\352\363\030\001\001'
|
|
47
|
+
_globals['_SWITCHSERVICEREGISTERREQUEST']._serialized_start=186
|
|
48
|
+
_globals['_SWITCHSERVICEREGISTERREQUEST']._serialized_end=267
|
|
49
|
+
_globals['_SWITCHSERVICEREGISTERRESPONSE']._serialized_start=269
|
|
50
|
+
_globals['_SWITCHSERVICEREGISTERRESPONSE']._serialized_end=351
|
|
51
|
+
_globals['_SWITCHSERVICEHEARTBEATREQUEST']._serialized_start=354
|
|
52
|
+
_globals['_SWITCHSERVICEHEARTBEATREQUEST']._serialized_end=894
|
|
53
|
+
_globals['_SWITCHSERVICEHEARTBEATREQUEST_PORTSTATESENTRY']._serialized_start=681
|
|
54
|
+
_globals['_SWITCHSERVICEHEARTBEATREQUEST_PORTSTATESENTRY']._serialized_end=779
|
|
55
|
+
_globals['_SWITCHSERVICEHEARTBEATREQUEST_BGPPORTSTATESENTRY']._serialized_start=781
|
|
56
|
+
_globals['_SWITCHSERVICEHEARTBEATREQUEST_BGPPORTSTATESENTRY']._serialized_end=884
|
|
57
|
+
_globals['_SWITCHSERVICEHEARTBEATRESPONSE']._serialized_start=897
|
|
58
|
+
_globals['_SWITCHSERVICEHEARTBEATRESPONSE']._serialized_end=1080
|
|
59
|
+
_globals['_SWITCHSYNC']._serialized_start=1083
|
|
60
|
+
_globals['_SWITCHSYNC']._serialized_end=1235
|
|
61
|
+
_globals['_SWITCHSERVICE']._serialized_start=1238
|
|
62
|
+
_globals['_SWITCHSERVICE']._serialized_end=1508
|
|
45
63
|
# @@protoc_insertion_point(module_scope)
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
import datetime
|
|
2
|
+
|
|
3
|
+
from google.protobuf import duration_pb2 as _duration_pb2
|
|
4
|
+
from google.protobuf import timestamp_pb2 as _timestamp_pb2
|
|
1
5
|
from metalstack.api.v2 import common_pb2 as _common_pb2
|
|
2
6
|
from metalstack.api.v2 import switch_pb2 as _switch_pb2
|
|
7
|
+
from google.protobuf.internal import containers as _containers
|
|
3
8
|
from google.protobuf import descriptor as _descriptor
|
|
4
9
|
from google.protobuf import message as _message
|
|
5
10
|
from collections.abc import Mapping as _Mapping
|
|
@@ -18,3 +23,49 @@ class SwitchServiceRegisterResponse(_message.Message):
|
|
|
18
23
|
SWITCH_FIELD_NUMBER: _ClassVar[int]
|
|
19
24
|
switch: _switch_pb2.Switch
|
|
20
25
|
def __init__(self, switch: _Optional[_Union[_switch_pb2.Switch, _Mapping]] = ...) -> None: ...
|
|
26
|
+
|
|
27
|
+
class SwitchServiceHeartbeatRequest(_message.Message):
|
|
28
|
+
__slots__ = ("duration", "error", "port_states", "bgp_port_states")
|
|
29
|
+
class PortStatesEntry(_message.Message):
|
|
30
|
+
__slots__ = ("key", "value")
|
|
31
|
+
KEY_FIELD_NUMBER: _ClassVar[int]
|
|
32
|
+
VALUE_FIELD_NUMBER: _ClassVar[int]
|
|
33
|
+
key: str
|
|
34
|
+
value: _switch_pb2.SwitchPortStatus
|
|
35
|
+
def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[_switch_pb2.SwitchPortStatus, str]] = ...) -> None: ...
|
|
36
|
+
class BgpPortStatesEntry(_message.Message):
|
|
37
|
+
__slots__ = ("key", "value")
|
|
38
|
+
KEY_FIELD_NUMBER: _ClassVar[int]
|
|
39
|
+
VALUE_FIELD_NUMBER: _ClassVar[int]
|
|
40
|
+
key: str
|
|
41
|
+
value: _switch_pb2.SwitchBGPPortState
|
|
42
|
+
def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[_switch_pb2.SwitchBGPPortState, _Mapping]] = ...) -> None: ...
|
|
43
|
+
DURATION_FIELD_NUMBER: _ClassVar[int]
|
|
44
|
+
ERROR_FIELD_NUMBER: _ClassVar[int]
|
|
45
|
+
PORT_STATES_FIELD_NUMBER: _ClassVar[int]
|
|
46
|
+
BGP_PORT_STATES_FIELD_NUMBER: _ClassVar[int]
|
|
47
|
+
duration: _duration_pb2.Duration
|
|
48
|
+
error: str
|
|
49
|
+
port_states: _containers.ScalarMap[str, _switch_pb2.SwitchPortStatus]
|
|
50
|
+
bgp_port_states: _containers.MessageMap[str, _switch_pb2.SwitchBGPPortState]
|
|
51
|
+
def __init__(self, duration: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., error: _Optional[str] = ..., port_states: _Optional[_Mapping[str, _switch_pb2.SwitchPortStatus]] = ..., bgp_port_states: _Optional[_Mapping[str, _switch_pb2.SwitchBGPPortState]] = ...) -> None: ...
|
|
52
|
+
|
|
53
|
+
class SwitchServiceHeartbeatResponse(_message.Message):
|
|
54
|
+
__slots__ = ("id", "last_sync", "last_sync_error")
|
|
55
|
+
ID_FIELD_NUMBER: _ClassVar[int]
|
|
56
|
+
LAST_SYNC_FIELD_NUMBER: _ClassVar[int]
|
|
57
|
+
LAST_SYNC_ERROR_FIELD_NUMBER: _ClassVar[int]
|
|
58
|
+
id: str
|
|
59
|
+
last_sync: SwitchSync
|
|
60
|
+
last_sync_error: SwitchSync
|
|
61
|
+
def __init__(self, id: _Optional[str] = ..., last_sync: _Optional[_Union[SwitchSync, _Mapping]] = ..., last_sync_error: _Optional[_Union[SwitchSync, _Mapping]] = ...) -> None: ...
|
|
62
|
+
|
|
63
|
+
class SwitchSync(_message.Message):
|
|
64
|
+
__slots__ = ("time", "duration", "error")
|
|
65
|
+
TIME_FIELD_NUMBER: _ClassVar[int]
|
|
66
|
+
DURATION_FIELD_NUMBER: _ClassVar[int]
|
|
67
|
+
ERROR_FIELD_NUMBER: _ClassVar[int]
|
|
68
|
+
time: _timestamp_pb2.Timestamp
|
|
69
|
+
duration: _duration_pb2.Duration
|
|
70
|
+
error: str
|
|
71
|
+
def __init__(self, time: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ..., duration: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., error: _Optional[str] = ...) -> None: ...
|
buf/__init__.py
DELETED
|
File without changes
|
buf/validate/__init__.py
DELETED
|
File without changes
|