'Checks whether ip is on the same filer.'

def _is_filer_ip(self, ip):

    try:
        ifconfig = self.zapi_client.get_ifconfig()
        if_info = ifconfig.get_child_by_name('interface-config-info')
        if if_info:
            ifs = if_info.get_children()
            for intf in ifs:
                v4_addr = intf.get_child_by_name('v4-primary-address')
                if v4_addr:
                    ip_info = v4_addr.get_child_by_name('ip-address-info')
                    if ip_info:
                        address = ip_info.get_child_content('address')
                        if (ip == address):
                            return True
                        else:
                            continue
    except Exception:
        return False
    return False
