Merge pull request #330 from coreemu/feature/grpc-interfaces

added get_interfaces to grpc client
This commit is contained in:
bharnden 2020-01-07 12:11:43 -08:00 committed by GitHub
commit 607e88585c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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.