metal-stack-api 0.0.8__py3-none-any.whl → 0.0.10__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.8.dist-info → metal_stack_api-0.0.10.dist-info}/METADATA +1 -1
- {metal_stack_api-0.0.8.dist-info → metal_stack_api-0.0.10.dist-info}/RECORD +11 -7
- metalstack/api/v2/machine_connecpy.py +326 -0
- metalstack/api/v2/machine_pb2.py +381 -0
- metalstack/api/v2/machine_pb2.pyi +562 -0
- metalstack/api/v2/machine_pb2_grpc.py +257 -0
- metalstack/api/v2/switch_pb2.py +16 -16
- metalstack/api/v2/switch_pb2.pyi +4 -4
- metalstack/client/client.py +4 -0
- {metal_stack_api-0.0.8.dist-info → metal_stack_api-0.0.10.dist-info}/WHEEL +0 -0
- {metal_stack_api-0.0.8.dist-info → metal_stack_api-0.0.10.dist-info}/top_level.txt +0 -0
|
@@ -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)
|
metalstack/api/v2/switch_pb2.py
CHANGED
|
@@ -27,7 +27,7 @@ from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb
|
|
|
27
27
|
from metalstack.api.v2 import common_pb2 as metalstack_dot_api_dot_v2_dot_common__pb2
|
|
28
28
|
|
|
29
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\"\
|
|
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
31
|
|
|
32
32
|
_globals = globals()
|
|
33
33
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
@@ -85,8 +85,8 @@ if not _descriptor._USE_C_DESCRIPTORS:
|
|
|
85
85
|
_globals['_SWITCHNIC'].fields_by_name['name']._serialized_options = b'\272H\007r\005\020\002\030\200\001'
|
|
86
86
|
_globals['_SWITCHNIC'].fields_by_name['identifier']._loaded_options = None
|
|
87
87
|
_globals['_SWITCHNIC'].fields_by_name['identifier']._serialized_options = b'\272H\007r\005\020\002\030\200\001'
|
|
88
|
-
_globals['_SWITCHNIC'].fields_by_name['
|
|
89
|
-
_globals['_SWITCHNIC'].fields_by_name['
|
|
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
90
|
_globals['_SWITCHNIC'].fields_by_name['vrf']._loaded_options = None
|
|
91
91
|
_globals['_SWITCHNIC'].fields_by_name['vrf']._serialized_options = b'\272H\007r\005\020\002\030\200\001'
|
|
92
92
|
_globals['_SWITCHNIC'].fields_by_name['actual']._loaded_options = None
|
|
@@ -103,22 +103,22 @@ if not _descriptor._USE_C_DESCRIPTORS:
|
|
|
103
103
|
_globals['_SWITCHBGPPORTSTATE'].fields_by_name['vrf_name']._serialized_options = b'\272H\007r\005\020\002\030\200\001'
|
|
104
104
|
_globals['_SWITCHBGPPORTSTATE'].fields_by_name['bgp_state']._loaded_options = None
|
|
105
105
|
_globals['_SWITCHBGPPORTSTATE'].fields_by_name['bgp_state']._serialized_options = b'\272H\005\202\001\002\020\001'
|
|
106
|
-
_globals['_BGPSTATE']._serialized_start=
|
|
107
|
-
_globals['_BGPSTATE']._serialized_end=
|
|
108
|
-
_globals['_SWITCHREPLACEMODE']._serialized_start=
|
|
109
|
-
_globals['_SWITCHREPLACEMODE']._serialized_end=
|
|
110
|
-
_globals['_SWITCHOSVENDOR']._serialized_start=
|
|
111
|
-
_globals['_SWITCHOSVENDOR']._serialized_end=
|
|
112
|
-
_globals['_SWITCHPORTSTATUS']._serialized_start=
|
|
113
|
-
_globals['_SWITCHPORTSTATUS']._serialized_end=
|
|
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
114
|
_globals['_SWITCH']._serialized_start=147
|
|
115
115
|
_globals['_SWITCH']._serialized_end=625
|
|
116
116
|
_globals['_SWITCHOS']._serialized_start=628
|
|
117
117
|
_globals['_SWITCHOS']._serialized_end=803
|
|
118
118
|
_globals['_SWITCHNIC']._serialized_start=806
|
|
119
|
-
_globals['_SWITCHNIC']._serialized_end=
|
|
120
|
-
_globals['_BGPFILTER']._serialized_start=
|
|
121
|
-
_globals['_BGPFILTER']._serialized_end=
|
|
122
|
-
_globals['_SWITCHBGPPORTSTATE']._serialized_start=
|
|
123
|
-
_globals['_SWITCHBGPPORTSTATE']._serialized_end=
|
|
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
124
|
# @@protoc_insertion_point(module_scope)
|
metalstack/api/v2/switch_pb2.pyi
CHANGED
|
@@ -89,22 +89,22 @@ class SwitchOS(_message.Message):
|
|
|
89
89
|
def __init__(self, vendor: _Optional[_Union[SwitchOSVendor, str]] = ..., version: _Optional[str] = ..., metal_core_version: _Optional[str] = ...) -> None: ...
|
|
90
90
|
|
|
91
91
|
class SwitchNic(_message.Message):
|
|
92
|
-
__slots__ = ("name", "identifier", "
|
|
92
|
+
__slots__ = ("name", "identifier", "mac", "vrf", "actual", "bgp_filter", "bgp_port_state")
|
|
93
93
|
NAME_FIELD_NUMBER: _ClassVar[int]
|
|
94
94
|
IDENTIFIER_FIELD_NUMBER: _ClassVar[int]
|
|
95
|
-
|
|
95
|
+
MAC_FIELD_NUMBER: _ClassVar[int]
|
|
96
96
|
VRF_FIELD_NUMBER: _ClassVar[int]
|
|
97
97
|
ACTUAL_FIELD_NUMBER: _ClassVar[int]
|
|
98
98
|
BGP_FILTER_FIELD_NUMBER: _ClassVar[int]
|
|
99
99
|
BGP_PORT_STATE_FIELD_NUMBER: _ClassVar[int]
|
|
100
100
|
name: str
|
|
101
101
|
identifier: str
|
|
102
|
-
|
|
102
|
+
mac: str
|
|
103
103
|
vrf: str
|
|
104
104
|
actual: SwitchPortStatus
|
|
105
105
|
bgp_filter: BGPFilter
|
|
106
106
|
bgp_port_state: SwitchBGPPortState
|
|
107
|
-
def __init__(self, name: _Optional[str] = ..., identifier: _Optional[str] = ...,
|
|
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
108
|
|
|
109
109
|
class BGPFilter(_message.Message):
|
|
110
110
|
__slots__ = ("cidrs", "vnis")
|
metalstack/client/client.py
CHANGED
|
@@ -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
|
|
@@ -101,6 +102,9 @@ class Client:
|
|
|
101
102
|
def ip(self):
|
|
102
103
|
return api_ip_connecpy.IPServiceClient(address=self._baseurl, session=self._session)
|
|
103
104
|
|
|
105
|
+
def machine(self):
|
|
106
|
+
return api_machine_connecpy.MachineServiceClient(address=self._baseurl, session=self._session)
|
|
107
|
+
|
|
104
108
|
def method(self):
|
|
105
109
|
return api_method_connecpy.MethodServiceClient(address=self._baseurl, session=self._session)
|
|
106
110
|
|
|
File without changes
|
|
File without changes
|