Skip to content

Commit

Permalink
enhance: Sync milvus-proto to latest commit (#2060)
Browse files Browse the repository at this point in the history
Signed-off-by: yangxuan <[email protected]>
  • Loading branch information
XuanYang-cn authored Apr 29, 2024
1 parent 1081c49 commit f2fac2b
Show file tree
Hide file tree
Showing 8 changed files with 436 additions and 393 deletions.
12 changes: 6 additions & 6 deletions pymilvus/grpc_gen/common_pb2.py

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions pymilvus/grpc_gen/common_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ class ObjectPrivilege(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
PrivilegeDescribeAlias: _ClassVar[ObjectPrivilege]
PrivilegeListAliases: _ClassVar[ObjectPrivilege]
PrivilegeUpdateResourceGroups: _ClassVar[ObjectPrivilege]
PrivilegeAlterDatabase: _ClassVar[ObjectPrivilege]

class StateCode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
__slots__ = ()
Expand Down Expand Up @@ -558,6 +559,7 @@ PrivilegeDropAlias: ObjectPrivilege
PrivilegeDescribeAlias: ObjectPrivilege
PrivilegeListAliases: ObjectPrivilege
PrivilegeUpdateResourceGroups: ObjectPrivilege
PrivilegeAlterDatabase: ObjectPrivilege
Initializing: StateCode
Healthy: StateCode
Abnormal: StateCode
Expand Down
658 changes: 328 additions & 330 deletions pymilvus/grpc_gen/milvus_pb2.py

Large diffs are not rendered by default.

18 changes: 16 additions & 2 deletions pymilvus/grpc_gen/milvus_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ class DescribeCollectionRequest(_message.Message):
def __init__(self, base: _Optional[_Union[_common_pb2.MsgBase, _Mapping]] = ..., db_name: _Optional[str] = ..., collection_name: _Optional[str] = ..., collectionID: _Optional[int] = ..., time_stamp: _Optional[int] = ...) -> None: ...

class DescribeCollectionResponse(_message.Message):
__slots__ = ("status", "schema", "collectionID", "virtual_channel_names", "physical_channel_names", "created_timestamp", "created_utc_timestamp", "shards_num", "aliases", "start_positions", "consistency_level", "collection_name", "properties", "db_name", "num_partitions")
__slots__ = ("status", "schema", "collectionID", "virtual_channel_names", "physical_channel_names", "created_timestamp", "created_utc_timestamp", "shards_num", "aliases", "start_positions", "consistency_level", "collection_name", "properties", "db_name", "num_partitions", "db_id")
STATUS_FIELD_NUMBER: _ClassVar[int]
SCHEMA_FIELD_NUMBER: _ClassVar[int]
COLLECTIONID_FIELD_NUMBER: _ClassVar[int]
Expand All @@ -229,6 +229,7 @@ class DescribeCollectionResponse(_message.Message):
PROPERTIES_FIELD_NUMBER: _ClassVar[int]
DB_NAME_FIELD_NUMBER: _ClassVar[int]
NUM_PARTITIONS_FIELD_NUMBER: _ClassVar[int]
DB_ID_FIELD_NUMBER: _ClassVar[int]
status: _common_pb2.Status
schema: _schema_pb2.CollectionSchema
collectionID: int
Expand All @@ -244,7 +245,8 @@ class DescribeCollectionResponse(_message.Message):
properties: _containers.RepeatedCompositeFieldContainer[_common_pb2.KeyValuePair]
db_name: str
num_partitions: int
def __init__(self, status: _Optional[_Union[_common_pb2.Status, _Mapping]] = ..., schema: _Optional[_Union[_schema_pb2.CollectionSchema, _Mapping]] = ..., collectionID: _Optional[int] = ..., virtual_channel_names: _Optional[_Iterable[str]] = ..., physical_channel_names: _Optional[_Iterable[str]] = ..., created_timestamp: _Optional[int] = ..., created_utc_timestamp: _Optional[int] = ..., shards_num: _Optional[int] = ..., aliases: _Optional[_Iterable[str]] = ..., start_positions: _Optional[_Iterable[_Union[_common_pb2.KeyDataPair, _Mapping]]] = ..., consistency_level: _Optional[_Union[_common_pb2.ConsistencyLevel, str]] = ..., collection_name: _Optional[str] = ..., properties: _Optional[_Iterable[_Union[_common_pb2.KeyValuePair, _Mapping]]] = ..., db_name: _Optional[str] = ..., num_partitions: _Optional[int] = ...) -> None: ...
db_id: int
def __init__(self, status: _Optional[_Union[_common_pb2.Status, _Mapping]] = ..., schema: _Optional[_Union[_schema_pb2.CollectionSchema, _Mapping]] = ..., collectionID: _Optional[int] = ..., virtual_channel_names: _Optional[_Iterable[str]] = ..., physical_channel_names: _Optional[_Iterable[str]] = ..., created_timestamp: _Optional[int] = ..., created_utc_timestamp: _Optional[int] = ..., shards_num: _Optional[int] = ..., aliases: _Optional[_Iterable[str]] = ..., start_positions: _Optional[_Iterable[_Union[_common_pb2.KeyDataPair, _Mapping]]] = ..., consistency_level: _Optional[_Union[_common_pb2.ConsistencyLevel, str]] = ..., collection_name: _Optional[str] = ..., properties: _Optional[_Iterable[_Union[_common_pb2.KeyValuePair, _Mapping]]] = ..., db_name: _Optional[str] = ..., num_partitions: _Optional[int] = ..., db_id: _Optional[int] = ...) -> None: ...

class LoadCollectionRequest(_message.Message):
__slots__ = ("base", "db_name", "collection_name", "replica_number", "resource_groups", "refresh")
Expand Down Expand Up @@ -1883,6 +1885,18 @@ class ListDatabasesResponse(_message.Message):
created_timestamp: _containers.RepeatedScalarFieldContainer[int]
def __init__(self, status: _Optional[_Union[_common_pb2.Status, _Mapping]] = ..., db_names: _Optional[_Iterable[str]] = ..., created_timestamp: _Optional[_Iterable[int]] = ...) -> None: ...

class AlterDatabaseRequest(_message.Message):
__slots__ = ("base", "db_name", "db_id", "properties")
BASE_FIELD_NUMBER: _ClassVar[int]
DB_NAME_FIELD_NUMBER: _ClassVar[int]
DB_ID_FIELD_NUMBER: _ClassVar[int]
PROPERTIES_FIELD_NUMBER: _ClassVar[int]
base: _common_pb2.MsgBase
db_name: str
db_id: str
properties: _containers.RepeatedCompositeFieldContainer[_common_pb2.KeyValuePair]
def __init__(self, base: _Optional[_Union[_common_pb2.MsgBase, _Mapping]] = ..., db_name: _Optional[str] = ..., db_id: _Optional[str] = ..., properties: _Optional[_Iterable[_Union[_common_pb2.KeyValuePair, _Mapping]]] = ...) -> None: ...

class ReplicateMessageRequest(_message.Message):
__slots__ = ("base", "channel_name", "BeginTs", "EndTs", "Msgs", "StartPositions", "EndPositions")
BASE_FIELD_NUMBER: _ClassVar[int]
Expand Down
33 changes: 33 additions & 0 deletions pymilvus/grpc_gen/milvus_pb2_grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,11 @@ def __init__(self, channel):
request_serializer=milvus__pb2.ListDatabasesRequest.SerializeToString,
response_deserializer=milvus__pb2.ListDatabasesResponse.FromString,
)
self.AlterDatabase = channel.unary_unary(
'/milvus.proto.milvus.MilvusService/AlterDatabase',
request_serializer=milvus__pb2.AlterDatabaseRequest.SerializeToString,
response_deserializer=common__pb2.Status.FromString,
)
self.ReplicateMessage = channel.unary_unary(
'/milvus.proto.milvus.MilvusService/ReplicateMessage',
request_serializer=milvus__pb2.ReplicateMessageRequest.SerializeToString,
Expand Down Expand Up @@ -946,6 +951,12 @@ def ListDatabases(self, request, context):
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')

def AlterDatabase(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')

def ReplicateMessage(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
Expand Down Expand Up @@ -1370,6 +1381,11 @@ def add_MilvusServiceServicer_to_server(servicer, server):
request_deserializer=milvus__pb2.ListDatabasesRequest.FromString,
response_serializer=milvus__pb2.ListDatabasesResponse.SerializeToString,
),
'AlterDatabase': grpc.unary_unary_rpc_method_handler(
servicer.AlterDatabase,
request_deserializer=milvus__pb2.AlterDatabaseRequest.FromString,
response_serializer=common__pb2.Status.SerializeToString,
),
'ReplicateMessage': grpc.unary_unary_rpc_method_handler(
servicer.ReplicateMessage,
request_deserializer=milvus__pb2.ReplicateMessageRequest.FromString,
Expand Down Expand Up @@ -2796,6 +2812,23 @@ def ListDatabases(request,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

@staticmethod
def AlterDatabase(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/milvus.proto.milvus.MilvusService/AlterDatabase',
milvus__pb2.AlterDatabaseRequest.SerializeToString,
common__pb2.Status.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

@staticmethod
def ReplicateMessage(request,
target,
Expand Down
Loading

0 comments on commit f2fac2b

Please sign in to comment.