1
0
mirror of https://github.com/ARM-software/devlib.git synced 2024-10-05 18:30:50 +01:00

target: Expose hostname as target property

This commit is contained in:
Marc Bonnici 2021-04-07 17:27:47 +01:00 committed by setrofim
parent 2a633b783a
commit 82a2f7d8b6

View File

@ -139,6 +139,10 @@ class Target(object):
def hostid(self): def hostid(self):
return int(self.execute('{} hostid'.format(self.busybox)).strip(), 16) return int(self.execute('{} hostid'.format(self.busybox)).strip(), 16)
@property
def hostname(self):
return self.execute('{} hostname'.format(self.busybox)).strip()
@property @property
def os_version(self): # pylint: disable=no-self-use def os_version(self): # pylint: disable=no-self-use
return {} return {}