'Utility function to get instances for the IP filtering tests.'

def _get_ip_filtering_instances(self):

    info = [{'address': 'aa:bb:cc:dd:ee:ff', 'id': 1, 'network': {'bridge': 'br0', 'id': 1, 'label': 'private', 'subnets': [{'cidr': '192.168.0.0/24', 'ips': [{'address': '192.168.0.10', 'type': 'fixed'}, {'address': '192.168.0.11', 'type': 'fixed'}]}]}}, {'address': 'aa:bb:cc:dd:ee:ff', 'id': 2, 'network': {'bridge': 'br1', 'id': 2, 'label': 'private', 'subnets': [{'cidr': '192.164.0.0/24', 'ips': [{'address': '192.164.0.10', 'type': 'fixed'}]}]}}]
    info1 = objects.InstanceInfoCache(network_info=jsonutils.dumps(info))
    inst1 = objects.Instance(id=1, info_cache=info1)
    info[0]['network']['subnets'][0]['ips'][0]['address'] = '192.168.0.20'
    info[0]['network']['subnets'][0]['ips'][1]['address'] = '192.168.0.21'
    info[1]['network']['subnets'][0]['ips'][0]['address'] = '192.164.0.20'
    info2 = objects.InstanceInfoCache(network_info=jsonutils.dumps(info))
    inst2 = objects.Instance(id=2, info_cache=info2)
    return objects.InstanceList(objects=[inst1, inst2])
