'Gets the network interface info by ip.'

def get_if_info_by_ip(self, ip):

    net_if_iter = netapp_api.NaElement('net-interface-get-iter')
    net_if_iter.add_new_child('max-records', '10')
    query = netapp_api.NaElement('query')
    net_if_iter.add_child_elem(query)
    query.add_node_with_children('net-interface-info', **{'address': na_utils.resolve_hostname(ip)})
    result = self.connection.invoke_successfully(net_if_iter, True)
    num_records = result.get_child_content('num-records')
    if (num_records and (int(num_records) >= 1)):
        attr_list = result.get_child_by_name('attributes-list')
        return attr_list.get_children()
    raise exception.NotFound((_('No    interface    found    on    cluster    for    ip    %s') % ip))
