grpc create session can now specify id, updated all session proto to use SessionState for state, added suite for session testing for grpc
This commit is contained in:
parent
3498a59ed5
commit
1f3e72e014
5 changed files with 130 additions and 11 deletions
|
@ -44,8 +44,9 @@ class CoreGrpcClient(object):
|
|||
self.stub = None
|
||||
self.channel = None
|
||||
|
||||
def create_session(self):
|
||||
return self.stub.CreateSession(core_pb2.CreateSessionRequest())
|
||||
def create_session(self, _id=None):
|
||||
request = core_pb2.CreateSessionRequest(id=_id)
|
||||
return self.stub.CreateSession(request)
|
||||
|
||||
def delete_session(self, _id):
|
||||
request = core_pb2.DeleteSessionRequest()
|
||||
|
|
|
@ -256,7 +256,7 @@ class CoreGrpcServer(core_pb2_grpc.CoreApiServicer):
|
|||
|
||||
def CreateSession(self, request, context):
|
||||
logging.debug("create session: %s", request)
|
||||
session = self.coreemu.create_session()
|
||||
session = self.coreemu.create_session(request.id)
|
||||
session.set_state(EventTypes.DEFINITION_STATE)
|
||||
|
||||
# default set session location
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue