grpc: updates to wrapper classes to help write client code in a more simple way using the consolidated api, updated examples to used the wrapped client

This commit is contained in:
Blake Harnden 2021-05-03 15:25:18 -07:00
parent 38e162aec5
commit 917c45e70b
8 changed files with 196 additions and 235 deletions

View file

@ -352,6 +352,10 @@ class CoreGrpcClient:
response = self.stub.StopSession(request)
return response.result
def add_session(self, session_id: int = None) -> wrappers.Session:
session_id = self.create_session(session_id)
return self.get_session(session_id)
def create_session(self, session_id: int = None) -> int:
"""
Create a session.