metal-stack-api 0.0.7__py3-none-any.whl → 0.0.9__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.
@@ -0,0 +1,257 @@
1
+ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2
+ """Client and server classes corresponding to protobuf-defined services."""
3
+ import grpc
4
+
5
+ from metalstack.api.v2 import machine_pb2 as metalstack_dot_api_dot_v2_dot_machine__pb2
6
+
7
+
8
+ class MachineServiceStub(object):
9
+ """MachineService serves machine related functions
10
+ """
11
+
12
+ def __init__(self, channel):
13
+ """Constructor.
14
+
15
+ Args:
16
+ channel: A grpc.Channel.
17
+ """
18
+ self.Get = channel.unary_unary(
19
+ '/metalstack.api.v2.MachineService/Get',
20
+ request_serializer=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceGetRequest.SerializeToString,
21
+ response_deserializer=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceGetResponse.FromString,
22
+ _registered_method=True)
23
+ self.Create = channel.unary_unary(
24
+ '/metalstack.api.v2.MachineService/Create',
25
+ request_serializer=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceCreateRequest.SerializeToString,
26
+ response_deserializer=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceCreateResponse.FromString,
27
+ _registered_method=True)
28
+ self.Update = channel.unary_unary(
29
+ '/metalstack.api.v2.MachineService/Update',
30
+ request_serializer=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceUpdateRequest.SerializeToString,
31
+ response_deserializer=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceUpdateResponse.FromString,
32
+ _registered_method=True)
33
+ self.List = channel.unary_unary(
34
+ '/metalstack.api.v2.MachineService/List',
35
+ request_serializer=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceListRequest.SerializeToString,
36
+ response_deserializer=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceListResponse.FromString,
37
+ _registered_method=True)
38
+ self.Delete = channel.unary_unary(
39
+ '/metalstack.api.v2.MachineService/Delete',
40
+ request_serializer=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceDeleteRequest.SerializeToString,
41
+ response_deserializer=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceDeleteResponse.FromString,
42
+ _registered_method=True)
43
+
44
+
45
+ class MachineServiceServicer(object):
46
+ """MachineService serves machine related functions
47
+ """
48
+
49
+ def Get(self, request, context):
50
+ """Get a machine
51
+ """
52
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
53
+ context.set_details('Method not implemented!')
54
+ raise NotImplementedError('Method not implemented!')
55
+
56
+ def Create(self, request, context):
57
+ """Create a machine
58
+ """
59
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
60
+ context.set_details('Method not implemented!')
61
+ raise NotImplementedError('Method not implemented!')
62
+
63
+ def Update(self, request, context):
64
+ """Update a machine
65
+ """
66
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
67
+ context.set_details('Method not implemented!')
68
+ raise NotImplementedError('Method not implemented!')
69
+
70
+ def List(self, request, context):
71
+ """List all machine
72
+ """
73
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
74
+ context.set_details('Method not implemented!')
75
+ raise NotImplementedError('Method not implemented!')
76
+
77
+ def Delete(self, request, context):
78
+ """Delete a machine
79
+ """
80
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
81
+ context.set_details('Method not implemented!')
82
+ raise NotImplementedError('Method not implemented!')
83
+
84
+
85
+ def add_MachineServiceServicer_to_server(servicer, server):
86
+ rpc_method_handlers = {
87
+ 'Get': grpc.unary_unary_rpc_method_handler(
88
+ servicer.Get,
89
+ request_deserializer=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceGetRequest.FromString,
90
+ response_serializer=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceGetResponse.SerializeToString,
91
+ ),
92
+ 'Create': grpc.unary_unary_rpc_method_handler(
93
+ servicer.Create,
94
+ request_deserializer=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceCreateRequest.FromString,
95
+ response_serializer=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceCreateResponse.SerializeToString,
96
+ ),
97
+ 'Update': grpc.unary_unary_rpc_method_handler(
98
+ servicer.Update,
99
+ request_deserializer=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceUpdateRequest.FromString,
100
+ response_serializer=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceUpdateResponse.SerializeToString,
101
+ ),
102
+ 'List': grpc.unary_unary_rpc_method_handler(
103
+ servicer.List,
104
+ request_deserializer=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceListRequest.FromString,
105
+ response_serializer=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceListResponse.SerializeToString,
106
+ ),
107
+ 'Delete': grpc.unary_unary_rpc_method_handler(
108
+ servicer.Delete,
109
+ request_deserializer=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceDeleteRequest.FromString,
110
+ response_serializer=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceDeleteResponse.SerializeToString,
111
+ ),
112
+ }
113
+ generic_handler = grpc.method_handlers_generic_handler(
114
+ 'metalstack.api.v2.MachineService', rpc_method_handlers)
115
+ server.add_generic_rpc_handlers((generic_handler,))
116
+ server.add_registered_method_handlers('metalstack.api.v2.MachineService', rpc_method_handlers)
117
+
118
+
119
+ # This class is part of an EXPERIMENTAL API.
120
+ class MachineService(object):
121
+ """MachineService serves machine related functions
122
+ """
123
+
124
+ @staticmethod
125
+ def Get(request,
126
+ target,
127
+ options=(),
128
+ channel_credentials=None,
129
+ call_credentials=None,
130
+ insecure=False,
131
+ compression=None,
132
+ wait_for_ready=None,
133
+ timeout=None,
134
+ metadata=None):
135
+ return grpc.experimental.unary_unary(
136
+ request,
137
+ target,
138
+ '/metalstack.api.v2.MachineService/Get',
139
+ metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceGetRequest.SerializeToString,
140
+ metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceGetResponse.FromString,
141
+ options,
142
+ channel_credentials,
143
+ insecure,
144
+ call_credentials,
145
+ compression,
146
+ wait_for_ready,
147
+ timeout,
148
+ metadata,
149
+ _registered_method=True)
150
+
151
+ @staticmethod
152
+ def Create(request,
153
+ target,
154
+ options=(),
155
+ channel_credentials=None,
156
+ call_credentials=None,
157
+ insecure=False,
158
+ compression=None,
159
+ wait_for_ready=None,
160
+ timeout=None,
161
+ metadata=None):
162
+ return grpc.experimental.unary_unary(
163
+ request,
164
+ target,
165
+ '/metalstack.api.v2.MachineService/Create',
166
+ metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceCreateRequest.SerializeToString,
167
+ metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceCreateResponse.FromString,
168
+ options,
169
+ channel_credentials,
170
+ insecure,
171
+ call_credentials,
172
+ compression,
173
+ wait_for_ready,
174
+ timeout,
175
+ metadata,
176
+ _registered_method=True)
177
+
178
+ @staticmethod
179
+ def Update(request,
180
+ target,
181
+ options=(),
182
+ channel_credentials=None,
183
+ call_credentials=None,
184
+ insecure=False,
185
+ compression=None,
186
+ wait_for_ready=None,
187
+ timeout=None,
188
+ metadata=None):
189
+ return grpc.experimental.unary_unary(
190
+ request,
191
+ target,
192
+ '/metalstack.api.v2.MachineService/Update',
193
+ metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceUpdateRequest.SerializeToString,
194
+ metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceUpdateResponse.FromString,
195
+ options,
196
+ channel_credentials,
197
+ insecure,
198
+ call_credentials,
199
+ compression,
200
+ wait_for_ready,
201
+ timeout,
202
+ metadata,
203
+ _registered_method=True)
204
+
205
+ @staticmethod
206
+ def List(request,
207
+ target,
208
+ options=(),
209
+ channel_credentials=None,
210
+ call_credentials=None,
211
+ insecure=False,
212
+ compression=None,
213
+ wait_for_ready=None,
214
+ timeout=None,
215
+ metadata=None):
216
+ return grpc.experimental.unary_unary(
217
+ request,
218
+ target,
219
+ '/metalstack.api.v2.MachineService/List',
220
+ metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceListRequest.SerializeToString,
221
+ metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceListResponse.FromString,
222
+ options,
223
+ channel_credentials,
224
+ insecure,
225
+ call_credentials,
226
+ compression,
227
+ wait_for_ready,
228
+ timeout,
229
+ metadata,
230
+ _registered_method=True)
231
+
232
+ @staticmethod
233
+ def Delete(request,
234
+ target,
235
+ options=(),
236
+ channel_credentials=None,
237
+ call_credentials=None,
238
+ insecure=False,
239
+ compression=None,
240
+ wait_for_ready=None,
241
+ timeout=None,
242
+ metadata=None):
243
+ return grpc.experimental.unary_unary(
244
+ request,
245
+ target,
246
+ '/metalstack.api.v2.MachineService/Delete',
247
+ metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceDeleteRequest.SerializeToString,
248
+ metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceDeleteResponse.FromString,
249
+ options,
250
+ channel_credentials,
251
+ insecure,
252
+ call_credentials,
253
+ compression,
254
+ wait_for_ready,
255
+ timeout,
256
+ metadata,
257
+ _registered_method=True)
@@ -0,0 +1,124 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: metalstack/api/v2/switch.proto
5
+ # Protobuf Python Version: 6.31.1
6
+ """Generated protocol buffer code."""
7
+ from google.protobuf import descriptor as _descriptor
8
+ from google.protobuf import descriptor_pool as _descriptor_pool
9
+ from google.protobuf import runtime_version as _runtime_version
10
+ from google.protobuf import symbol_database as _symbol_database
11
+ from google.protobuf.internal import builder as _builder
12
+ _runtime_version.ValidateProtobufRuntimeVersion(
13
+ _runtime_version.Domain.PUBLIC,
14
+ 6,
15
+ 31,
16
+ 1,
17
+ '',
18
+ 'metalstack/api/v2/switch.proto'
19
+ )
20
+ # @@protoc_insertion_point(imports)
21
+
22
+ _sym_db = _symbol_database.Default()
23
+
24
+
25
+ from buf.validate import validate_pb2 as buf_dot_validate_dot_validate__pb2
26
+ from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2
27
+ from metalstack.api.v2 import common_pb2 as metalstack_dot_api_dot_v2_dot_common__pb2
28
+
29
+
30
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1emetalstack/api/v2/switch.proto\x12\x11metalstack.api.v2\x1a\x1b\x62uf/validate/validate.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1emetalstack/api/v2/common.proto\"\xde\x03\n\x06Switch\x12\x1c\n\x02id\x18\x01 \x01(\tB\x0c\xbaH\tr\x07\x10\x02\x18\x80\x01h\x01R\x02id\x12,\n\x0b\x64\x65scription\x18\x02 \x01(\tB\n\xbaH\x07r\x05\x10\x02\x18\x80\x01R\x0b\x64\x65scription\x12(\n\x07rack_id\x18\x03 \x01(\tB\n\xbaH\x07r\x05\x10\x02\x18\x80\x01H\x00R\x06rackId\x88\x01\x01\x12(\n\tpartition\x18\x04 \x01(\tB\n\xbaH\x07r\x05\x10\x02\x18\x80\x01R\tpartition\x12Q\n\x0creplace_mode\x18\x06 \x01(\x0e\x32$.metalstack.api.v2.SwitchReplaceModeB\x08\xbaH\x05\x82\x01\x02\x10\x01R\x0breplaceMode\x12,\n\rmanagement_ip\x18\x07 \x01(\tB\x07\xbaH\x04r\x02p\x01R\x0cmanagementIp\x12\x33\n\x0fmanagement_user\x18\x08 \x01(\tB\n\xbaH\x07r\x05\x10\x02\x18\x80\x01R\x0emanagementUser\x12\x33\n\x0f\x63onsole_command\x18\t \x01(\tB\n\xbaH\x07r\x05\x10\x02\x18\x80\x01R\x0e\x63onsoleCommand\x12=\n\x0bswitch_nics\x18\n \x03(\x0b\x32\x1c.metalstack.api.v2.SwitchNicR\nswitchNicsB\n\n\x08_rack_id\"\xaf\x01\n\x08SwitchOS\x12\x43\n\x06vendor\x18\x01 \x01(\x0e\x32!.metalstack.api.v2.SwitchOSVendorB\x08\xbaH\x05\x82\x01\x02\x10\x01R\x06vendor\x12$\n\x07version\x18\x02 \x01(\tB\n\xbaH\x07r\x05\x10\x02\x18\x80\x01R\x07version\x12\x38\n\x12metal_core_version\x18\x03 \x01(\tB\n\xbaH\x07r\x05\x10\x02\x18\x80\x01R\x10metalCoreVersion\"\xc2\x03\n\tSwitchNic\x12\x1e\n\x04name\x18\x01 \x01(\tB\n\xbaH\x07r\x05\x10\x02\x18\x80\x01R\x04name\x12*\n\nidentifier\x18\x02 \x01(\tB\n\xbaH\x07r\x05\x10\x02\x18\x80\x01R\nidentifier\x12\x41\n\x03mac\x18\x03 \x01(\tB/\xbaH,r*2(^([0-9A-Fa-f]{2}[:]){5}([0-9A-Fa-f]{2})$R\x03mac\x12!\n\x03vrf\x18\x04 \x01(\tB\n\xbaH\x07r\x05\x10\x02\x18\x80\x01H\x00R\x03vrf\x88\x01\x01\x12\x45\n\x06\x61\x63tual\x18\x05 \x01(\x0e\x32#.metalstack.api.v2.SwitchPortStatusB\x08\xbaH\x05\x82\x01\x02\x10\x01R\x06\x61\x63tual\x12@\n\nbgp_filter\x18\x06 \x01(\x0b\x32\x1c.metalstack.api.v2.BGPFilterH\x01R\tbgpFilter\x88\x01\x01\x12P\n\x0e\x62gp_port_state\x18\x07 \x01(\x0b\x32%.metalstack.api.v2.SwitchBGPPortStateH\x02R\x0c\x62gpPortState\x88\x01\x01\x42\x06\n\x04_vrfB\r\n\x0b_bgp_filterB\x11\n\x0f_bgp_port_state\"\x92\x01\n\tBGPFilter\x12\x14\n\x05\x63idrs\x18\x01 \x03(\tR\x05\x63idrs\x12#\n\x04vnis\x18\x02 \x03(\tB\x0f\xbaH\x0c\x92\x01\t\"\x07r\x05\x10\x02\x18\x80\x01R\x04vnis:J\xbaHG\x1a\x45\n\x05\x63idrs\x12\x19given cidrs must be valid\x1a!this.cidrs.all(m, m.isIpPrefix())\"\x8e\x03\n\x12SwitchBGPPortState\x12&\n\x08neighbor\x18\x01 \x01(\tB\n\xbaH\x07r\x05\x10\x02\x18\x80\x01R\x08neighbor\x12)\n\npeer_group\x18\x02 \x01(\tB\n\xbaH\x07r\x05\x10\x02\x18\x80\x01R\tpeerGroup\x12%\n\x08vrf_name\x18\x03 \x01(\tB\n\xbaH\x07r\x05\x10\x02\x18\x80\x01R\x07vrfName\x12\x42\n\tbgp_state\x18\x04 \x01(\x0e\x32\x1b.metalstack.api.v2.BGPStateB\x08\xbaH\x05\x82\x01\x02\x10\x01R\x08\x62gpState\x12R\n\x18\x62gp_timer_up_established\x18\x05 \x01(\x0b\x32\x19.google.protobuf.DurationR\x15\x62gpTimerUpEstablished\x12.\n\x13sent_prefix_counter\x18\x06 \x01(\x04R\x11sentPrefixCounter\x12\x36\n\x17\x61\x63\x63\x65pted_prefix_counter\x18\x07 \x01(\x04R\x15\x61\x63\x63\x65ptedPrefixCounter*\x8b\x02\n\x08\x42GPState\x12\x19\n\x15\x42GP_STATE_UNSPECIFIED\x10\x00\x12\x1c\n\x0e\x42GP_STATE_IDLE\x10\x01\x1a\x08\x82\xb2\x19\x04idle\x12\"\n\x11\x42GP_STATE_CONNECT\x10\x02\x1a\x0b\x82\xb2\x19\x07\x63onnect\x12 \n\x10\x42GP_STATE_ACTIVE\x10\x03\x1a\n\x82\xb2\x19\x06\x61\x63tive\x12&\n\x13\x42GP_STATE_OPEN_SENT\x10\x04\x1a\r\x82\xb2\x19\topen-sent\x12,\n\x16\x42GP_STATE_OPEN_CONFIRM\x10\x05\x1a\x10\x82\xb2\x19\x0copen-confirm\x12*\n\x15\x42GP_STATE_ESTABLISHED\x10\x06\x1a\x0f\x82\xb2\x19\x0b\x65stablished*\x9c\x01\n\x11SwitchReplaceMode\x12#\n\x1fSWITCH_REPLACE_MODE_UNSPECIFIED\x10\x00\x12,\n\x1bSWITCH_REPLACE_MODE_REPLACE\x10\x01\x1a\x0b\x82\xb2\x19\x07replace\x12\x34\n\x1fSWITCH_REPLACE_MODE_OPERATIONAL\x10\x02\x1a\x0f\x82\xb2\x19\x0boperational*\x84\x01\n\x0eSwitchOSVendor\x12 \n\x1cSWITCH_OS_VENDOR_UNSPECIFIED\x10\x00\x12)\n\x18SWITCH_OS_VENDOR_CUMULUS\x10\x01\x1a\x0b\x82\xb2\x19\x07\x63umulus\x12%\n\x16SWITCH_OS_VENDOR_SONIC\x10\x02\x1a\t\x82\xb2\x19\x05sonic*\x80\x01\n\x10SwitchPortStatus\x12\"\n\x1eSWITCH_PORT_STATUS_UNSPECIFIED\x10\x00\x12!\n\x15SWITCH_PORT_STATUS_UP\x10\x01\x1a\x06\x82\xb2\x19\x02up\x12%\n\x17SWITCH_PORT_STATUS_DOWN\x10\x02\x1a\x08\x82\xb2\x19\x04\x64ownB\xc1\x01\n\x15\x63om.metalstack.api.v2B\x0bSwitchProtoP\x01Z5github.com/metal-stack/api/go/metalstack/api/v2;apiv2\xa2\x02\x03MAX\xaa\x02\x11Metalstack.Api.V2\xca\x02\x11Metalstack\\Api\\V2\xe2\x02\x1dMetalstack\\Api\\V2\\GPBMetadata\xea\x02\x13Metalstack::Api::V2b\x06proto3')
31
+
32
+ _globals = globals()
33
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
34
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'metalstack.api.v2.switch_pb2', _globals)
35
+ if not _descriptor._USE_C_DESCRIPTORS:
36
+ _globals['DESCRIPTOR']._loaded_options = None
37
+ _globals['DESCRIPTOR']._serialized_options = b'\n\025com.metalstack.api.v2B\013SwitchProtoP\001Z5github.com/metal-stack/api/go/metalstack/api/v2;apiv2\242\002\003MAX\252\002\021Metalstack.Api.V2\312\002\021Metalstack\\Api\\V2\342\002\035Metalstack\\Api\\V2\\GPBMetadata\352\002\023Metalstack::Api::V2'
38
+ _globals['_BGPSTATE'].values_by_name["BGP_STATE_IDLE"]._loaded_options = None
39
+ _globals['_BGPSTATE'].values_by_name["BGP_STATE_IDLE"]._serialized_options = b'\202\262\031\004idle'
40
+ _globals['_BGPSTATE'].values_by_name["BGP_STATE_CONNECT"]._loaded_options = None
41
+ _globals['_BGPSTATE'].values_by_name["BGP_STATE_CONNECT"]._serialized_options = b'\202\262\031\007connect'
42
+ _globals['_BGPSTATE'].values_by_name["BGP_STATE_ACTIVE"]._loaded_options = None
43
+ _globals['_BGPSTATE'].values_by_name["BGP_STATE_ACTIVE"]._serialized_options = b'\202\262\031\006active'
44
+ _globals['_BGPSTATE'].values_by_name["BGP_STATE_OPEN_SENT"]._loaded_options = None
45
+ _globals['_BGPSTATE'].values_by_name["BGP_STATE_OPEN_SENT"]._serialized_options = b'\202\262\031\topen-sent'
46
+ _globals['_BGPSTATE'].values_by_name["BGP_STATE_OPEN_CONFIRM"]._loaded_options = None
47
+ _globals['_BGPSTATE'].values_by_name["BGP_STATE_OPEN_CONFIRM"]._serialized_options = b'\202\262\031\014open-confirm'
48
+ _globals['_BGPSTATE'].values_by_name["BGP_STATE_ESTABLISHED"]._loaded_options = None
49
+ _globals['_BGPSTATE'].values_by_name["BGP_STATE_ESTABLISHED"]._serialized_options = b'\202\262\031\013established'
50
+ _globals['_SWITCHREPLACEMODE'].values_by_name["SWITCH_REPLACE_MODE_REPLACE"]._loaded_options = None
51
+ _globals['_SWITCHREPLACEMODE'].values_by_name["SWITCH_REPLACE_MODE_REPLACE"]._serialized_options = b'\202\262\031\007replace'
52
+ _globals['_SWITCHREPLACEMODE'].values_by_name["SWITCH_REPLACE_MODE_OPERATIONAL"]._loaded_options = None
53
+ _globals['_SWITCHREPLACEMODE'].values_by_name["SWITCH_REPLACE_MODE_OPERATIONAL"]._serialized_options = b'\202\262\031\013operational'
54
+ _globals['_SWITCHOSVENDOR'].values_by_name["SWITCH_OS_VENDOR_CUMULUS"]._loaded_options = None
55
+ _globals['_SWITCHOSVENDOR'].values_by_name["SWITCH_OS_VENDOR_CUMULUS"]._serialized_options = b'\202\262\031\007cumulus'
56
+ _globals['_SWITCHOSVENDOR'].values_by_name["SWITCH_OS_VENDOR_SONIC"]._loaded_options = None
57
+ _globals['_SWITCHOSVENDOR'].values_by_name["SWITCH_OS_VENDOR_SONIC"]._serialized_options = b'\202\262\031\005sonic'
58
+ _globals['_SWITCHPORTSTATUS'].values_by_name["SWITCH_PORT_STATUS_UP"]._loaded_options = None
59
+ _globals['_SWITCHPORTSTATUS'].values_by_name["SWITCH_PORT_STATUS_UP"]._serialized_options = b'\202\262\031\002up'
60
+ _globals['_SWITCHPORTSTATUS'].values_by_name["SWITCH_PORT_STATUS_DOWN"]._loaded_options = None
61
+ _globals['_SWITCHPORTSTATUS'].values_by_name["SWITCH_PORT_STATUS_DOWN"]._serialized_options = b'\202\262\031\004down'
62
+ _globals['_SWITCH'].fields_by_name['id']._loaded_options = None
63
+ _globals['_SWITCH'].fields_by_name['id']._serialized_options = b'\272H\tr\007\020\002\030\200\001h\001'
64
+ _globals['_SWITCH'].fields_by_name['description']._loaded_options = None
65
+ _globals['_SWITCH'].fields_by_name['description']._serialized_options = b'\272H\007r\005\020\002\030\200\001'
66
+ _globals['_SWITCH'].fields_by_name['rack_id']._loaded_options = None
67
+ _globals['_SWITCH'].fields_by_name['rack_id']._serialized_options = b'\272H\007r\005\020\002\030\200\001'
68
+ _globals['_SWITCH'].fields_by_name['partition']._loaded_options = None
69
+ _globals['_SWITCH'].fields_by_name['partition']._serialized_options = b'\272H\007r\005\020\002\030\200\001'
70
+ _globals['_SWITCH'].fields_by_name['replace_mode']._loaded_options = None
71
+ _globals['_SWITCH'].fields_by_name['replace_mode']._serialized_options = b'\272H\005\202\001\002\020\001'
72
+ _globals['_SWITCH'].fields_by_name['management_ip']._loaded_options = None
73
+ _globals['_SWITCH'].fields_by_name['management_ip']._serialized_options = b'\272H\004r\002p\001'
74
+ _globals['_SWITCH'].fields_by_name['management_user']._loaded_options = None
75
+ _globals['_SWITCH'].fields_by_name['management_user']._serialized_options = b'\272H\007r\005\020\002\030\200\001'
76
+ _globals['_SWITCH'].fields_by_name['console_command']._loaded_options = None
77
+ _globals['_SWITCH'].fields_by_name['console_command']._serialized_options = b'\272H\007r\005\020\002\030\200\001'
78
+ _globals['_SWITCHOS'].fields_by_name['vendor']._loaded_options = None
79
+ _globals['_SWITCHOS'].fields_by_name['vendor']._serialized_options = b'\272H\005\202\001\002\020\001'
80
+ _globals['_SWITCHOS'].fields_by_name['version']._loaded_options = None
81
+ _globals['_SWITCHOS'].fields_by_name['version']._serialized_options = b'\272H\007r\005\020\002\030\200\001'
82
+ _globals['_SWITCHOS'].fields_by_name['metal_core_version']._loaded_options = None
83
+ _globals['_SWITCHOS'].fields_by_name['metal_core_version']._serialized_options = b'\272H\007r\005\020\002\030\200\001'
84
+ _globals['_SWITCHNIC'].fields_by_name['name']._loaded_options = None
85
+ _globals['_SWITCHNIC'].fields_by_name['name']._serialized_options = b'\272H\007r\005\020\002\030\200\001'
86
+ _globals['_SWITCHNIC'].fields_by_name['identifier']._loaded_options = None
87
+ _globals['_SWITCHNIC'].fields_by_name['identifier']._serialized_options = b'\272H\007r\005\020\002\030\200\001'
88
+ _globals['_SWITCHNIC'].fields_by_name['mac']._loaded_options = None
89
+ _globals['_SWITCHNIC'].fields_by_name['mac']._serialized_options = b'\272H,r*2(^([0-9A-Fa-f]{2}[:]){5}([0-9A-Fa-f]{2})$'
90
+ _globals['_SWITCHNIC'].fields_by_name['vrf']._loaded_options = None
91
+ _globals['_SWITCHNIC'].fields_by_name['vrf']._serialized_options = b'\272H\007r\005\020\002\030\200\001'
92
+ _globals['_SWITCHNIC'].fields_by_name['actual']._loaded_options = None
93
+ _globals['_SWITCHNIC'].fields_by_name['actual']._serialized_options = b'\272H\005\202\001\002\020\001'
94
+ _globals['_BGPFILTER'].fields_by_name['vnis']._loaded_options = None
95
+ _globals['_BGPFILTER'].fields_by_name['vnis']._serialized_options = b'\272H\014\222\001\t\"\007r\005\020\002\030\200\001'
96
+ _globals['_BGPFILTER']._loaded_options = None
97
+ _globals['_BGPFILTER']._serialized_options = b'\272HG\032E\n\005cidrs\022\031given cidrs must be valid\032!this.cidrs.all(m, m.isIpPrefix())'
98
+ _globals['_SWITCHBGPPORTSTATE'].fields_by_name['neighbor']._loaded_options = None
99
+ _globals['_SWITCHBGPPORTSTATE'].fields_by_name['neighbor']._serialized_options = b'\272H\007r\005\020\002\030\200\001'
100
+ _globals['_SWITCHBGPPORTSTATE'].fields_by_name['peer_group']._loaded_options = None
101
+ _globals['_SWITCHBGPPORTSTATE'].fields_by_name['peer_group']._serialized_options = b'\272H\007r\005\020\002\030\200\001'
102
+ _globals['_SWITCHBGPPORTSTATE'].fields_by_name['vrf_name']._loaded_options = None
103
+ _globals['_SWITCHBGPPORTSTATE'].fields_by_name['vrf_name']._serialized_options = b'\272H\007r\005\020\002\030\200\001'
104
+ _globals['_SWITCHBGPPORTSTATE'].fields_by_name['bgp_state']._loaded_options = None
105
+ _globals['_SWITCHBGPPORTSTATE'].fields_by_name['bgp_state']._serialized_options = b'\272H\005\202\001\002\020\001'
106
+ _globals['_BGPSTATE']._serialized_start=1809
107
+ _globals['_BGPSTATE']._serialized_end=2076
108
+ _globals['_SWITCHREPLACEMODE']._serialized_start=2079
109
+ _globals['_SWITCHREPLACEMODE']._serialized_end=2235
110
+ _globals['_SWITCHOSVENDOR']._serialized_start=2238
111
+ _globals['_SWITCHOSVENDOR']._serialized_end=2370
112
+ _globals['_SWITCHPORTSTATUS']._serialized_start=2373
113
+ _globals['_SWITCHPORTSTATUS']._serialized_end=2501
114
+ _globals['_SWITCH']._serialized_start=147
115
+ _globals['_SWITCH']._serialized_end=625
116
+ _globals['_SWITCHOS']._serialized_start=628
117
+ _globals['_SWITCHOS']._serialized_end=803
118
+ _globals['_SWITCHNIC']._serialized_start=806
119
+ _globals['_SWITCHNIC']._serialized_end=1256
120
+ _globals['_BGPFILTER']._serialized_start=1259
121
+ _globals['_BGPFILTER']._serialized_end=1405
122
+ _globals['_SWITCHBGPPORTSTATE']._serialized_start=1408
123
+ _globals['_SWITCHBGPPORTSTATE']._serialized_end=1806
124
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,133 @@
1
+ import datetime
2
+
3
+ from buf.validate import validate_pb2 as _validate_pb2
4
+ from google.protobuf import duration_pb2 as _duration_pb2
5
+ from metalstack.api.v2 import common_pb2 as _common_pb2
6
+ from google.protobuf.internal import containers as _containers
7
+ from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
8
+ from google.protobuf import descriptor as _descriptor
9
+ from google.protobuf import message as _message
10
+ from collections.abc import Iterable as _Iterable, Mapping as _Mapping
11
+ from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
12
+
13
+ DESCRIPTOR: _descriptor.FileDescriptor
14
+
15
+ class BGPState(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
16
+ __slots__ = ()
17
+ BGP_STATE_UNSPECIFIED: _ClassVar[BGPState]
18
+ BGP_STATE_IDLE: _ClassVar[BGPState]
19
+ BGP_STATE_CONNECT: _ClassVar[BGPState]
20
+ BGP_STATE_ACTIVE: _ClassVar[BGPState]
21
+ BGP_STATE_OPEN_SENT: _ClassVar[BGPState]
22
+ BGP_STATE_OPEN_CONFIRM: _ClassVar[BGPState]
23
+ BGP_STATE_ESTABLISHED: _ClassVar[BGPState]
24
+
25
+ class SwitchReplaceMode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
26
+ __slots__ = ()
27
+ SWITCH_REPLACE_MODE_UNSPECIFIED: _ClassVar[SwitchReplaceMode]
28
+ SWITCH_REPLACE_MODE_REPLACE: _ClassVar[SwitchReplaceMode]
29
+ SWITCH_REPLACE_MODE_OPERATIONAL: _ClassVar[SwitchReplaceMode]
30
+
31
+ class SwitchOSVendor(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
32
+ __slots__ = ()
33
+ SWITCH_OS_VENDOR_UNSPECIFIED: _ClassVar[SwitchOSVendor]
34
+ SWITCH_OS_VENDOR_CUMULUS: _ClassVar[SwitchOSVendor]
35
+ SWITCH_OS_VENDOR_SONIC: _ClassVar[SwitchOSVendor]
36
+
37
+ class SwitchPortStatus(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
38
+ __slots__ = ()
39
+ SWITCH_PORT_STATUS_UNSPECIFIED: _ClassVar[SwitchPortStatus]
40
+ SWITCH_PORT_STATUS_UP: _ClassVar[SwitchPortStatus]
41
+ SWITCH_PORT_STATUS_DOWN: _ClassVar[SwitchPortStatus]
42
+ BGP_STATE_UNSPECIFIED: BGPState
43
+ BGP_STATE_IDLE: BGPState
44
+ BGP_STATE_CONNECT: BGPState
45
+ BGP_STATE_ACTIVE: BGPState
46
+ BGP_STATE_OPEN_SENT: BGPState
47
+ BGP_STATE_OPEN_CONFIRM: BGPState
48
+ BGP_STATE_ESTABLISHED: BGPState
49
+ SWITCH_REPLACE_MODE_UNSPECIFIED: SwitchReplaceMode
50
+ SWITCH_REPLACE_MODE_REPLACE: SwitchReplaceMode
51
+ SWITCH_REPLACE_MODE_OPERATIONAL: SwitchReplaceMode
52
+ SWITCH_OS_VENDOR_UNSPECIFIED: SwitchOSVendor
53
+ SWITCH_OS_VENDOR_CUMULUS: SwitchOSVendor
54
+ SWITCH_OS_VENDOR_SONIC: SwitchOSVendor
55
+ SWITCH_PORT_STATUS_UNSPECIFIED: SwitchPortStatus
56
+ SWITCH_PORT_STATUS_UP: SwitchPortStatus
57
+ SWITCH_PORT_STATUS_DOWN: SwitchPortStatus
58
+
59
+ class Switch(_message.Message):
60
+ __slots__ = ("id", "description", "rack_id", "partition", "replace_mode", "management_ip", "management_user", "console_command", "switch_nics")
61
+ ID_FIELD_NUMBER: _ClassVar[int]
62
+ DESCRIPTION_FIELD_NUMBER: _ClassVar[int]
63
+ RACK_ID_FIELD_NUMBER: _ClassVar[int]
64
+ PARTITION_FIELD_NUMBER: _ClassVar[int]
65
+ REPLACE_MODE_FIELD_NUMBER: _ClassVar[int]
66
+ MANAGEMENT_IP_FIELD_NUMBER: _ClassVar[int]
67
+ MANAGEMENT_USER_FIELD_NUMBER: _ClassVar[int]
68
+ CONSOLE_COMMAND_FIELD_NUMBER: _ClassVar[int]
69
+ SWITCH_NICS_FIELD_NUMBER: _ClassVar[int]
70
+ id: str
71
+ description: str
72
+ rack_id: str
73
+ partition: str
74
+ replace_mode: SwitchReplaceMode
75
+ management_ip: str
76
+ management_user: str
77
+ console_command: str
78
+ switch_nics: _containers.RepeatedCompositeFieldContainer[SwitchNic]
79
+ def __init__(self, id: _Optional[str] = ..., description: _Optional[str] = ..., rack_id: _Optional[str] = ..., partition: _Optional[str] = ..., replace_mode: _Optional[_Union[SwitchReplaceMode, str]] = ..., management_ip: _Optional[str] = ..., management_user: _Optional[str] = ..., console_command: _Optional[str] = ..., switch_nics: _Optional[_Iterable[_Union[SwitchNic, _Mapping]]] = ...) -> None: ...
80
+
81
+ class SwitchOS(_message.Message):
82
+ __slots__ = ("vendor", "version", "metal_core_version")
83
+ VENDOR_FIELD_NUMBER: _ClassVar[int]
84
+ VERSION_FIELD_NUMBER: _ClassVar[int]
85
+ METAL_CORE_VERSION_FIELD_NUMBER: _ClassVar[int]
86
+ vendor: SwitchOSVendor
87
+ version: str
88
+ metal_core_version: str
89
+ def __init__(self, vendor: _Optional[_Union[SwitchOSVendor, str]] = ..., version: _Optional[str] = ..., metal_core_version: _Optional[str] = ...) -> None: ...
90
+
91
+ class SwitchNic(_message.Message):
92
+ __slots__ = ("name", "identifier", "mac", "vrf", "actual", "bgp_filter", "bgp_port_state")
93
+ NAME_FIELD_NUMBER: _ClassVar[int]
94
+ IDENTIFIER_FIELD_NUMBER: _ClassVar[int]
95
+ MAC_FIELD_NUMBER: _ClassVar[int]
96
+ VRF_FIELD_NUMBER: _ClassVar[int]
97
+ ACTUAL_FIELD_NUMBER: _ClassVar[int]
98
+ BGP_FILTER_FIELD_NUMBER: _ClassVar[int]
99
+ BGP_PORT_STATE_FIELD_NUMBER: _ClassVar[int]
100
+ name: str
101
+ identifier: str
102
+ mac: str
103
+ vrf: str
104
+ actual: SwitchPortStatus
105
+ bgp_filter: BGPFilter
106
+ bgp_port_state: SwitchBGPPortState
107
+ def __init__(self, name: _Optional[str] = ..., identifier: _Optional[str] = ..., mac: _Optional[str] = ..., vrf: _Optional[str] = ..., actual: _Optional[_Union[SwitchPortStatus, str]] = ..., bgp_filter: _Optional[_Union[BGPFilter, _Mapping]] = ..., bgp_port_state: _Optional[_Union[SwitchBGPPortState, _Mapping]] = ...) -> None: ...
108
+
109
+ class BGPFilter(_message.Message):
110
+ __slots__ = ("cidrs", "vnis")
111
+ CIDRS_FIELD_NUMBER: _ClassVar[int]
112
+ VNIS_FIELD_NUMBER: _ClassVar[int]
113
+ cidrs: _containers.RepeatedScalarFieldContainer[str]
114
+ vnis: _containers.RepeatedScalarFieldContainer[str]
115
+ def __init__(self, cidrs: _Optional[_Iterable[str]] = ..., vnis: _Optional[_Iterable[str]] = ...) -> None: ...
116
+
117
+ class SwitchBGPPortState(_message.Message):
118
+ __slots__ = ("neighbor", "peer_group", "vrf_name", "bgp_state", "bgp_timer_up_established", "sent_prefix_counter", "accepted_prefix_counter")
119
+ NEIGHBOR_FIELD_NUMBER: _ClassVar[int]
120
+ PEER_GROUP_FIELD_NUMBER: _ClassVar[int]
121
+ VRF_NAME_FIELD_NUMBER: _ClassVar[int]
122
+ BGP_STATE_FIELD_NUMBER: _ClassVar[int]
123
+ BGP_TIMER_UP_ESTABLISHED_FIELD_NUMBER: _ClassVar[int]
124
+ SENT_PREFIX_COUNTER_FIELD_NUMBER: _ClassVar[int]
125
+ ACCEPTED_PREFIX_COUNTER_FIELD_NUMBER: _ClassVar[int]
126
+ neighbor: str
127
+ peer_group: str
128
+ vrf_name: str
129
+ bgp_state: BGPState
130
+ bgp_timer_up_established: _duration_pb2.Duration
131
+ sent_prefix_counter: int
132
+ accepted_prefix_counter: int
133
+ def __init__(self, neighbor: _Optional[str] = ..., peer_group: _Optional[str] = ..., vrf_name: _Optional[str] = ..., bgp_state: _Optional[_Union[BGPState, str]] = ..., bgp_timer_up_established: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., sent_prefix_counter: _Optional[int] = ..., accepted_prefix_counter: _Optional[int] = ...) -> None: ...
@@ -0,0 +1,4 @@
1
+ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2
+ """Client and server classes corresponding to protobuf-defined services."""
3
+ import grpc
4
+
@@ -15,6 +15,7 @@ import metalstack.api.v2.filesystem_connecpy as api_filesystem_connecpy
15
15
  import metalstack.api.v2.health_connecpy as api_health_connecpy
16
16
  import metalstack.api.v2.image_connecpy as api_image_connecpy
17
17
  import metalstack.api.v2.ip_connecpy as api_ip_connecpy
18
+ import metalstack.api.v2.machine_connecpy as api_machine_connecpy
18
19
  import metalstack.api.v2.method_connecpy as api_method_connecpy
19
20
  import metalstack.api.v2.network_connecpy as api_network_connecpy
20
21
  import metalstack.api.v2.partition_connecpy as api_partition_connecpy
@@ -26,6 +27,7 @@ import metalstack.api.v2.user_connecpy as api_user_connecpy
26
27
  import metalstack.api.v2.version_connecpy as api_version_connecpy
27
28
 
28
29
  import metalstack.infra.v2.bmc_connecpy as infra_bmc_connecpy
30
+ import metalstack.infra.v2.switch_connecpy as infra_switch_connecpy
29
31
 
30
32
 
31
33
 
@@ -100,6 +102,9 @@ class Client:
100
102
  def ip(self):
101
103
  return api_ip_connecpy.IPServiceClient(address=self._baseurl, session=self._session)
102
104
 
105
+ def machine(self):
106
+ return api_machine_connecpy.MachineServiceClient(address=self._baseurl, session=self._session)
107
+
103
108
  def method(self):
104
109
  return api_method_connecpy.MethodServiceClient(address=self._baseurl, session=self._session)
105
110
 
@@ -137,4 +142,7 @@ class Client:
137
142
  def bmc(self):
138
143
  return infra_bmc_connecpy.BMCServiceClient(address=self._baseurl, session=self._session)
139
144
 
145
+ def switch(self):
146
+ return infra_switch_connecpy.SwitchServiceClient(address=self._baseurl, session=self._session)
147
+
140
148
 
@@ -0,0 +1,102 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by https://github.com/i2y/connecpy/protoc-gen-connecpy. DO NOT EDIT!
3
+ # source: metalstack/infra/v2/switch.proto
4
+
5
+ from typing import Optional, Protocol, Union
6
+
7
+ import httpx
8
+
9
+ from connecpy.async_client import AsyncConnecpyClient
10
+ from connecpy.base import Endpoint
11
+ from connecpy.server import ConnecpyServer
12
+ from connecpy.client import ConnecpyClient
13
+ from connecpy.context import ClientContext, ServiceContext
14
+ import metalstack.infra.v2.switch_pb2 as metalstack_dot_infra_dot_v2_dot_switch__pb2
15
+
16
+
17
+ class SwitchService(Protocol):
18
+ async def Register(self, req: metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterRequest, ctx: ServiceContext) -> metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterResponse: ...
19
+
20
+
21
+ class SwitchServiceServer(ConnecpyServer):
22
+ def __init__(self, *, service: SwitchService, server_path_prefix=""):
23
+ super().__init__()
24
+ self._prefix = f"{server_path_prefix}/metalstack.infra.v2.SwitchService"
25
+ self._endpoints = {
26
+ "Register": Endpoint[metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterRequest, metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterResponse](
27
+ service_name="SwitchService",
28
+ name="Register",
29
+ function=getattr(service, "Register"),
30
+ input=metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterRequest,
31
+ output=metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterResponse,
32
+ allowed_methods=("POST",),
33
+ ),
34
+ }
35
+
36
+ def serviceName(self):
37
+ return "metalstack.infra.v2.SwitchService"
38
+
39
+
40
+ class SwitchServiceSync(Protocol):
41
+ def Register(self, req: metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterRequest, ctx: ServiceContext) -> metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterResponse: ...
42
+
43
+
44
+ class SwitchServiceServerSync(ConnecpyServer):
45
+ def __init__(self, *, service: SwitchServiceSync, server_path_prefix=""):
46
+ super().__init__()
47
+ self._prefix = f"{server_path_prefix}/metalstack.infra.v2.SwitchService"
48
+ self._endpoints = {
49
+ "Register": Endpoint[metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterRequest, metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterResponse](
50
+ service_name="SwitchService",
51
+ name="Register",
52
+ function=getattr(service, "Register"),
53
+ input=metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterRequest,
54
+ output=metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterResponse,
55
+ allowed_methods=("POST",),
56
+ ),
57
+ }
58
+
59
+ def serviceName(self):
60
+ return "metalstack.infra.v2.SwitchService"
61
+
62
+
63
+ class SwitchServiceClient(ConnecpyClient):
64
+ def Register(
65
+ self,
66
+ request: metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterRequest,
67
+ *,
68
+ ctx: Optional[ClientContext] = None,
69
+ server_path_prefix: str = "",
70
+ **kwargs,
71
+ ) -> metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterResponse:
72
+ method = "POST"
73
+ return self._make_request(
74
+ url=f"{server_path_prefix}/metalstack.infra.v2.SwitchService/Register",
75
+ ctx=ctx,
76
+ request=request,
77
+ response_class=metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterResponse,
78
+ method=method,
79
+ **kwargs,
80
+ )
81
+
82
+
83
+ class AsyncSwitchServiceClient(AsyncConnecpyClient):
84
+ async def Register(
85
+ self,
86
+ request: metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterRequest,
87
+ *,
88
+ ctx: Optional[ClientContext] = None,
89
+ server_path_prefix: str = "",
90
+ session: Union[httpx.AsyncClient, None] = None,
91
+ **kwargs,
92
+ ) -> metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterResponse:
93
+ method = "POST"
94
+ return await self._make_request(
95
+ url=f"{server_path_prefix}/metalstack.infra.v2.SwitchService/Register",
96
+ ctx=ctx,
97
+ request=request,
98
+ response_class=metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterResponse,
99
+ method=method,
100
+ session=session,
101
+ **kwargs,
102
+ )