mirror of
https://github.com/chirpstack/chirpstack.git
synced 2025-06-12 20:48:09 +00:00
Split private gateways under tenant in uplink / downlink.
This makes it possible to share uplink data with other tenants, but do not allow other tenants to use these gateways for downlinks.
This commit is contained in:
20
api/python/proto/chirpstack-api/api/tenant.proto
vendored
20
api/python/proto/chirpstack-api/api/tenant.proto
vendored
@ -112,9 +112,16 @@ message Tenant {
|
||||
// When set to 0, the tenant can have unlimited devices.
|
||||
uint32 max_device_count = 6;
|
||||
|
||||
// Private gateways.
|
||||
// Gateways under this tenant are private.
|
||||
bool private_gateways = 7;
|
||||
// Private gateways (uplink).
|
||||
// If enabled, then uplink messages will not be shared with other tenants.
|
||||
bool private_gateways_up = 7;
|
||||
|
||||
// Private gateways (downlink).
|
||||
// If enabled, then other tenants will not be able to schedule downlink
|
||||
// messages through the gateways of this tenant. For example, in case you
|
||||
// do want to share uplinks with other tenants (private_gateways_up=false),
|
||||
// but you want to prevent other tenants from using gateway airtime.
|
||||
bool private_gateways_down = 8;
|
||||
}
|
||||
|
||||
message TenantListItem {
|
||||
@ -133,8 +140,11 @@ message TenantListItem {
|
||||
// Can the tenant create and "own" Gateways?
|
||||
bool can_have_gateways = 5;
|
||||
|
||||
// Gateways are private to tenant.
|
||||
bool private_gateways = 6;
|
||||
// Private gateways (uplink).
|
||||
bool private_gateways_up = 6;
|
||||
|
||||
// Private gateways (downlink).
|
||||
bool private_gateways_down = 9;
|
||||
|
||||
// Max gateway count.
|
||||
// 0 = unlimited.
|
||||
|
@ -196,6 +196,15 @@ message DeviceGatewayRxInfoItem {
|
||||
|
||||
// Context blob.
|
||||
bytes context = 6;
|
||||
|
||||
// Gateway is private (uplink).
|
||||
bool is_private_up = 7;
|
||||
|
||||
// Gateway is private (downlink).
|
||||
bool is_private_down = 8;
|
||||
|
||||
// Tenant ID (UUID).
|
||||
bytes tenant_id = 9;
|
||||
}
|
||||
|
||||
message DownlinkFrame {
|
||||
|
80
api/python/src/chirpstack_api/api/tenant_pb2.py
vendored
80
api/python/src/chirpstack_api/api/tenant_pb2.py
vendored
File diff suppressed because one or more lines are too long
20
api/python/src/chirpstack_api/api/tenant_pb2.pyi
vendored
20
api/python/src/chirpstack_api/api/tenant_pb2.pyi
vendored
@ -113,32 +113,35 @@ class ListTenantsResponse(_message.Message):
|
||||
def __init__(self, total_count: _Optional[int] = ..., result: _Optional[_Iterable[_Union[TenantListItem, _Mapping]]] = ...) -> None: ...
|
||||
|
||||
class Tenant(_message.Message):
|
||||
__slots__ = ["can_have_gateways", "description", "id", "max_device_count", "max_gateway_count", "name", "private_gateways"]
|
||||
__slots__ = ["can_have_gateways", "description", "id", "max_device_count", "max_gateway_count", "name", "private_gateways_down", "private_gateways_up"]
|
||||
CAN_HAVE_GATEWAYS_FIELD_NUMBER: _ClassVar[int]
|
||||
DESCRIPTION_FIELD_NUMBER: _ClassVar[int]
|
||||
ID_FIELD_NUMBER: _ClassVar[int]
|
||||
MAX_DEVICE_COUNT_FIELD_NUMBER: _ClassVar[int]
|
||||
MAX_GATEWAY_COUNT_FIELD_NUMBER: _ClassVar[int]
|
||||
NAME_FIELD_NUMBER: _ClassVar[int]
|
||||
PRIVATE_GATEWAYS_FIELD_NUMBER: _ClassVar[int]
|
||||
PRIVATE_GATEWAYS_DOWN_FIELD_NUMBER: _ClassVar[int]
|
||||
PRIVATE_GATEWAYS_UP_FIELD_NUMBER: _ClassVar[int]
|
||||
can_have_gateways: bool
|
||||
description: str
|
||||
id: str
|
||||
max_device_count: int
|
||||
max_gateway_count: int
|
||||
name: str
|
||||
private_gateways: bool
|
||||
def __init__(self, id: _Optional[str] = ..., name: _Optional[str] = ..., description: _Optional[str] = ..., can_have_gateways: bool = ..., max_gateway_count: _Optional[int] = ..., max_device_count: _Optional[int] = ..., private_gateways: bool = ...) -> None: ...
|
||||
private_gateways_down: bool
|
||||
private_gateways_up: bool
|
||||
def __init__(self, id: _Optional[str] = ..., name: _Optional[str] = ..., description: _Optional[str] = ..., can_have_gateways: bool = ..., max_gateway_count: _Optional[int] = ..., max_device_count: _Optional[int] = ..., private_gateways_up: bool = ..., private_gateways_down: bool = ...) -> None: ...
|
||||
|
||||
class TenantListItem(_message.Message):
|
||||
__slots__ = ["can_have_gateways", "created_at", "id", "max_device_count", "max_gateway_count", "name", "private_gateways", "updated_at"]
|
||||
__slots__ = ["can_have_gateways", "created_at", "id", "max_device_count", "max_gateway_count", "name", "private_gateways_down", "private_gateways_up", "updated_at"]
|
||||
CAN_HAVE_GATEWAYS_FIELD_NUMBER: _ClassVar[int]
|
||||
CREATED_AT_FIELD_NUMBER: _ClassVar[int]
|
||||
ID_FIELD_NUMBER: _ClassVar[int]
|
||||
MAX_DEVICE_COUNT_FIELD_NUMBER: _ClassVar[int]
|
||||
MAX_GATEWAY_COUNT_FIELD_NUMBER: _ClassVar[int]
|
||||
NAME_FIELD_NUMBER: _ClassVar[int]
|
||||
PRIVATE_GATEWAYS_FIELD_NUMBER: _ClassVar[int]
|
||||
PRIVATE_GATEWAYS_DOWN_FIELD_NUMBER: _ClassVar[int]
|
||||
PRIVATE_GATEWAYS_UP_FIELD_NUMBER: _ClassVar[int]
|
||||
UPDATED_AT_FIELD_NUMBER: _ClassVar[int]
|
||||
can_have_gateways: bool
|
||||
created_at: _timestamp_pb2.Timestamp
|
||||
@ -146,9 +149,10 @@ class TenantListItem(_message.Message):
|
||||
max_device_count: int
|
||||
max_gateway_count: int
|
||||
name: str
|
||||
private_gateways: bool
|
||||
private_gateways_down: bool
|
||||
private_gateways_up: bool
|
||||
updated_at: _timestamp_pb2.Timestamp
|
||||
def __init__(self, id: _Optional[str] = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., name: _Optional[str] = ..., can_have_gateways: bool = ..., private_gateways: bool = ..., max_gateway_count: _Optional[int] = ..., max_device_count: _Optional[int] = ...) -> None: ...
|
||||
def __init__(self, id: _Optional[str] = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., name: _Optional[str] = ..., can_have_gateways: bool = ..., private_gateways_up: bool = ..., private_gateways_down: bool = ..., max_gateway_count: _Optional[int] = ..., max_device_count: _Optional[int] = ...) -> None: ...
|
||||
|
||||
class TenantUser(_message.Message):
|
||||
__slots__ = ["email", "is_admin", "is_device_admin", "is_gateway_admin", "tenant_id", "user_id"]
|
||||
|
Reference in New Issue
Block a user