added grpc call to allow direct control of nodes connected through wlan to be linked or not

This commit is contained in:
Blake Harnden 2020-05-19 16:46:44 -07:00
parent 8bae0611a4
commit d14056393b
5 changed files with 65 additions and 6 deletions

View file

@ -88,6 +88,8 @@ from core.api.grpc.wlan_pb2 import (
GetWlanConfigsResponse,
SetWlanConfigRequest,
SetWlanConfigResponse,
SetWlanLinkRequest,
SetWlanLinkResponse,
WlanConfig,
)
@ -1204,6 +1206,18 @@ class CoreGrpcClient:
request = ExecuteScriptRequest(script=script)
return self.stub.ExecuteScript(request)
def set_wlan_link(
self, session_id: int, wlan: int, node_one: int, node_two: int, linked: bool
) -> SetWlanLinkResponse:
request = SetWlanLinkRequest(
session_id=session_id,
wlan=wlan,
node_one=node_one,
node_two=node_two,
linked=linked,
)
return self.stub.SetWlanLink(request)
def connect(self) -> None:
"""
Open connection to server, must be closed manually.