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.
- {metal_stack_api-0.0.7.dist-info → metal_stack_api-0.0.9.dist-info}/METADATA +1 -1
- {metal_stack_api-0.0.7.dist-info → metal_stack_api-0.0.9.dist-info}/RECORD +16 -5
- metalstack/api/v2/machine_connecpy.py +326 -0
- metalstack/api/v2/machine_pb2.py +377 -0
- metalstack/api/v2/machine_pb2.pyi +556 -0
- metalstack/api/v2/machine_pb2_grpc.py +257 -0
- metalstack/api/v2/switch_pb2.py +124 -0
- metalstack/api/v2/switch_pb2.pyi +133 -0
- metalstack/api/v2/switch_pb2_grpc.py +4 -0
- metalstack/client/client.py +8 -0
- metalstack/infra/v2/switch_connecpy.py +102 -0
- metalstack/infra/v2/switch_pb2.py +45 -0
- metalstack/infra/v2/switch_pb2.pyi +20 -0
- metalstack/infra/v2/switch_pb2_grpc.py +81 -0
- {metal_stack_api-0.0.7.dist-info → metal_stack_api-0.0.9.dist-info}/WHEEL +0 -0
- {metal_stack_api-0.0.7.dist-info → metal_stack_api-0.0.9.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
|
+
# source: metalstack/infra/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/infra/v2/switch.proto'
|
|
19
|
+
)
|
|
20
|
+
# @@protoc_insertion_point(imports)
|
|
21
|
+
|
|
22
|
+
_sym_db = _symbol_database.Default()
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
from metalstack.api.v2 import common_pb2 as metalstack_dot_api_dot_v2_dot_common__pb2
|
|
26
|
+
from metalstack.api.v2 import switch_pb2 as metalstack_dot_api_dot_v2_dot_switch__pb2
|
|
27
|
+
|
|
28
|
+
|
|
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\x06switch2\x8e\x01\n\rSwitchService\x12}\n\x08Register\x12\x31.metalstack.infra.v2.SwitchServiceRegisterRequest\x1a\x32.metalstack.infra.v2.SwitchServiceRegisterResponse\"\n\xe0\xf3\x18\x02\xea\xf3\x18\x02\x01\x02\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
|
+
|
|
31
|
+
_globals = globals()
|
|
32
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
33
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'metalstack.infra.v2.switch_pb2', _globals)
|
|
34
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
|
35
|
+
_globals['DESCRIPTOR']._loaded_options = None
|
|
36
|
+
_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'
|
|
37
|
+
_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\002\001\002'
|
|
39
|
+
_globals['_SWITCHSERVICEREGISTERREQUEST']._serialized_start=121
|
|
40
|
+
_globals['_SWITCHSERVICEREGISTERREQUEST']._serialized_end=202
|
|
41
|
+
_globals['_SWITCHSERVICEREGISTERRESPONSE']._serialized_start=204
|
|
42
|
+
_globals['_SWITCHSERVICEREGISTERRESPONSE']._serialized_end=286
|
|
43
|
+
_globals['_SWITCHSERVICE']._serialized_start=289
|
|
44
|
+
_globals['_SWITCHSERVICE']._serialized_end=431
|
|
45
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
from metalstack.api.v2 import common_pb2 as _common_pb2
|
|
2
|
+
from metalstack.api.v2 import switch_pb2 as _switch_pb2
|
|
3
|
+
from google.protobuf import descriptor as _descriptor
|
|
4
|
+
from google.protobuf import message as _message
|
|
5
|
+
from collections.abc import Mapping as _Mapping
|
|
6
|
+
from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
|
|
7
|
+
|
|
8
|
+
DESCRIPTOR: _descriptor.FileDescriptor
|
|
9
|
+
|
|
10
|
+
class SwitchServiceRegisterRequest(_message.Message):
|
|
11
|
+
__slots__ = ("switch",)
|
|
12
|
+
SWITCH_FIELD_NUMBER: _ClassVar[int]
|
|
13
|
+
switch: _switch_pb2.Switch
|
|
14
|
+
def __init__(self, switch: _Optional[_Union[_switch_pb2.Switch, _Mapping]] = ...) -> None: ...
|
|
15
|
+
|
|
16
|
+
class SwitchServiceRegisterResponse(_message.Message):
|
|
17
|
+
__slots__ = ("switch",)
|
|
18
|
+
SWITCH_FIELD_NUMBER: _ClassVar[int]
|
|
19
|
+
switch: _switch_pb2.Switch
|
|
20
|
+
def __init__(self, switch: _Optional[_Union[_switch_pb2.Switch, _Mapping]] = ...) -> None: ...
|
|
@@ -0,0 +1,81 @@
|
|
|
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.infra.v2 import switch_pb2 as metalstack_dot_infra_dot_v2_dot_switch__pb2
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class SwitchServiceStub(object):
|
|
9
|
+
"""SwitchService serves switch related functions
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
def __init__(self, channel):
|
|
13
|
+
"""Constructor.
|
|
14
|
+
|
|
15
|
+
Args:
|
|
16
|
+
channel: A grpc.Channel.
|
|
17
|
+
"""
|
|
18
|
+
self.Register = channel.unary_unary(
|
|
19
|
+
'/metalstack.infra.v2.SwitchService/Register',
|
|
20
|
+
request_serializer=metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterRequest.SerializeToString,
|
|
21
|
+
response_deserializer=metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterResponse.FromString,
|
|
22
|
+
_registered_method=True)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class SwitchServiceServicer(object):
|
|
26
|
+
"""SwitchService serves switch related functions
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
def Register(self, request, context):
|
|
30
|
+
"""Register a switch
|
|
31
|
+
"""
|
|
32
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
33
|
+
context.set_details('Method not implemented!')
|
|
34
|
+
raise NotImplementedError('Method not implemented!')
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def add_SwitchServiceServicer_to_server(servicer, server):
|
|
38
|
+
rpc_method_handlers = {
|
|
39
|
+
'Register': grpc.unary_unary_rpc_method_handler(
|
|
40
|
+
servicer.Register,
|
|
41
|
+
request_deserializer=metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterRequest.FromString,
|
|
42
|
+
response_serializer=metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterResponse.SerializeToString,
|
|
43
|
+
),
|
|
44
|
+
}
|
|
45
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
|
46
|
+
'metalstack.infra.v2.SwitchService', rpc_method_handlers)
|
|
47
|
+
server.add_generic_rpc_handlers((generic_handler,))
|
|
48
|
+
server.add_registered_method_handlers('metalstack.infra.v2.SwitchService', rpc_method_handlers)
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
# This class is part of an EXPERIMENTAL API.
|
|
52
|
+
class SwitchService(object):
|
|
53
|
+
"""SwitchService serves switch related functions
|
|
54
|
+
"""
|
|
55
|
+
|
|
56
|
+
@staticmethod
|
|
57
|
+
def Register(request,
|
|
58
|
+
target,
|
|
59
|
+
options=(),
|
|
60
|
+
channel_credentials=None,
|
|
61
|
+
call_credentials=None,
|
|
62
|
+
insecure=False,
|
|
63
|
+
compression=None,
|
|
64
|
+
wait_for_ready=None,
|
|
65
|
+
timeout=None,
|
|
66
|
+
metadata=None):
|
|
67
|
+
return grpc.experimental.unary_unary(
|
|
68
|
+
request,
|
|
69
|
+
target,
|
|
70
|
+
'/metalstack.infra.v2.SwitchService/Register',
|
|
71
|
+
metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterRequest.SerializeToString,
|
|
72
|
+
metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterResponse.FromString,
|
|
73
|
+
options,
|
|
74
|
+
channel_credentials,
|
|
75
|
+
insecure,
|
|
76
|
+
call_credentials,
|
|
77
|
+
compression,
|
|
78
|
+
wait_for_ready,
|
|
79
|
+
timeout,
|
|
80
|
+
metadata,
|
|
81
|
+
_registered_method=True)
|
|
File without changes
|
|
File without changes
|