feature: update braiins proto files.
This commit is contained in:
@@ -18,7 +18,7 @@ if TYPE_CHECKING:
|
|||||||
|
|
||||||
@dataclass(eq=False, repr=False)
|
@dataclass(eq=False, repr=False)
|
||||||
class ApiVersion(betterproto.Message):
|
class ApiVersion(betterproto.Message):
|
||||||
"""LATEST_API_VERSION=1.0.0-beta.4"""
|
"""LATEST_API_VERSION=1.2.0"""
|
||||||
|
|
||||||
major: int = betterproto.uint64_field(1)
|
major: int = betterproto.uint64_field(1)
|
||||||
minor: int = betterproto.uint64_field(2)
|
minor: int = betterproto.uint64_field(2)
|
||||||
@@ -52,6 +52,7 @@ class ApiVersionServiceStub(betterproto.ServiceStub):
|
|||||||
|
|
||||||
|
|
||||||
class ApiVersionServiceBase(ServiceBase):
|
class ApiVersionServiceBase(ServiceBase):
|
||||||
|
|
||||||
async def get_api_version(
|
async def get_api_version(
|
||||||
self, api_version_request: "ApiVersionRequest"
|
self, api_version_request: "ApiVersionRequest"
|
||||||
) -> "ApiVersion":
|
) -> "ApiVersion":
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||||
# sources: bos/v1/actions.proto, bos/v1/authentication.proto, bos/v1/common.proto, bos/v1/configuration.proto, bos/v1/constraints.proto, bos/v1/cooling.proto, bos/v1/license.proto, bos/v1/miner.proto, bos/v1/performance.proto, bos/v1/pool.proto, bos/v1/units.proto, bos/v1/work.proto
|
# sources: bos/v1/actions.proto, bos/v1/authentication.proto, bos/v1/common.proto, bos/v1/configuration.proto, bos/v1/constraints.proto, bos/v1/cooling.proto, bos/v1/license.proto, bos/v1/miner.proto, bos/v1/network.proto, bos/v1/performance.proto, bos/v1/pool.proto, bos/v1/units.proto, bos/v1/work.proto
|
||||||
# plugin: python-betterproto
|
# plugin: python-betterproto
|
||||||
# This file has been @generated
|
# This file has been @generated
|
||||||
import warnings
|
import warnings
|
||||||
@@ -69,6 +69,7 @@ class Platform(betterproto.Enum):
|
|||||||
PLATFORM_AM3_AML = 4
|
PLATFORM_AM3_AML = 4
|
||||||
PLATFORM_STM32MP157C_II1_AM2 = 5
|
PLATFORM_STM32MP157C_II1_AM2 = 5
|
||||||
PLATFORM_CVITEK_BM1_AM2 = 6
|
PLATFORM_CVITEK_BM1_AM2 = 6
|
||||||
|
PLATFORM_ZYNQ_BM3_AM2 = 7
|
||||||
|
|
||||||
|
|
||||||
class BosMode(betterproto.Enum):
|
class BosMode(betterproto.Enum):
|
||||||
@@ -134,6 +135,12 @@ class SupportArchiveFormat(betterproto.Enum):
|
|||||||
"""BOS custom format"""
|
"""BOS custom format"""
|
||||||
|
|
||||||
|
|
||||||
|
class NetworkProtocol(betterproto.Enum):
|
||||||
|
NETWORK_PROTOCOL_UNSPECIFIED = 0
|
||||||
|
NETWORK_PROTOCOL_DHCP = 1
|
||||||
|
NETWORK_PROTOCOL_STATIC = 2
|
||||||
|
|
||||||
|
|
||||||
@dataclass(eq=False, repr=False)
|
@dataclass(eq=False, repr=False)
|
||||||
class StartRequest(betterproto.Message):
|
class StartRequest(betterproto.Message):
|
||||||
"""Request for start bosminer action."""
|
"""Request for start bosminer action."""
|
||||||
@@ -256,7 +263,14 @@ class LoginRequest(betterproto.Message):
|
|||||||
class LoginResponse(betterproto.Message):
|
class LoginResponse(betterproto.Message):
|
||||||
"""Response for login action."""
|
"""Response for login action."""
|
||||||
|
|
||||||
pass
|
token: str = betterproto.string_field(1)
|
||||||
|
"""Token to be used for authentication"""
|
||||||
|
|
||||||
|
timeout_s: int = betterproto.uint32_field(2)
|
||||||
|
"""
|
||||||
|
Authentication token validity/timeout in seconds. Token validity refreshed
|
||||||
|
to this value with each request.
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
@dataclass(eq=False, repr=False)
|
@dataclass(eq=False, repr=False)
|
||||||
@@ -555,7 +569,16 @@ class TunerConfiguration(betterproto.Message):
|
|||||||
@dataclass(eq=False, repr=False)
|
@dataclass(eq=False, repr=False)
|
||||||
class TunerConstraints(betterproto.Message):
|
class TunerConstraints(betterproto.Message):
|
||||||
power_target: "PowerConstraints" = betterproto.message_field(1)
|
power_target: "PowerConstraints" = betterproto.message_field(1)
|
||||||
|
"""Tuner power target mode constraints"""
|
||||||
|
|
||||||
hashrate_target: "HashrateConstraints" = betterproto.message_field(2)
|
hashrate_target: "HashrateConstraints" = betterproto.message_field(2)
|
||||||
|
"""Tuner hashrate target mode constraints"""
|
||||||
|
|
||||||
|
enabled: "BooleanConstraint" = betterproto.message_field(3)
|
||||||
|
"""Tuner enabled enabled default value"""
|
||||||
|
|
||||||
|
default_mode: "TunerMode" = betterproto.enum_field(4)
|
||||||
|
"""Default tuner mode"""
|
||||||
|
|
||||||
|
|
||||||
@dataclass(eq=False, repr=False)
|
@dataclass(eq=False, repr=False)
|
||||||
@@ -618,6 +641,9 @@ class DpsConstraints(betterproto.Message):
|
|||||||
shutdown_duration: "DurationConstraints" = betterproto.message_field(6)
|
shutdown_duration: "DurationConstraints" = betterproto.message_field(6)
|
||||||
"""Dynamic Performance Scaling shutdown duration constraints"""
|
"""Dynamic Performance Scaling shutdown duration constraints"""
|
||||||
|
|
||||||
|
enabled: "BooleanConstraint" = betterproto.message_field(7)
|
||||||
|
"""Dynamic Performance Scaling enabled default value"""
|
||||||
|
|
||||||
|
|
||||||
@dataclass(eq=False, repr=False)
|
@dataclass(eq=False, repr=False)
|
||||||
class HashboardConstraints(betterproto.Message):
|
class HashboardConstraints(betterproto.Message):
|
||||||
@@ -1104,6 +1130,11 @@ class PoolStats(betterproto.Message):
|
|||||||
generated_work: int = betterproto.uint64_field(6)
|
generated_work: int = betterproto.uint64_field(6)
|
||||||
"""Generated work"""
|
"""Generated work"""
|
||||||
|
|
||||||
|
last_share_time: Optional[datetime] = betterproto.message_field(
|
||||||
|
7, optional=True, group="_last_share_time"
|
||||||
|
)
|
||||||
|
"""Last share time"""
|
||||||
|
|
||||||
|
|
||||||
@dataclass(eq=False, repr=False)
|
@dataclass(eq=False, repr=False)
|
||||||
class GetPoolGroupsRequest(betterproto.Message):
|
class GetPoolGroupsRequest(betterproto.Message):
|
||||||
@@ -1184,6 +1215,33 @@ class RemovePoolGroupResponse(betterproto.Message):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass(eq=False, repr=False)
|
||||||
|
class SetPoolGroupsRequest(betterproto.Message):
|
||||||
|
"""Request for setting pool groups"""
|
||||||
|
|
||||||
|
save_action: "SaveAction" = betterproto.enum_field(1)
|
||||||
|
"""
|
||||||
|
Save action SAVE just update config but changes will not be applied
|
||||||
|
SAVE_AND_APPLY and SAVE_AND_FORCE_APPLY are equal for this method. Pools
|
||||||
|
config will be updated and changes will be applied that will trigger
|
||||||
|
restart.
|
||||||
|
"""
|
||||||
|
|
||||||
|
pool_groups: List["PoolGroupConfiguration"] = betterproto.message_field(2)
|
||||||
|
"""
|
||||||
|
Pool groups configuration `uid` must not be specified (it will be
|
||||||
|
generated)
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass(eq=False, repr=False)
|
||||||
|
class SetPoolGroupsResponse(betterproto.Message):
|
||||||
|
"""Response on setting pool groups"""
|
||||||
|
|
||||||
|
pool_groups: List["PoolGroupConfiguration"] = betterproto.message_field(1)
|
||||||
|
"""Configured pool groups"""
|
||||||
|
|
||||||
|
|
||||||
@dataclass(eq=False, repr=False)
|
@dataclass(eq=False, repr=False)
|
||||||
class GetMinerConfigurationRequest(betterproto.Message):
|
class GetMinerConfigurationRequest(betterproto.Message):
|
||||||
pass
|
pass
|
||||||
@@ -1234,8 +1292,9 @@ class NoneLicense(betterproto.Message):
|
|||||||
time_to_restricted: int = betterproto.uint32_field(1)
|
time_to_restricted: int = betterproto.uint32_field(1)
|
||||||
"""
|
"""
|
||||||
BOS Initialization timeout - number of seconds elapsed since bosminer start
|
BOS Initialization timeout - number of seconds elapsed since bosminer start
|
||||||
i.e., number of seconds BOS will start mining in restricted mode burning
|
i.e., number of seconds BOS will start mining in restricted mode burning 5%
|
||||||
15% of hashrate
|
of hashrate For more, see Section 3.10 of
|
||||||
|
https://braiins.com/os/plus/license
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
@@ -1350,6 +1409,27 @@ class BosVersion(betterproto.Message):
|
|||||||
bos_plus: bool = betterproto.bool_field(3)
|
bos_plus: bool = betterproto.bool_field(3)
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass(eq=False, repr=False)
|
||||||
|
class ErrorCode(betterproto.Message):
|
||||||
|
code: str = betterproto.string_field(1)
|
||||||
|
reason: str = betterproto.string_field(2)
|
||||||
|
hint: str = betterproto.string_field(3)
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass(eq=False, repr=False)
|
||||||
|
class Component(betterproto.Message):
|
||||||
|
name: str = betterproto.string_field(1)
|
||||||
|
index: int = betterproto.uint32_field(2)
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass(eq=False, repr=False)
|
||||||
|
class MinerError(betterproto.Message):
|
||||||
|
timestamp: str = betterproto.string_field(1)
|
||||||
|
message: str = betterproto.string_field(2)
|
||||||
|
error_codes: List["ErrorCode"] = betterproto.message_field(3)
|
||||||
|
components: List["Component"] = betterproto.message_field(4)
|
||||||
|
|
||||||
|
|
||||||
@dataclass(eq=False, repr=False)
|
@dataclass(eq=False, repr=False)
|
||||||
class GetMinerStatusRequest(betterproto.Message):
|
class GetMinerStatusRequest(betterproto.Message):
|
||||||
pass
|
pass
|
||||||
@@ -1402,6 +1482,12 @@ class GetMinerDetailsResponse(betterproto.Message):
|
|||||||
system_uptime_s: int = betterproto.uint64_field(11)
|
system_uptime_s: int = betterproto.uint64_field(11)
|
||||||
"""System uptime"""
|
"""System uptime"""
|
||||||
|
|
||||||
|
status: "MinerStatus" = betterproto.enum_field(12)
|
||||||
|
"""Miner status"""
|
||||||
|
|
||||||
|
kernel_version: str = betterproto.string_field(13)
|
||||||
|
"""Kernel version"""
|
||||||
|
|
||||||
def __post_init__(self) -> None:
|
def __post_init__(self) -> None:
|
||||||
super().__post_init__()
|
super().__post_init__()
|
||||||
if self.is_set("system_uptime"):
|
if self.is_set("system_uptime"):
|
||||||
@@ -1437,6 +1523,17 @@ class GetMinerStatsResponse(betterproto.Message):
|
|||||||
"""Miner power stats"""
|
"""Miner power stats"""
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass(eq=False, repr=False)
|
||||||
|
class GetErrorsRequest(betterproto.Message):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass(eq=False, repr=False)
|
||||||
|
class GetErrorsResponse(betterproto.Message):
|
||||||
|
errors: List["MinerError"] = betterproto.message_field(1)
|
||||||
|
"""Array of errors"""
|
||||||
|
|
||||||
|
|
||||||
@dataclass(eq=False, repr=False)
|
@dataclass(eq=False, repr=False)
|
||||||
class Hashboard(betterproto.Message):
|
class Hashboard(betterproto.Message):
|
||||||
"""Structure to handle HB details"""
|
"""Structure to handle HB details"""
|
||||||
@@ -1467,6 +1564,9 @@ class Hashboard(betterproto.Message):
|
|||||||
stats: "WorkSolverStats" = betterproto.message_field(8)
|
stats: "WorkSolverStats" = betterproto.message_field(8)
|
||||||
"""Hashboard stats"""
|
"""Hashboard stats"""
|
||||||
|
|
||||||
|
model: Optional[str] = betterproto.string_field(9, optional=True, group="_model")
|
||||||
|
"""Hashboard model"""
|
||||||
|
|
||||||
|
|
||||||
@dataclass(eq=False, repr=False)
|
@dataclass(eq=False, repr=False)
|
||||||
class GetSupportArchiveRequest(betterproto.Message):
|
class GetSupportArchiveRequest(betterproto.Message):
|
||||||
@@ -1530,6 +1630,108 @@ class HashboardEnableState(betterproto.Message):
|
|||||||
"""Flag if hashboard is enabled or not"""
|
"""Flag if hashboard is enabled or not"""
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass(eq=False, repr=False)
|
||||||
|
class GetNetworkConfigurationRequest(betterproto.Message):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass(eq=False, repr=False)
|
||||||
|
class GetNetworkConfigurationResponse(betterproto.Message):
|
||||||
|
network: "NetworkConfiguration" = betterproto.message_field(1)
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass(eq=False, repr=False)
|
||||||
|
class SetNetworkConfigurationRequest(betterproto.Message):
|
||||||
|
dhcp: "Dhcp" = betterproto.message_field(1, group="protocol")
|
||||||
|
static: "Static" = betterproto.message_field(2, group="protocol")
|
||||||
|
hostname: Optional[str] = betterproto.string_field(
|
||||||
|
3, optional=True, group="_hostname"
|
||||||
|
)
|
||||||
|
"""Hostname. Existing value will be preserved if this field is not set."""
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass(eq=False, repr=False)
|
||||||
|
class SetNetworkConfigurationResponse(betterproto.Message):
|
||||||
|
network: "NetworkConfiguration" = betterproto.message_field(1)
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass(eq=False, repr=False)
|
||||||
|
class NetworkConfiguration(betterproto.Message):
|
||||||
|
dhcp: "Dhcp" = betterproto.message_field(1, group="protocol")
|
||||||
|
static: "Static" = betterproto.message_field(2, group="protocol")
|
||||||
|
hostname: str = betterproto.string_field(3)
|
||||||
|
"""Hostname"""
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass(eq=False, repr=False)
|
||||||
|
class Dhcp(betterproto.Message):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass(eq=False, repr=False)
|
||||||
|
class Static(betterproto.Message):
|
||||||
|
address: str = betterproto.string_field(1)
|
||||||
|
"""IP address"""
|
||||||
|
|
||||||
|
netmask: str = betterproto.string_field(2)
|
||||||
|
"""Netmask"""
|
||||||
|
|
||||||
|
gateway: str = betterproto.string_field(3)
|
||||||
|
"""Gateway"""
|
||||||
|
|
||||||
|
dns_servers: List[str] = betterproto.string_field(4)
|
||||||
|
"""DNS servers"""
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass(eq=False, repr=False)
|
||||||
|
class GetNetworkInfoRequest(betterproto.Message):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass(eq=False, repr=False)
|
||||||
|
class GetNetworkInfoResponse(betterproto.Message):
|
||||||
|
"""
|
||||||
|
Response message for GetCurrentNetworkConfiguration Represents the current
|
||||||
|
network configuration for the default network interface. Only IPv4 is
|
||||||
|
supported.
|
||||||
|
"""
|
||||||
|
|
||||||
|
name: str = betterproto.string_field(1)
|
||||||
|
"""Name of the network interface"""
|
||||||
|
|
||||||
|
mac_address: Optional[str] = betterproto.string_field(
|
||||||
|
2, optional=True, group="_mac_address"
|
||||||
|
)
|
||||||
|
"""MAC address of the network interface"""
|
||||||
|
|
||||||
|
hostname: Optional[str] = betterproto.string_field(
|
||||||
|
3, optional=True, group="_hostname"
|
||||||
|
)
|
||||||
|
"""Miner hostname"""
|
||||||
|
|
||||||
|
protocol: Optional["NetworkProtocol"] = betterproto.enum_field(
|
||||||
|
4, optional=True, group="_protocol"
|
||||||
|
)
|
||||||
|
"""Network protocol"""
|
||||||
|
|
||||||
|
dns_servers: List[str] = betterproto.string_field(5)
|
||||||
|
"""List of configured DNS servers"""
|
||||||
|
|
||||||
|
networks: List["IpNetwork"] = betterproto.message_field(6)
|
||||||
|
"""List of assigned IP addresses"""
|
||||||
|
|
||||||
|
default_gateway: Optional[str] = betterproto.string_field(
|
||||||
|
7, optional=True, group="_default_gateway"
|
||||||
|
)
|
||||||
|
"""Default gateway/route for the interface"""
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass(eq=False, repr=False)
|
||||||
|
class IpNetwork(betterproto.Message):
|
||||||
|
address: str = betterproto.string_field(1)
|
||||||
|
netmask: str = betterproto.string_field(2)
|
||||||
|
|
||||||
|
|
||||||
class ActionsServiceStub(betterproto.ServiceStub):
|
class ActionsServiceStub(betterproto.ServiceStub):
|
||||||
async def start(
|
async def start(
|
||||||
self,
|
self,
|
||||||
@@ -2049,6 +2251,23 @@ class PoolServiceStub(betterproto.ServiceStub):
|
|||||||
metadata=metadata,
|
metadata=metadata,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
async def set_pool_groups(
|
||||||
|
self,
|
||||||
|
set_pool_groups_request: "SetPoolGroupsRequest",
|
||||||
|
*,
|
||||||
|
timeout: Optional[float] = None,
|
||||||
|
deadline: Optional["Deadline"] = None,
|
||||||
|
metadata: Optional["MetadataLike"] = None
|
||||||
|
) -> "SetPoolGroupsResponse":
|
||||||
|
return await self._unary_unary(
|
||||||
|
"/braiins.bos.v1.PoolService/SetPoolGroups",
|
||||||
|
set_pool_groups_request,
|
||||||
|
SetPoolGroupsResponse,
|
||||||
|
timeout=timeout,
|
||||||
|
deadline=deadline,
|
||||||
|
metadata=metadata,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class ConfigurationServiceStub(betterproto.ServiceStub):
|
class ConfigurationServiceStub(betterproto.ServiceStub):
|
||||||
async def get_miner_configuration(
|
async def get_miner_configuration(
|
||||||
@@ -2158,6 +2377,23 @@ class MinerServiceStub(betterproto.ServiceStub):
|
|||||||
metadata=metadata,
|
metadata=metadata,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
async def get_errors(
|
||||||
|
self,
|
||||||
|
get_errors_request: "GetErrorsRequest",
|
||||||
|
*,
|
||||||
|
timeout: Optional[float] = None,
|
||||||
|
deadline: Optional["Deadline"] = None,
|
||||||
|
metadata: Optional["MetadataLike"] = None
|
||||||
|
) -> "GetErrorsResponse":
|
||||||
|
return await self._unary_unary(
|
||||||
|
"/braiins.bos.v1.MinerService/GetErrors",
|
||||||
|
get_errors_request,
|
||||||
|
GetErrorsResponse,
|
||||||
|
timeout=timeout,
|
||||||
|
deadline=deadline,
|
||||||
|
metadata=metadata,
|
||||||
|
)
|
||||||
|
|
||||||
async def get_hashboards(
|
async def get_hashboards(
|
||||||
self,
|
self,
|
||||||
get_hashboards_request: "GetHashboardsRequest",
|
get_hashboards_request: "GetHashboardsRequest",
|
||||||
@@ -2228,7 +2464,61 @@ class MinerServiceStub(betterproto.ServiceStub):
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
class NetworkServiceStub(betterproto.ServiceStub):
|
||||||
|
async def get_network_configuration(
|
||||||
|
self,
|
||||||
|
get_network_configuration_request: "GetNetworkConfigurationRequest",
|
||||||
|
*,
|
||||||
|
timeout: Optional[float] = None,
|
||||||
|
deadline: Optional["Deadline"] = None,
|
||||||
|
metadata: Optional["MetadataLike"] = None
|
||||||
|
) -> "GetNetworkConfigurationResponse":
|
||||||
|
return await self._unary_unary(
|
||||||
|
"/braiins.bos.v1.NetworkService/GetNetworkConfiguration",
|
||||||
|
get_network_configuration_request,
|
||||||
|
GetNetworkConfigurationResponse,
|
||||||
|
timeout=timeout,
|
||||||
|
deadline=deadline,
|
||||||
|
metadata=metadata,
|
||||||
|
)
|
||||||
|
|
||||||
|
async def set_network_configuration(
|
||||||
|
self,
|
||||||
|
set_network_configuration_request: "SetNetworkConfigurationRequest",
|
||||||
|
*,
|
||||||
|
timeout: Optional[float] = None,
|
||||||
|
deadline: Optional["Deadline"] = None,
|
||||||
|
metadata: Optional["MetadataLike"] = None
|
||||||
|
) -> "SetNetworkConfigurationResponse":
|
||||||
|
return await self._unary_unary(
|
||||||
|
"/braiins.bos.v1.NetworkService/SetNetworkConfiguration",
|
||||||
|
set_network_configuration_request,
|
||||||
|
SetNetworkConfigurationResponse,
|
||||||
|
timeout=timeout,
|
||||||
|
deadline=deadline,
|
||||||
|
metadata=metadata,
|
||||||
|
)
|
||||||
|
|
||||||
|
async def get_network_info(
|
||||||
|
self,
|
||||||
|
get_network_info_request: "GetNetworkInfoRequest",
|
||||||
|
*,
|
||||||
|
timeout: Optional[float] = None,
|
||||||
|
deadline: Optional["Deadline"] = None,
|
||||||
|
metadata: Optional["MetadataLike"] = None
|
||||||
|
) -> "GetNetworkInfoResponse":
|
||||||
|
return await self._unary_unary(
|
||||||
|
"/braiins.bos.v1.NetworkService/GetNetworkInfo",
|
||||||
|
get_network_info_request,
|
||||||
|
GetNetworkInfoResponse,
|
||||||
|
timeout=timeout,
|
||||||
|
deadline=deadline,
|
||||||
|
metadata=metadata,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class ActionsServiceBase(ServiceBase):
|
class ActionsServiceBase(ServiceBase):
|
||||||
|
|
||||||
async def start(self, start_request: "StartRequest") -> "StartResponse":
|
async def start(self, start_request: "StartRequest") -> "StartResponse":
|
||||||
raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)
|
raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)
|
||||||
|
|
||||||
@@ -2357,26 +2647,23 @@ class ActionsServiceBase(ServiceBase):
|
|||||||
RebootRequest,
|
RebootRequest,
|
||||||
RebootResponse,
|
RebootResponse,
|
||||||
),
|
),
|
||||||
"/braiins.bos.v1.ActionsService/SetLocateDeviceStatus": (
|
"/braiins.bos.v1.ActionsService/SetLocateDeviceStatus": grpclib.const.Handler(
|
||||||
grpclib.const.Handler(
|
self.__rpc_set_locate_device_status,
|
||||||
self.__rpc_set_locate_device_status,
|
grpclib.const.Cardinality.UNARY_UNARY,
|
||||||
grpclib.const.Cardinality.UNARY_UNARY,
|
SetLocateDeviceStatusRequest,
|
||||||
SetLocateDeviceStatusRequest,
|
LocateDeviceStatusResponse,
|
||||||
LocateDeviceStatusResponse,
|
|
||||||
)
|
|
||||||
),
|
),
|
||||||
"/braiins.bos.v1.ActionsService/GetLocateDeviceStatus": (
|
"/braiins.bos.v1.ActionsService/GetLocateDeviceStatus": grpclib.const.Handler(
|
||||||
grpclib.const.Handler(
|
self.__rpc_get_locate_device_status,
|
||||||
self.__rpc_get_locate_device_status,
|
grpclib.const.Cardinality.UNARY_UNARY,
|
||||||
grpclib.const.Cardinality.UNARY_UNARY,
|
GetLocateDeviceStatusRequest,
|
||||||
GetLocateDeviceStatusRequest,
|
LocateDeviceStatusResponse,
|
||||||
LocateDeviceStatusResponse,
|
|
||||||
)
|
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class AuthenticationServiceBase(ServiceBase):
|
class AuthenticationServiceBase(ServiceBase):
|
||||||
|
|
||||||
async def login(self, login_request: "LoginRequest") -> "LoginResponse":
|
async def login(self, login_request: "LoginRequest") -> "LoginResponse":
|
||||||
raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)
|
raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)
|
||||||
|
|
||||||
@@ -2417,6 +2704,7 @@ class AuthenticationServiceBase(ServiceBase):
|
|||||||
|
|
||||||
|
|
||||||
class CoolingServiceBase(ServiceBase):
|
class CoolingServiceBase(ServiceBase):
|
||||||
|
|
||||||
async def get_cooling_state(
|
async def get_cooling_state(
|
||||||
self, get_cooling_state_request: "GetCoolingStateRequest"
|
self, get_cooling_state_request: "GetCoolingStateRequest"
|
||||||
) -> "GetCoolingStateResponse":
|
) -> "GetCoolingStateResponse":
|
||||||
@@ -2461,6 +2749,7 @@ class CoolingServiceBase(ServiceBase):
|
|||||||
|
|
||||||
|
|
||||||
class PerformanceServiceBase(ServiceBase):
|
class PerformanceServiceBase(ServiceBase):
|
||||||
|
|
||||||
async def get_tuner_state(
|
async def get_tuner_state(
|
||||||
self, get_tuner_state_request: "GetTunerStateRequest"
|
self, get_tuner_state_request: "GetTunerStateRequest"
|
||||||
) -> "GetTunerStateResponse":
|
) -> "GetTunerStateResponse":
|
||||||
@@ -2648,21 +2937,17 @@ class PerformanceServiceBase(ServiceBase):
|
|||||||
GetTunerStateRequest,
|
GetTunerStateRequest,
|
||||||
GetTunerStateResponse,
|
GetTunerStateResponse,
|
||||||
),
|
),
|
||||||
"/braiins.bos.v1.PerformanceService/ListTargetProfiles": (
|
"/braiins.bos.v1.PerformanceService/ListTargetProfiles": grpclib.const.Handler(
|
||||||
grpclib.const.Handler(
|
self.__rpc_list_target_profiles,
|
||||||
self.__rpc_list_target_profiles,
|
grpclib.const.Cardinality.UNARY_UNARY,
|
||||||
grpclib.const.Cardinality.UNARY_UNARY,
|
ListTargetProfilesRequest,
|
||||||
ListTargetProfilesRequest,
|
ListTargetProfilesResponse,
|
||||||
ListTargetProfilesResponse,
|
|
||||||
)
|
|
||||||
),
|
),
|
||||||
"/braiins.bos.v1.PerformanceService/SetDefaultPowerTarget": (
|
"/braiins.bos.v1.PerformanceService/SetDefaultPowerTarget": grpclib.const.Handler(
|
||||||
grpclib.const.Handler(
|
self.__rpc_set_default_power_target,
|
||||||
self.__rpc_set_default_power_target,
|
grpclib.const.Cardinality.UNARY_UNARY,
|
||||||
grpclib.const.Cardinality.UNARY_UNARY,
|
SetDefaultPowerTargetRequest,
|
||||||
SetDefaultPowerTargetRequest,
|
SetPowerTargetResponse,
|
||||||
SetPowerTargetResponse,
|
|
||||||
)
|
|
||||||
),
|
),
|
||||||
"/braiins.bos.v1.PerformanceService/SetPowerTarget": grpclib.const.Handler(
|
"/braiins.bos.v1.PerformanceService/SetPowerTarget": grpclib.const.Handler(
|
||||||
self.__rpc_set_power_target,
|
self.__rpc_set_power_target,
|
||||||
@@ -2670,53 +2955,41 @@ class PerformanceServiceBase(ServiceBase):
|
|||||||
SetPowerTargetRequest,
|
SetPowerTargetRequest,
|
||||||
SetPowerTargetResponse,
|
SetPowerTargetResponse,
|
||||||
),
|
),
|
||||||
"/braiins.bos.v1.PerformanceService/IncrementPowerTarget": (
|
"/braiins.bos.v1.PerformanceService/IncrementPowerTarget": grpclib.const.Handler(
|
||||||
grpclib.const.Handler(
|
self.__rpc_increment_power_target,
|
||||||
self.__rpc_increment_power_target,
|
grpclib.const.Cardinality.UNARY_UNARY,
|
||||||
grpclib.const.Cardinality.UNARY_UNARY,
|
IncrementPowerTargetRequest,
|
||||||
IncrementPowerTargetRequest,
|
SetPowerTargetResponse,
|
||||||
SetPowerTargetResponse,
|
|
||||||
)
|
|
||||||
),
|
),
|
||||||
"/braiins.bos.v1.PerformanceService/DecrementPowerTarget": (
|
"/braiins.bos.v1.PerformanceService/DecrementPowerTarget": grpclib.const.Handler(
|
||||||
grpclib.const.Handler(
|
self.__rpc_decrement_power_target,
|
||||||
self.__rpc_decrement_power_target,
|
grpclib.const.Cardinality.UNARY_UNARY,
|
||||||
grpclib.const.Cardinality.UNARY_UNARY,
|
DecrementPowerTargetRequest,
|
||||||
DecrementPowerTargetRequest,
|
SetPowerTargetResponse,
|
||||||
SetPowerTargetResponse,
|
|
||||||
)
|
|
||||||
),
|
),
|
||||||
"/braiins.bos.v1.PerformanceService/SetDefaultHashrateTarget": (
|
"/braiins.bos.v1.PerformanceService/SetDefaultHashrateTarget": grpclib.const.Handler(
|
||||||
grpclib.const.Handler(
|
self.__rpc_set_default_hashrate_target,
|
||||||
self.__rpc_set_default_hashrate_target,
|
grpclib.const.Cardinality.UNARY_UNARY,
|
||||||
grpclib.const.Cardinality.UNARY_UNARY,
|
SetDefaultHashrateTargetRequest,
|
||||||
SetDefaultHashrateTargetRequest,
|
SetHashrateTargetResponse,
|
||||||
SetHashrateTargetResponse,
|
|
||||||
)
|
|
||||||
),
|
),
|
||||||
"/braiins.bos.v1.PerformanceService/SetHashrateTarget": (
|
"/braiins.bos.v1.PerformanceService/SetHashrateTarget": grpclib.const.Handler(
|
||||||
grpclib.const.Handler(
|
self.__rpc_set_hashrate_target,
|
||||||
self.__rpc_set_hashrate_target,
|
grpclib.const.Cardinality.UNARY_UNARY,
|
||||||
grpclib.const.Cardinality.UNARY_UNARY,
|
SetHashrateTargetRequest,
|
||||||
SetHashrateTargetRequest,
|
SetHashrateTargetResponse,
|
||||||
SetHashrateTargetResponse,
|
|
||||||
)
|
|
||||||
),
|
),
|
||||||
"/braiins.bos.v1.PerformanceService/IncrementHashrateTarget": (
|
"/braiins.bos.v1.PerformanceService/IncrementHashrateTarget": grpclib.const.Handler(
|
||||||
grpclib.const.Handler(
|
self.__rpc_increment_hashrate_target,
|
||||||
self.__rpc_increment_hashrate_target,
|
grpclib.const.Cardinality.UNARY_UNARY,
|
||||||
grpclib.const.Cardinality.UNARY_UNARY,
|
IncrementHashrateTargetRequest,
|
||||||
IncrementHashrateTargetRequest,
|
SetHashrateTargetResponse,
|
||||||
SetHashrateTargetResponse,
|
|
||||||
)
|
|
||||||
),
|
),
|
||||||
"/braiins.bos.v1.PerformanceService/DecrementHashrateTarget": (
|
"/braiins.bos.v1.PerformanceService/DecrementHashrateTarget": grpclib.const.Handler(
|
||||||
grpclib.const.Handler(
|
self.__rpc_decrement_hashrate_target,
|
||||||
self.__rpc_decrement_hashrate_target,
|
grpclib.const.Cardinality.UNARY_UNARY,
|
||||||
grpclib.const.Cardinality.UNARY_UNARY,
|
DecrementHashrateTargetRequest,
|
||||||
DecrementHashrateTargetRequest,
|
SetHashrateTargetResponse,
|
||||||
SetHashrateTargetResponse,
|
|
||||||
)
|
|
||||||
),
|
),
|
||||||
"/braiins.bos.v1.PerformanceService/SetDPS": grpclib.const.Handler(
|
"/braiins.bos.v1.PerformanceService/SetDPS": grpclib.const.Handler(
|
||||||
self.__rpc_set_dps,
|
self.__rpc_set_dps,
|
||||||
@@ -2724,34 +2997,29 @@ class PerformanceServiceBase(ServiceBase):
|
|||||||
SetDpsRequest,
|
SetDpsRequest,
|
||||||
SetDpsResponse,
|
SetDpsResponse,
|
||||||
),
|
),
|
||||||
"/braiins.bos.v1.PerformanceService/SetPerformanceMode": (
|
"/braiins.bos.v1.PerformanceService/SetPerformanceMode": grpclib.const.Handler(
|
||||||
grpclib.const.Handler(
|
self.__rpc_set_performance_mode,
|
||||||
self.__rpc_set_performance_mode,
|
grpclib.const.Cardinality.UNARY_UNARY,
|
||||||
grpclib.const.Cardinality.UNARY_UNARY,
|
SetPerformanceModeRequest,
|
||||||
SetPerformanceModeRequest,
|
PerformanceMode,
|
||||||
PerformanceMode,
|
|
||||||
)
|
|
||||||
),
|
),
|
||||||
"/braiins.bos.v1.PerformanceService/GetActivePerformanceMode": (
|
"/braiins.bos.v1.PerformanceService/GetActivePerformanceMode": grpclib.const.Handler(
|
||||||
grpclib.const.Handler(
|
self.__rpc_get_active_performance_mode,
|
||||||
self.__rpc_get_active_performance_mode,
|
grpclib.const.Cardinality.UNARY_UNARY,
|
||||||
grpclib.const.Cardinality.UNARY_UNARY,
|
GetPerformanceModeRequest,
|
||||||
GetPerformanceModeRequest,
|
PerformanceMode,
|
||||||
PerformanceMode,
|
|
||||||
)
|
|
||||||
),
|
),
|
||||||
"/braiins.bos.v1.PerformanceService/RemoveTunedProfiles": (
|
"/braiins.bos.v1.PerformanceService/RemoveTunedProfiles": grpclib.const.Handler(
|
||||||
grpclib.const.Handler(
|
self.__rpc_remove_tuned_profiles,
|
||||||
self.__rpc_remove_tuned_profiles,
|
grpclib.const.Cardinality.UNARY_UNARY,
|
||||||
grpclib.const.Cardinality.UNARY_UNARY,
|
RemoveTunedProfilesRequest,
|
||||||
RemoveTunedProfilesRequest,
|
RemoveTunedProfilesResponse,
|
||||||
RemoveTunedProfilesResponse,
|
|
||||||
)
|
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class PoolServiceBase(ServiceBase):
|
class PoolServiceBase(ServiceBase):
|
||||||
|
|
||||||
async def get_pool_groups(
|
async def get_pool_groups(
|
||||||
self, get_pool_groups_request: "GetPoolGroupsRequest"
|
self, get_pool_groups_request: "GetPoolGroupsRequest"
|
||||||
) -> "GetPoolGroupsResponse":
|
) -> "GetPoolGroupsResponse":
|
||||||
@@ -2772,6 +3040,11 @@ class PoolServiceBase(ServiceBase):
|
|||||||
) -> "RemovePoolGroupResponse":
|
) -> "RemovePoolGroupResponse":
|
||||||
raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)
|
raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)
|
||||||
|
|
||||||
|
async def set_pool_groups(
|
||||||
|
self, set_pool_groups_request: "SetPoolGroupsRequest"
|
||||||
|
) -> "SetPoolGroupsResponse":
|
||||||
|
raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)
|
||||||
|
|
||||||
async def __rpc_get_pool_groups(
|
async def __rpc_get_pool_groups(
|
||||||
self,
|
self,
|
||||||
stream: "grpclib.server.Stream[GetPoolGroupsRequest, GetPoolGroupsResponse]",
|
stream: "grpclib.server.Stream[GetPoolGroupsRequest, GetPoolGroupsResponse]",
|
||||||
@@ -2804,6 +3077,14 @@ class PoolServiceBase(ServiceBase):
|
|||||||
response = await self.remove_pool_group(request)
|
response = await self.remove_pool_group(request)
|
||||||
await stream.send_message(response)
|
await stream.send_message(response)
|
||||||
|
|
||||||
|
async def __rpc_set_pool_groups(
|
||||||
|
self,
|
||||||
|
stream: "grpclib.server.Stream[SetPoolGroupsRequest, SetPoolGroupsResponse]",
|
||||||
|
) -> None:
|
||||||
|
request = await stream.recv_message()
|
||||||
|
response = await self.set_pool_groups(request)
|
||||||
|
await stream.send_message(response)
|
||||||
|
|
||||||
def __mapping__(self) -> Dict[str, grpclib.const.Handler]:
|
def __mapping__(self) -> Dict[str, grpclib.const.Handler]:
|
||||||
return {
|
return {
|
||||||
"/braiins.bos.v1.PoolService/GetPoolGroups": grpclib.const.Handler(
|
"/braiins.bos.v1.PoolService/GetPoolGroups": grpclib.const.Handler(
|
||||||
@@ -2830,10 +3111,17 @@ class PoolServiceBase(ServiceBase):
|
|||||||
RemovePoolGroupRequest,
|
RemovePoolGroupRequest,
|
||||||
RemovePoolGroupResponse,
|
RemovePoolGroupResponse,
|
||||||
),
|
),
|
||||||
|
"/braiins.bos.v1.PoolService/SetPoolGroups": grpclib.const.Handler(
|
||||||
|
self.__rpc_set_pool_groups,
|
||||||
|
grpclib.const.Cardinality.UNARY_UNARY,
|
||||||
|
SetPoolGroupsRequest,
|
||||||
|
SetPoolGroupsResponse,
|
||||||
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class ConfigurationServiceBase(ServiceBase):
|
class ConfigurationServiceBase(ServiceBase):
|
||||||
|
|
||||||
async def get_miner_configuration(
|
async def get_miner_configuration(
|
||||||
self, get_miner_configuration_request: "GetMinerConfigurationRequest"
|
self, get_miner_configuration_request: "GetMinerConfigurationRequest"
|
||||||
) -> "GetMinerConfigurationResponse":
|
) -> "GetMinerConfigurationResponse":
|
||||||
@@ -2862,26 +3150,23 @@ class ConfigurationServiceBase(ServiceBase):
|
|||||||
|
|
||||||
def __mapping__(self) -> Dict[str, grpclib.const.Handler]:
|
def __mapping__(self) -> Dict[str, grpclib.const.Handler]:
|
||||||
return {
|
return {
|
||||||
"/braiins.bos.v1.ConfigurationService/GetMinerConfiguration": (
|
"/braiins.bos.v1.ConfigurationService/GetMinerConfiguration": grpclib.const.Handler(
|
||||||
grpclib.const.Handler(
|
self.__rpc_get_miner_configuration,
|
||||||
self.__rpc_get_miner_configuration,
|
grpclib.const.Cardinality.UNARY_UNARY,
|
||||||
grpclib.const.Cardinality.UNARY_UNARY,
|
GetMinerConfigurationRequest,
|
||||||
GetMinerConfigurationRequest,
|
GetMinerConfigurationResponse,
|
||||||
GetMinerConfigurationResponse,
|
|
||||||
)
|
|
||||||
),
|
),
|
||||||
"/braiins.bos.v1.ConfigurationService/GetConstraints": (
|
"/braiins.bos.v1.ConfigurationService/GetConstraints": grpclib.const.Handler(
|
||||||
grpclib.const.Handler(
|
self.__rpc_get_constraints,
|
||||||
self.__rpc_get_constraints,
|
grpclib.const.Cardinality.UNARY_UNARY,
|
||||||
grpclib.const.Cardinality.UNARY_UNARY,
|
GetConstraintsRequest,
|
||||||
GetConstraintsRequest,
|
GetConstraintsResponse,
|
||||||
GetConstraintsResponse,
|
|
||||||
)
|
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class LicenseServiceBase(ServiceBase):
|
class LicenseServiceBase(ServiceBase):
|
||||||
|
|
||||||
async def get_license_state(
|
async def get_license_state(
|
||||||
self, get_license_state_request: "GetLicenseStateRequest"
|
self, get_license_state_request: "GetLicenseStateRequest"
|
||||||
) -> "GetLicenseStateResponse":
|
) -> "GetLicenseStateResponse":
|
||||||
@@ -2907,6 +3192,7 @@ class LicenseServiceBase(ServiceBase):
|
|||||||
|
|
||||||
|
|
||||||
class MinerServiceBase(ServiceBase):
|
class MinerServiceBase(ServiceBase):
|
||||||
|
|
||||||
async def get_miner_status(
|
async def get_miner_status(
|
||||||
self, get_miner_status_request: "GetMinerStatusRequest"
|
self, get_miner_status_request: "GetMinerStatusRequest"
|
||||||
) -> AsyncIterator["GetMinerStatusResponse"]:
|
) -> AsyncIterator["GetMinerStatusResponse"]:
|
||||||
@@ -2923,6 +3209,11 @@ class MinerServiceBase(ServiceBase):
|
|||||||
) -> "GetMinerStatsResponse":
|
) -> "GetMinerStatsResponse":
|
||||||
raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)
|
raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)
|
||||||
|
|
||||||
|
async def get_errors(
|
||||||
|
self, get_errors_request: "GetErrorsRequest"
|
||||||
|
) -> "GetErrorsResponse":
|
||||||
|
raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)
|
||||||
|
|
||||||
async def get_hashboards(
|
async def get_hashboards(
|
||||||
self, get_hashboards_request: "GetHashboardsRequest"
|
self, get_hashboards_request: "GetHashboardsRequest"
|
||||||
) -> "GetHashboardsResponse":
|
) -> "GetHashboardsResponse":
|
||||||
@@ -2971,6 +3262,13 @@ class MinerServiceBase(ServiceBase):
|
|||||||
response = await self.get_miner_stats(request)
|
response = await self.get_miner_stats(request)
|
||||||
await stream.send_message(response)
|
await stream.send_message(response)
|
||||||
|
|
||||||
|
async def __rpc_get_errors(
|
||||||
|
self, stream: "grpclib.server.Stream[GetErrorsRequest, GetErrorsResponse]"
|
||||||
|
) -> None:
|
||||||
|
request = await stream.recv_message()
|
||||||
|
response = await self.get_errors(request)
|
||||||
|
await stream.send_message(response)
|
||||||
|
|
||||||
async def __rpc_get_hashboards(
|
async def __rpc_get_hashboards(
|
||||||
self,
|
self,
|
||||||
stream: "grpclib.server.Stream[GetHashboardsRequest, GetHashboardsResponse]",
|
stream: "grpclib.server.Stream[GetHashboardsRequest, GetHashboardsResponse]",
|
||||||
@@ -3026,6 +3324,12 @@ class MinerServiceBase(ServiceBase):
|
|||||||
GetMinerStatsRequest,
|
GetMinerStatsRequest,
|
||||||
GetMinerStatsResponse,
|
GetMinerStatsResponse,
|
||||||
),
|
),
|
||||||
|
"/braiins.bos.v1.MinerService/GetErrors": grpclib.const.Handler(
|
||||||
|
self.__rpc_get_errors,
|
||||||
|
grpclib.const.Cardinality.UNARY_UNARY,
|
||||||
|
GetErrorsRequest,
|
||||||
|
GetErrorsResponse,
|
||||||
|
),
|
||||||
"/braiins.bos.v1.MinerService/GetHashboards": grpclib.const.Handler(
|
"/braiins.bos.v1.MinerService/GetHashboards": grpclib.const.Handler(
|
||||||
self.__rpc_get_hashboards,
|
self.__rpc_get_hashboards,
|
||||||
grpclib.const.Cardinality.UNARY_UNARY,
|
grpclib.const.Cardinality.UNARY_UNARY,
|
||||||
@@ -3051,3 +3355,67 @@ class MinerServiceBase(ServiceBase):
|
|||||||
DisableHashboardsResponse,
|
DisableHashboardsResponse,
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class NetworkServiceBase(ServiceBase):
|
||||||
|
|
||||||
|
async def get_network_configuration(
|
||||||
|
self, get_network_configuration_request: "GetNetworkConfigurationRequest"
|
||||||
|
) -> "GetNetworkConfigurationResponse":
|
||||||
|
raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)
|
||||||
|
|
||||||
|
async def set_network_configuration(
|
||||||
|
self, set_network_configuration_request: "SetNetworkConfigurationRequest"
|
||||||
|
) -> "SetNetworkConfigurationResponse":
|
||||||
|
raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)
|
||||||
|
|
||||||
|
async def get_network_info(
|
||||||
|
self, get_network_info_request: "GetNetworkInfoRequest"
|
||||||
|
) -> "GetNetworkInfoResponse":
|
||||||
|
raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)
|
||||||
|
|
||||||
|
async def __rpc_get_network_configuration(
|
||||||
|
self,
|
||||||
|
stream: "grpclib.server.Stream[GetNetworkConfigurationRequest, GetNetworkConfigurationResponse]",
|
||||||
|
) -> None:
|
||||||
|
request = await stream.recv_message()
|
||||||
|
response = await self.get_network_configuration(request)
|
||||||
|
await stream.send_message(response)
|
||||||
|
|
||||||
|
async def __rpc_set_network_configuration(
|
||||||
|
self,
|
||||||
|
stream: "grpclib.server.Stream[SetNetworkConfigurationRequest, SetNetworkConfigurationResponse]",
|
||||||
|
) -> None:
|
||||||
|
request = await stream.recv_message()
|
||||||
|
response = await self.set_network_configuration(request)
|
||||||
|
await stream.send_message(response)
|
||||||
|
|
||||||
|
async def __rpc_get_network_info(
|
||||||
|
self,
|
||||||
|
stream: "grpclib.server.Stream[GetNetworkInfoRequest, GetNetworkInfoResponse]",
|
||||||
|
) -> None:
|
||||||
|
request = await stream.recv_message()
|
||||||
|
response = await self.get_network_info(request)
|
||||||
|
await stream.send_message(response)
|
||||||
|
|
||||||
|
def __mapping__(self) -> Dict[str, grpclib.const.Handler]:
|
||||||
|
return {
|
||||||
|
"/braiins.bos.v1.NetworkService/GetNetworkConfiguration": grpclib.const.Handler(
|
||||||
|
self.__rpc_get_network_configuration,
|
||||||
|
grpclib.const.Cardinality.UNARY_UNARY,
|
||||||
|
GetNetworkConfigurationRequest,
|
||||||
|
GetNetworkConfigurationResponse,
|
||||||
|
),
|
||||||
|
"/braiins.bos.v1.NetworkService/SetNetworkConfiguration": grpclib.const.Handler(
|
||||||
|
self.__rpc_set_network_configuration,
|
||||||
|
grpclib.const.Cardinality.UNARY_UNARY,
|
||||||
|
SetNetworkConfigurationRequest,
|
||||||
|
SetNetworkConfigurationResponse,
|
||||||
|
),
|
||||||
|
"/braiins.bos.v1.NetworkService/GetNetworkInfo": grpclib.const.Handler(
|
||||||
|
self.__rpc_get_network_info,
|
||||||
|
grpclib.const.Cardinality.UNARY_UNARY,
|
||||||
|
GetNetworkInfoRequest,
|
||||||
|
GetNetworkInfoResponse,
|
||||||
|
),
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user