From 769572de02f412404510e397ddcb4c18141273fa Mon Sep 17 00:00:00 2001 From: Blake Harnden <32446120+bharnden@users.noreply.github.com> Date: Tue, 7 Jan 2020 12:03:51 -0800 Subject: [PATCH] added get_interfaces to grpc client --- daemon/core/api/grpc/client.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/daemon/core/api/grpc/client.py b/daemon/core/api/grpc/client.py index 9aa99349..32123f78 100644 --- a/daemon/core/api/grpc/client.py +++ b/daemon/core/api/grpc/client.py @@ -2,8 +2,6 @@ gRpc client for interfacing with CORE, when gRPC mode is enabled. """ -from __future__ import print_function - import logging import threading from contextlib import contextmanager @@ -1020,6 +1018,16 @@ class CoreGrpcClient: ) return self.stub.EmaneLink(request) + def get_interfaces(self): + """ + Retrieves a list of interfaces available on the host machine that are not + a part of a CORE session. + + :return: core_pb2.GetInterfacesResponse + """ + request = core_pb2.GetInterfacesRequest() + return self.stub.GetInterfaces(request) + def connect(self): """ Open connection to server, must be closed manually.