metal-stack-api 0.0.28__py3-none-any.whl → 0.0.29__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.28.dist-info → metal_stack_api-0.0.29.dist-info}/METADATA +1 -1
- {metal_stack_api-0.0.28.dist-info → metal_stack_api-0.0.29.dist-info}/RECORD +7 -7
- metalstack/infra/v2/switch_connect.py +65 -0
- metalstack/infra/v2/switch_pb2.py +29 -17
- metalstack/infra/v2/switch_pb2.pyi +18 -2
- {metal_stack_api-0.0.28.dist-info → metal_stack_api-0.0.29.dist-info}/WHEEL +0 -0
- {metal_stack_api-0.0.28.dist-info → metal_stack_api-0.0.29.dist-info}/top_level.txt +0 -0
|
@@ -88,10 +88,10 @@ metalstack/infra/v2/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSu
|
|
|
88
88
|
metalstack/infra/v2/bmc_connect.py,sha256=OJQQnWJmYANeDoCcwQDR-wQUiyZ0bNlNsOxDFFnaklk,5332
|
|
89
89
|
metalstack/infra/v2/bmc_pb2.py,sha256=4NUyjsGQ5a5FbfHyCfKBkxVbad6Vt8RvH8QwnMCjwhg,2701
|
|
90
90
|
metalstack/infra/v2/bmc_pb2.pyi,sha256=e4FGBnDQhg6K_zlhoC170lw-0OSlSdHK3So6r3Reh1E,444
|
|
91
|
-
metalstack/infra/v2/switch_connect.py,sha256=
|
|
92
|
-
metalstack/infra/v2/switch_pb2.py,sha256=
|
|
93
|
-
metalstack/infra/v2/switch_pb2.pyi,sha256=
|
|
94
|
-
metal_stack_api-0.0.
|
|
95
|
-
metal_stack_api-0.0.
|
|
96
|
-
metal_stack_api-0.0.
|
|
97
|
-
metal_stack_api-0.0.
|
|
91
|
+
metalstack/infra/v2/switch_connect.py,sha256=TftYMAVcYhwFaenInmBK21CnGTyN5pXNDrKQLDWFTz4,12319
|
|
92
|
+
metalstack/infra/v2/switch_pb2.py,sha256=ZoVTK-bwTP33GOKvK3-GlphfHaYmmVmS8_ZrKloFB-o,7728
|
|
93
|
+
metalstack/infra/v2/switch_pb2.pyi,sha256=SSUHCM5ImRTV1U1X_uEA51qWZYtEd-_ZesVESiKeWNw,4309
|
|
94
|
+
metal_stack_api-0.0.29.dist-info/METADATA,sha256=wjW8xsLK_Xh5wBTEpqe88K1EBflw4uZnuNNqZ3Eqgws,874
|
|
95
|
+
metal_stack_api-0.0.29.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
96
|
+
metal_stack_api-0.0.29.dist-info/top_level.txt,sha256=OqZoCBTOYMgPJJ3GbO1ZfY7eRpW9Ljc5g3Ajlu44n2I,11
|
|
97
|
+
metal_stack_api-0.0.29.dist-info/RECORD,,
|
|
@@ -16,6 +16,9 @@ import metalstack.infra.v2.switch_pb2 as metalstack_dot_infra_dot_v2_dot_switch_
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
class SwitchService(Protocol):
|
|
19
|
+
async def get(self, request: metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceGetRequest, ctx: RequestContext) -> metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceGetResponse:
|
|
20
|
+
raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
|
|
21
|
+
|
|
19
22
|
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
23
|
raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
|
|
21
24
|
|
|
@@ -27,6 +30,16 @@ class SwitchServiceASGIApplication(ConnectASGIApplication):
|
|
|
27
30
|
def __init__(self, service: SwitchService, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None:
|
|
28
31
|
super().__init__(
|
|
29
32
|
endpoints={
|
|
33
|
+
"/metalstack.infra.v2.SwitchService/Get": Endpoint.unary(
|
|
34
|
+
method=MethodInfo(
|
|
35
|
+
name="Get",
|
|
36
|
+
service_name="metalstack.infra.v2.SwitchService",
|
|
37
|
+
input=metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceGetRequest,
|
|
38
|
+
output=metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceGetResponse,
|
|
39
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
40
|
+
),
|
|
41
|
+
function=service.get,
|
|
42
|
+
),
|
|
30
43
|
"/metalstack.infra.v2.SwitchService/Register": Endpoint.unary(
|
|
31
44
|
method=MethodInfo(
|
|
32
45
|
name="Register",
|
|
@@ -59,6 +72,26 @@ class SwitchServiceASGIApplication(ConnectASGIApplication):
|
|
|
59
72
|
|
|
60
73
|
|
|
61
74
|
class SwitchServiceClient(ConnectClient):
|
|
75
|
+
async def get(
|
|
76
|
+
self,
|
|
77
|
+
request: metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceGetRequest,
|
|
78
|
+
*,
|
|
79
|
+
headers: Headers | Mapping[str, str] | None = None,
|
|
80
|
+
timeout_ms: int | None = None,
|
|
81
|
+
) -> metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceGetResponse:
|
|
82
|
+
return await self.execute_unary(
|
|
83
|
+
request=request,
|
|
84
|
+
method=MethodInfo(
|
|
85
|
+
name="Get",
|
|
86
|
+
service_name="metalstack.infra.v2.SwitchService",
|
|
87
|
+
input=metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceGetRequest,
|
|
88
|
+
output=metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceGetResponse,
|
|
89
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
90
|
+
),
|
|
91
|
+
headers=headers,
|
|
92
|
+
timeout_ms=timeout_ms,
|
|
93
|
+
)
|
|
94
|
+
|
|
62
95
|
async def register(
|
|
63
96
|
self,
|
|
64
97
|
request: metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterRequest,
|
|
@@ -101,6 +134,8 @@ class SwitchServiceClient(ConnectClient):
|
|
|
101
134
|
|
|
102
135
|
|
|
103
136
|
class SwitchServiceSync(Protocol):
|
|
137
|
+
def get(self, request: metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceGetRequest, ctx: RequestContext) -> metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceGetResponse:
|
|
138
|
+
raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
|
|
104
139
|
def register(self, request: metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterRequest, ctx: RequestContext) -> metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterResponse:
|
|
105
140
|
raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
|
|
106
141
|
def heartbeat(self, request: metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceHeartbeatRequest, ctx: RequestContext) -> metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceHeartbeatResponse:
|
|
@@ -111,6 +146,16 @@ class SwitchServiceWSGIApplication(ConnectWSGIApplication):
|
|
|
111
146
|
def __init__(self, service: SwitchServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None) -> None:
|
|
112
147
|
super().__init__(
|
|
113
148
|
endpoints={
|
|
149
|
+
"/metalstack.infra.v2.SwitchService/Get": EndpointSync.unary(
|
|
150
|
+
method=MethodInfo(
|
|
151
|
+
name="Get",
|
|
152
|
+
service_name="metalstack.infra.v2.SwitchService",
|
|
153
|
+
input=metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceGetRequest,
|
|
154
|
+
output=metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceGetResponse,
|
|
155
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
156
|
+
),
|
|
157
|
+
function=service.get,
|
|
158
|
+
),
|
|
114
159
|
"/metalstack.infra.v2.SwitchService/Register": EndpointSync.unary(
|
|
115
160
|
method=MethodInfo(
|
|
116
161
|
name="Register",
|
|
@@ -143,6 +188,26 @@ class SwitchServiceWSGIApplication(ConnectWSGIApplication):
|
|
|
143
188
|
|
|
144
189
|
|
|
145
190
|
class SwitchServiceClientSync(ConnectClientSync):
|
|
191
|
+
def get(
|
|
192
|
+
self,
|
|
193
|
+
request: metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceGetRequest,
|
|
194
|
+
*,
|
|
195
|
+
headers: Headers | Mapping[str, str] | None = None,
|
|
196
|
+
timeout_ms: int | None = None,
|
|
197
|
+
) -> metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceGetResponse:
|
|
198
|
+
return self.execute_unary(
|
|
199
|
+
request=request,
|
|
200
|
+
method=MethodInfo(
|
|
201
|
+
name="Get",
|
|
202
|
+
service_name="metalstack.infra.v2.SwitchService",
|
|
203
|
+
input=metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceGetRequest,
|
|
204
|
+
output=metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceGetResponse,
|
|
205
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
206
|
+
),
|
|
207
|
+
headers=headers,
|
|
208
|
+
timeout_ms=timeout_ms,
|
|
209
|
+
)
|
|
210
|
+
|
|
146
211
|
def register(
|
|
147
212
|
self,
|
|
148
213
|
request: metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterRequest,
|
|
@@ -22,13 +22,15 @@ _runtime_version.ValidateProtobufRuntimeVersion(
|
|
|
22
22
|
_sym_db = _symbol_database.Default()
|
|
23
23
|
|
|
24
24
|
|
|
25
|
+
from buf.validate import validate_pb2 as buf_dot_validate_dot_validate__pb2
|
|
25
26
|
from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2
|
|
26
27
|
from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
|
|
27
28
|
from metalstack.api.v2 import common_pb2 as metalstack_dot_api_dot_v2_dot_common__pb2
|
|
29
|
+
from metalstack.api.v2 import predefined_rules_pb2 as metalstack_dot_api_dot_v2_dot_predefined__rules__pb2
|
|
28
30
|
from metalstack.api.v2 import switch_pb2 as metalstack_dot_api_dot_v2_dot_switch__pb2
|
|
29
31
|
|
|
30
32
|
|
|
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\"\
|
|
33
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n metalstack/infra/v2/switch.proto\x12\x13metalstack.infra.v2\x1a\x1b\x62uf/validate/validate.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1emetalstack/api/v2/common.proto\x1a(metalstack/api/v2/predefined_rules.proto\x1a\x1emetalstack/api/v2/switch.proto\"8\n\x17SwitchServiceGetRequest\x12\x1d\n\x02id\x18\x01 \x01(\tB\r\xbaH\nr\x08h\x01\xc0\xb3\xae\xb1\x02\x01R\x02id\"M\n\x18SwitchServiceGetResponse\x12\x31\n\x06switch\x18\x01 \x01(\x0b\x32\x19.metalstack.api.v2.SwitchR\x06switch\"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\"\xbb\x04\n\x1dSwitchServiceHeartbeatRequest\x12\x1d\n\x02id\x18\x01 \x01(\tB\r\xbaH\nr\x08h\x01\xc0\xb3\xae\xb1\x02\x01R\x02id\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\x12\x63\n\x0bport_states\x18\x04 \x03(\x0b\x32\x42.metalstack.infra.v2.SwitchServiceHeartbeatRequest.PortStatesEntryR\nportStates\x12m\n\x0f\x62gp_port_states\x18\x05 \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\xfd\x02\n\rSwitchService\x12m\n\x03Get\x12,.metalstack.infra.v2.SwitchServiceGetRequest\x1a-.metalstack.infra.v2.SwitchServiceGetResponse\"\t\xe0\xf3\x18\x02\xea\xf3\x18\x01\x01\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')
|
|
32
34
|
|
|
33
35
|
_globals = globals()
|
|
34
36
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
@@ -36,28 +38,38 @@ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'metalstack.infra.v2.switch_
|
|
|
36
38
|
if not _descriptor._USE_C_DESCRIPTORS:
|
|
37
39
|
_globals['DESCRIPTOR']._loaded_options = None
|
|
38
40
|
_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'
|
|
41
|
+
_globals['_SWITCHSERVICEGETREQUEST'].fields_by_name['id']._loaded_options = None
|
|
42
|
+
_globals['_SWITCHSERVICEGETREQUEST'].fields_by_name['id']._serialized_options = b'\272H\nr\010h\001\300\263\256\261\002\001'
|
|
39
43
|
_globals['_SWITCHSERVICEHEARTBEATREQUEST_PORTSTATESENTRY']._loaded_options = None
|
|
40
44
|
_globals['_SWITCHSERVICEHEARTBEATREQUEST_PORTSTATESENTRY']._serialized_options = b'8\001'
|
|
41
45
|
_globals['_SWITCHSERVICEHEARTBEATREQUEST_BGPPORTSTATESENTRY']._loaded_options = None
|
|
42
46
|
_globals['_SWITCHSERVICEHEARTBEATREQUEST_BGPPORTSTATESENTRY']._serialized_options = b'8\001'
|
|
47
|
+
_globals['_SWITCHSERVICEHEARTBEATREQUEST'].fields_by_name['id']._loaded_options = None
|
|
48
|
+
_globals['_SWITCHSERVICEHEARTBEATREQUEST'].fields_by_name['id']._serialized_options = b'\272H\nr\010h\001\300\263\256\261\002\001'
|
|
49
|
+
_globals['_SWITCHSERVICE'].methods_by_name['Get']._loaded_options = None
|
|
50
|
+
_globals['_SWITCHSERVICE'].methods_by_name['Get']._serialized_options = b'\340\363\030\002\352\363\030\001\001'
|
|
43
51
|
_globals['_SWITCHSERVICE'].methods_by_name['Register']._loaded_options = None
|
|
44
52
|
_globals['_SWITCHSERVICE'].methods_by_name['Register']._serialized_options = b'\340\363\030\002\352\363\030\001\001'
|
|
45
53
|
_globals['_SWITCHSERVICE'].methods_by_name['Heartbeat']._loaded_options = None
|
|
46
54
|
_globals['_SWITCHSERVICE'].methods_by_name['Heartbeat']._serialized_options = b'\340\363\030\002\352\363\030\001\001'
|
|
47
|
-
_globals['
|
|
48
|
-
_globals['
|
|
49
|
-
_globals['
|
|
50
|
-
_globals['
|
|
51
|
-
_globals['
|
|
52
|
-
_globals['
|
|
53
|
-
_globals['
|
|
54
|
-
_globals['
|
|
55
|
-
_globals['
|
|
56
|
-
_globals['
|
|
57
|
-
_globals['
|
|
58
|
-
_globals['
|
|
59
|
-
_globals['
|
|
60
|
-
_globals['
|
|
61
|
-
_globals['
|
|
62
|
-
_globals['
|
|
55
|
+
_globals['_SWITCHSERVICEGETREQUEST']._serialized_start=257
|
|
56
|
+
_globals['_SWITCHSERVICEGETREQUEST']._serialized_end=313
|
|
57
|
+
_globals['_SWITCHSERVICEGETRESPONSE']._serialized_start=315
|
|
58
|
+
_globals['_SWITCHSERVICEGETRESPONSE']._serialized_end=392
|
|
59
|
+
_globals['_SWITCHSERVICEREGISTERREQUEST']._serialized_start=394
|
|
60
|
+
_globals['_SWITCHSERVICEREGISTERREQUEST']._serialized_end=475
|
|
61
|
+
_globals['_SWITCHSERVICEREGISTERRESPONSE']._serialized_start=477
|
|
62
|
+
_globals['_SWITCHSERVICEREGISTERRESPONSE']._serialized_end=559
|
|
63
|
+
_globals['_SWITCHSERVICEHEARTBEATREQUEST']._serialized_start=562
|
|
64
|
+
_globals['_SWITCHSERVICEHEARTBEATREQUEST']._serialized_end=1133
|
|
65
|
+
_globals['_SWITCHSERVICEHEARTBEATREQUEST_PORTSTATESENTRY']._serialized_start=920
|
|
66
|
+
_globals['_SWITCHSERVICEHEARTBEATREQUEST_PORTSTATESENTRY']._serialized_end=1018
|
|
67
|
+
_globals['_SWITCHSERVICEHEARTBEATREQUEST_BGPPORTSTATESENTRY']._serialized_start=1020
|
|
68
|
+
_globals['_SWITCHSERVICEHEARTBEATREQUEST_BGPPORTSTATESENTRY']._serialized_end=1123
|
|
69
|
+
_globals['_SWITCHSERVICEHEARTBEATRESPONSE']._serialized_start=1136
|
|
70
|
+
_globals['_SWITCHSERVICEHEARTBEATRESPONSE']._serialized_end=1319
|
|
71
|
+
_globals['_SWITCHSYNC']._serialized_start=1322
|
|
72
|
+
_globals['_SWITCHSYNC']._serialized_end=1474
|
|
73
|
+
_globals['_SWITCHSERVICE']._serialized_start=1477
|
|
74
|
+
_globals['_SWITCHSERVICE']._serialized_end=1858
|
|
63
75
|
# @@protoc_insertion_point(module_scope)
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import datetime
|
|
2
2
|
|
|
3
|
+
from buf.validate import validate_pb2 as _validate_pb2
|
|
3
4
|
from google.protobuf import duration_pb2 as _duration_pb2
|
|
4
5
|
from google.protobuf import timestamp_pb2 as _timestamp_pb2
|
|
5
6
|
from metalstack.api.v2 import common_pb2 as _common_pb2
|
|
7
|
+
from metalstack.api.v2 import predefined_rules_pb2 as _predefined_rules_pb2
|
|
6
8
|
from metalstack.api.v2 import switch_pb2 as _switch_pb2
|
|
7
9
|
from google.protobuf.internal import containers as _containers
|
|
8
10
|
from google.protobuf import descriptor as _descriptor
|
|
@@ -12,6 +14,18 @@ from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
|
|
|
12
14
|
|
|
13
15
|
DESCRIPTOR: _descriptor.FileDescriptor
|
|
14
16
|
|
|
17
|
+
class SwitchServiceGetRequest(_message.Message):
|
|
18
|
+
__slots__ = ("id",)
|
|
19
|
+
ID_FIELD_NUMBER: _ClassVar[int]
|
|
20
|
+
id: str
|
|
21
|
+
def __init__(self, id: _Optional[str] = ...) -> None: ...
|
|
22
|
+
|
|
23
|
+
class SwitchServiceGetResponse(_message.Message):
|
|
24
|
+
__slots__ = ("switch",)
|
|
25
|
+
SWITCH_FIELD_NUMBER: _ClassVar[int]
|
|
26
|
+
switch: _switch_pb2.Switch
|
|
27
|
+
def __init__(self, switch: _Optional[_Union[_switch_pb2.Switch, _Mapping]] = ...) -> None: ...
|
|
28
|
+
|
|
15
29
|
class SwitchServiceRegisterRequest(_message.Message):
|
|
16
30
|
__slots__ = ("switch",)
|
|
17
31
|
SWITCH_FIELD_NUMBER: _ClassVar[int]
|
|
@@ -25,7 +39,7 @@ class SwitchServiceRegisterResponse(_message.Message):
|
|
|
25
39
|
def __init__(self, switch: _Optional[_Union[_switch_pb2.Switch, _Mapping]] = ...) -> None: ...
|
|
26
40
|
|
|
27
41
|
class SwitchServiceHeartbeatRequest(_message.Message):
|
|
28
|
-
__slots__ = ("duration", "error", "port_states", "bgp_port_states")
|
|
42
|
+
__slots__ = ("id", "duration", "error", "port_states", "bgp_port_states")
|
|
29
43
|
class PortStatesEntry(_message.Message):
|
|
30
44
|
__slots__ = ("key", "value")
|
|
31
45
|
KEY_FIELD_NUMBER: _ClassVar[int]
|
|
@@ -40,15 +54,17 @@ class SwitchServiceHeartbeatRequest(_message.Message):
|
|
|
40
54
|
key: str
|
|
41
55
|
value: _switch_pb2.SwitchBGPPortState
|
|
42
56
|
def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[_switch_pb2.SwitchBGPPortState, _Mapping]] = ...) -> None: ...
|
|
57
|
+
ID_FIELD_NUMBER: _ClassVar[int]
|
|
43
58
|
DURATION_FIELD_NUMBER: _ClassVar[int]
|
|
44
59
|
ERROR_FIELD_NUMBER: _ClassVar[int]
|
|
45
60
|
PORT_STATES_FIELD_NUMBER: _ClassVar[int]
|
|
46
61
|
BGP_PORT_STATES_FIELD_NUMBER: _ClassVar[int]
|
|
62
|
+
id: str
|
|
47
63
|
duration: _duration_pb2.Duration
|
|
48
64
|
error: str
|
|
49
65
|
port_states: _containers.ScalarMap[str, _switch_pb2.SwitchPortStatus]
|
|
50
66
|
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: ...
|
|
67
|
+
def __init__(self, id: _Optional[str] = ..., 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
68
|
|
|
53
69
|
class SwitchServiceHeartbeatResponse(_message.Message):
|
|
54
70
|
__slots__ = ("id", "last_sync", "last_sync_error")
|
|
File without changes
|
|
File without changes
|