Closed marvinjuette closed 3 years ago
@marvinjuette you can boild down the code to
def get_host_name(self, mac_address):
return self.get_specific_host_entry(mac_address)['NewHostName']
and leave the error-handling to the caller, who can decide what to do. Does this code return meaningfull devicenames where the other service get_generic_host_entry
just returns generic names? I've not tested this so far.
@kbr I created this method because generic_host_entry uses the index of the host in order to display all the data. And I want to get the hostname just from a mac.
@kbr updated my code.
Add get_host_name method for easy access of the device name.
Known Issues: Sometimes get_specifiy_host_entry returns nothing and host is empty, but this occurred only when the repeaters mac was checked. But I already created an issue ( #74 ) because of some problems with repeaters.