Ejemplo n.º 1
0
 def to_proto(self) -> core_pb2.MoveNodesRequest:
     position = self.position.to_proto() if self.position else None
     geo = self.geo.to_proto() if self.geo else None
     return core_pb2.MoveNodesRequest(
         session_id=self.session_id,
         node_id=self.node_id,
         source=self.source,
         position=position,
         geo=geo,
     )
Ejemplo n.º 2
0
    def test_move_nodes_exception(self, grpc_server: CoreGrpcServer):
        # given
        client = CoreGrpcClient()
        session = grpc_server.coreemu.create_session()
        streamer = MoveNodesStreamer(session.id)
        request = core_pb2.MoveNodesRequest()
        streamer.send(request)
        streamer.stop()

        # then
        with pytest.raises(grpc.RpcError):
            with client.context_connect():
                client.move_nodes(streamer)
Ejemplo n.º 3
0
 def move_iter():
     yield core_pb2.MoveNodesRequest()
Ejemplo n.º 4
0
 def move_iter():
     yield core_pb2.MoveNodesRequest(
         session_id=session.id,
         node_id=node.id,
         geo=core_pb2.Geo(lon=lon, lat=lat, alt=alt),
     )
Ejemplo n.º 5
0
 def move_iter():
     yield core_pb2.MoveNodesRequest(
         session_id=session.id,
         node_id=node.id,
         position=core_pb2.Position(x=x, y=y),
     )