Description of problem: get_name() called for HostNIC object which was returned by get_slaves() returns None regardless NIC has name or not. Example: bond_nics = [slave.host_nic for slave in [nic.get_bonding().slaves for nic in hostnics if nic.get_bonding()]] merged_nics = list(itertools.chain.from_iterable(bond_nics)) print [nic.get_name() for nic in merged_nics] ## OUTPUT [None, None] Workaround: bond_nics = [slave.host_nic for slave in [nic.get_bonding().slaves for nic in hostnics if nic.get_bonding()]] merged_nics = list(itertools.chain.from_iterable(bond_nics)) bond_slaves_names = [host.nics.get(id = nic.get_id()).get_name() for nic in merged_nics] print bond_slaves_names ## OUTPUT: ['ens8', 'ens9'] Version-Release number of selected component (if applicable): rhevm-sdk-python-3.5.2.1-1.el6ev.noarch How reproducible: 100% Actual results: See desctiption Additional info:
The Python SDK is returning a Python object with the same content that the RESTAPI server returned, so this isn't a Python SDK issue. In this particular case the object returned by the RESTAPI doesn't contain the full representation of the slave NICs, just a link, as the complete representation is already available in another place.