Open nbastin opened 8 months ago
From a quick look, get_ip_addr_ssh()
seems to contain some institutional knowledge that I do not have. Will ask around.
Also it sounds like it might be a good idea to run mypy against fablib. mypy fabrictestbed_extensions/fablib/interface.py
do report several issues.
Interface.get_ip_addr_ssh
claims to return a string, but might return a list or dictionary.Interface.get_ip_addr
has an undocumented return, and ostensibly could return either anip_address
object or a string (falling back toget_ip_addr_ssh
), but realistically could return any python object, since there's no gatekeeping on the contents of fablib_data[self.ADDR].Interface.get_ips
returns a list of anything, although oddly it often returns an empty list, even when the other methods work.This means that a client either has to implement a rich type-inspection-and-handling regime, or more realistically, just ignore
Interface
andNode
and implement everything themselves.