def check_network_addresses_not_match_subnet_and_broadcast(self):
        for n in self.networks:
            if n['meta']['notation'] == 'ip_ranges':
                cidr = netaddr.IPNetwork(n['cidr']).cidr
                if n.get('gateway'):
                    gw = netaddr.IPAddress(n['gateway'])
                    if gw == cidr.network or gw == cidr.broadcast:
                        self.err_msgs.append(
                            u"{0} network gateway address is equal to either "
                            u"subnet address or broadcast address "
                            u"of the network.".format(n["name"])
                        )
                        self.result.append({"ids": [int(n["id"])],
                                            "errors": ["gateway"]})
                if n.get('ip_ranges'):
                    for r in n['ip_ranges']:
                        ipr = netaddr.IPRange(r[0], r[1])
                        if cidr.network in ipr or cidr.broadcast in ipr:
                            self.err_msgs.append(
                                u"{0} network IP range [{1}] intersect with "
                                u"either subnet address or broadcast address "
                                u"of the network.".format(n["name"], str(ipr))
                            )
                            self.result.append({"ids": [int(n["id"])],
                                                "errors": ["ip_ranges"]})
        flt_range = self.network_config['floating_ranges']
        for r in flt_range:
            ipr = netaddr.IPRange(r[0], r[1])
            if cidr.network in ipr or cidr.broadcast in ipr:
                self.err_msgs.append(
                    u"{0} network floating IP range [{1}] intersect "
                    u"with either subnet address or broadcast address "
                    u"of the network.".format(n["name"], str(ipr))
                )
                self.result.append({"ids": [int(n["id"])],
                                    "errors": ["ip_ranges"]})
        self.expose_error_messages()
Network shouldn't intersect with subnetwork and broadcast
dataset/ETHPy150Open openstack/fuel-web/nailgun/nailgun/extensions/network_manager/checker.py/NetworkCheck.check_network_addresses_not_match_subnet_and_broadcast