grpc: added call to stream node movements using geo/xy and tests to validate usage, fixed potential exception when not setting session geo ref and using conversions
This commit is contained in:
parent
e323f8965e
commit
1884103cb4
5 changed files with 132 additions and 4 deletions
|
@ -5,7 +5,7 @@ gRpc client for interfacing with CORE, when gRPC mode is enabled.
|
|||
import logging
|
||||
import threading
|
||||
from contextlib import contextmanager
|
||||
from typing import Any, Callable, Dict, Generator, List
|
||||
from typing import Any, Callable, Dict, Generator, Iterable, List
|
||||
|
||||
import grpc
|
||||
import netaddr
|
||||
|
@ -571,6 +571,17 @@ class CoreGrpcClient:
|
|||
)
|
||||
return self.stub.EditNode(request)
|
||||
|
||||
def move_nodes(
|
||||
self, move_iterator: Iterable[core_pb2.MoveNodesRequest]
|
||||
) -> core_pb2.MoveNodesResponse:
|
||||
"""
|
||||
Stream node movements using the provided iterator.
|
||||
|
||||
:param move_iterator: iterator for generating node movements
|
||||
:return: move nodes response
|
||||
"""
|
||||
return self.stub.MoveNodes(move_iterator)
|
||||
|
||||
def delete_node(self, session_id: int, node_id: int) -> core_pb2.DeleteNodeResponse:
|
||||
"""
|
||||
Delete node from session.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue