From 0cb30c8412385982e5af856e7dc90609c0ad9760 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Thu, 1 Mar 2018 11:50:46 -0800 Subject: mpm: net: Add get_hostname() --- mpm/python/usrp_mpm/sys_utils/net.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'mpm/python/usrp_mpm/sys_utils') diff --git a/mpm/python/usrp_mpm/sys_utils/net.py b/mpm/python/usrp_mpm/sys_utils/net.py index 1b6ddd2c1..61b9f2c91 100644 --- a/mpm/python/usrp_mpm/sys_utils/net.py +++ b/mpm/python/usrp_mpm/sys_utils/net.py @@ -12,6 +12,9 @@ from six import iteritems from pyroute2 import IPRoute, IPDB from usrp_mpm.mpmlog import get_logger +def get_hostname(): + """Return the current device's hostname""" + return socket.gethostname() def get_valid_interfaces(iface_list): """ -- cgit v1.2.3