2026-02-05 17:38:52,193 - INFO - Domain Default found not creating 2026-02-05 17:38:52,579 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-26107289 not found, creating it 2026-02-05 17:38:53,229 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-26107289, ID : cd27ea15-a23d-427a-bcda-c17f5d84e96b 2026-02-05 17:38:55,164 - INFO - ================================================================================ 2026-02-05 17:38:55,164 - INFO - STARTING TEST : test_remove_policy_with_ref 2026-02-05 17:38:55,471 - DEBUG - Nothing to compare xmpp stats {'10.0.0.50': {'10.20.0.17': '0'}} with 2026-02-05 17:38:55,472 - INFO - Initial checks done. Running the testcase now 2026-02-05 17:38:55,472 - INFO - 2026-02-05 17:38:55,472 - INFO - ================================================================================ 2026-02-05 17:38:55,472 - INFO - STARTING TEST : test_remove_policy_with_ref 2026-02-05 17:38:55,472 - INFO - TEST DESCRIPTION : This tests the following scenarios. 1. Test to validate that policy removal will fail when it referenced with VN. 2. validate vn_policy data in api-s against quantum-vn data, when created and unbind policy from VN thru quantum APIs. 3. validate policy data in api-s against quantum-policy data, when created and deleted thru quantum APIs. 2026-02-05 17:38:55,786 - DEBUG - Nothing to compare xmpp stats {'10.0.0.50': {'10.20.0.17': '0'}} with 2026-02-05 17:38:55,786 - INFO - Initial checks done. Running the testcase now 2026-02-05 17:38:55,786 - INFO - 2026-02-05 17:38:56,195 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-26107289:ctest-vn4-92933660, security_group = None, network_policy = None, subnet_list = []], src_ports = [start_port = -1, end_port = -1], application = [], dst_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-26107289:ctest-vn4-92933660, security_group = None, network_policy = None, subnet_list = []], dst_ports = [start_port = -1, end_port = -1], action_list = simple_action = pass, gateway_name = None, apply_service = [], service_properties = None, mirror_to = None, assign_routing_instance = None, log = False, alert = False, qos_action = None, host_based_service = False, ethertype = None, created = None, last_modified = None, description = None, rule_sequence = None, rule_uuid = None, direction = <>, protocol = 58, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-26107289:ctest-vn4-92933660, security_group = None, network_policy = None, subnet_list = []], src_ports = [start_port = -1, end_port = -1], application = [], dst_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-26107289:ctest-vn4-92933660, security_group = None, network_policy = None, subnet_list = []], dst_ports = [start_port = -1, end_port = -1], action_list = simple_action = pass, gateway_name = None, apply_service = [], service_properties = None, mirror_to = None, assign_routing_instance = None, log = False, alert = False, qos_action = None, host_based_service = False, ethertype = None, created = None, last_modified = None, description = None] 2026-02-05 17:38:56,937 - DEBUG - Response for create_network : {'network': {'id': '89d4feaa-ce7f-4a75-ab91-9a7e28ed01c6', 'name': 'ctest-vn4-92933660', 'tenant_id': 'cd27ea15a23d427abcdac17f5d84e96b', 'project_id': 'cd27ea15a23d427abcdac17f5d84e96b', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-26107289', 'ctest-vn4-92933660'], 'port_security_enabled': True, 'description': ''}} 2026-02-05 17:38:57,204 - DEBUG - Response for create_subnet : {'subnet': {'id': '85ab46ac-c0f6-47c6-96a9-846fb3782a34', 'name': '', 'tenant_id': 'cd27ea15a23d427abcdac17f5d84e96b', 'network_id': '89d4feaa-ce7f-4a75-ab91-9a7e28ed01c6', 'ip_version': 4, 'cidr': '170.80.139.128/26', 'allocation_pools': [{'start': '170.80.139.130', 'end': '170.80.139.190'}], 'gateway_ip': '170.80.139.129', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '170.80.139.130', 'tags': [], 'project_id': 'cd27ea15a23d427abcdac17f5d84e96b'}} 2026-02-05 17:38:57,442 - DEBUG - Response for create_subnet : {'subnet': {'id': '71307ae2-9480-4b57-b0e1-56f77c8c2537', 'name': '', 'tenant_id': 'cd27ea15a23d427abcdac17f5d84e96b', 'network_id': '89d4feaa-ce7f-4a75-ab91-9a7e28ed01c6', 'ip_version': 6, 'cidr': '297b:7b7b:eaf1:2d90:1b48:98bd::/96', 'allocation_pools': [{'start': '297b:7b7b:eaf1:2d90:1b48:98bd:0:2', 'end': '297b:7b7b:eaf1:2d90:1b48:98bd:ffff:fffe'}], 'gateway_ip': '297b:7b7b:eaf1:2d90:1b48:98bd:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '297b:7b7b:eaf1:2d90:1b48:98bd:0:2', 'tags': [], 'project_id': 'cd27ea15a23d427abcdac17f5d84e96b'}} 2026-02-05 17:38:57,471 - INFO - Created VN ctest-vn4-92933660 2026-02-05 17:38:57,527 - DEBUG - VN ctest-vn4-92933660 UUID is 89d4feaa-ce7f-4a75-ab91-9a7e28ed01c6 2026-02-05 17:38:57,821 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': '89d4feaa-ce7f-4a75-ab91-9a7e28ed01c6', 'name': 'ctest-vn4-92933660', 'tenant_id': 'cd27ea15a23d427abcdac17f5d84e96b', 'project_id': 'cd27ea15a23d427abcdac17f5d84e96b', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['85ab46ac-c0f6-47c6-96a9-846fb3782a34', '71307ae2-9480-4b57-b0e1-56f77c8c2537'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-26107289', 'ctest-vn4-92933660'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-26107289', 'ctest-policy1-60566610']], 'subnet_ipam': [{'subnet_cidr': '170.80.139.128/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '297b:7b7b:eaf1:2d90:1b48:98bd::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2026-02-05 17:38:57,991 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2026-02-05 17:38:58,317 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2026-02-05 17:38:58,361 - DEBUG - Requesting: http://10.0.0.50:8082/domain/95764fa1-47f3-423c-9a8f-8b9a49e5a97c 2026-02-05 17:38:58,389 - DEBUG - Requesting: http://10.0.0.50:8082/project/cd27ea15-a23d-427a-bcda-c17f5d84e96b 2026-02-05 17:38:58,497 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/89d4feaa-ce7f-4a75-ab91-9a7e28ed01c6 2026-02-05 17:38:58,515 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/89d4feaa-ce7f-4a75-ab91-9a7e28ed01c6 2026-02-05 17:38:58,528 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/bd12da79-4aaa-4dea-b9be-1a324760e261 2026-02-05 17:38:58,536 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/bd12da79-4aaa-4dea-b9be-1a324760e261 2026-02-05 17:38:58,544 - DEBUG - Requesting: http://10.0.0.50:8082/route-target/0d1b0f95-b6d6-47be-a6a6-896d18f01a0c 2026-02-05 17:38:58,554 - DEBUG - Route Targets: ['target:64512:8000004'] 2026-02-05 17:38:58,554 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/89d4feaa-ce7f-4a75-ab91-9a7e28ed01c6 2026-02-05 17:38:58,566 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/bd12da79-4aaa-4dea-b9be-1a324760e261 2026-02-05 17:38:58,588 - INFO - Verified VN network id 11 for VN 89d4feaa-ce7f-4a75-ab91-9a7e28ed01c6 2026-02-05 17:38:58,588 - INFO - Verifications in API Server for VN ctest-vn4-92933660 passed 2026-02-05 17:38:58,588 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/89d4feaa-ce7f-4a75-ab91-9a7e28ed01c6 2026-02-05 17:38:58,600 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/bd12da79-4aaa-4dea-b9be-1a324760e261 2026-02-05 17:38:58,610 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/bd12da79-4aaa-4dea-b9be-1a324760e261 2026-02-05 17:38:58,618 - DEBUG - Requesting: http://10.0.0.50:8082/route-target/0d1b0f95-b6d6-47be-a6a6-896d18f01a0c 2026-02-05 17:38:58,632 - DEBUG - Control-node 10.0.0.50 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-26107289:ctest-vn4-92933660', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-26107289', 'owner-access': '7', 'group': 'reader', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '9931843087821130357', 'uuid-lslong': '12362832318751900102'}, 'enable': 'true', 'created': '2026-02-05T17:38:56', 'last-modified': '2026-02-05T17:38:57', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.854710'} 2026-02-05 17:38:58,643 - DEBUG - Route Targets: ['target:64512:8000004'] 2026-02-05 17:38:58,643 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-92933660 passed 2026-02-05 17:38:58,643 - DEBUG - ====Verifying policy data for ctest-vn4-92933660 in API_Server ====== 2026-02-05 17:38:58,643 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2026-02-05 17:38:58,649 - DEBUG - Requesting: http://10.0.0.50:8082/domain/95764fa1-47f3-423c-9a8f-8b9a49e5a97c 2026-02-05 17:38:58,662 - DEBUG - Requesting: http://10.0.0.50:8082/project/cd27ea15-a23d-427a-bcda-c17f5d84e96b 2026-02-05 17:38:58,742 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/89d4feaa-ce7f-4a75-ab91-9a7e28ed01c6 2026-02-05 17:38:58,755 - DEBUG - ==>Verifying data for policy with id: 9ab7b791-5deb-47ec-92c9-43623bf8e3c1, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-26107289', 'ctest-policy1-60566610'] 2026-02-05 17:38:58,755 - INFO - VN ctest-vn4-92933660 Policy verification: verify_vn_policy_in_api_server, status: True 2026-02-05 17:38:58,755 - DEBUG - Verifying the vn in opserver 2026-02-05 17:38:58,755 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-26107289:ctest-vn4-92933660 virtual network link through opserver 10.0.0.50 2026-02-05 17:38:58,755 - DEBUG - Requesting: http://10.0.0.50:8081/analytics/uves/virtual-networks 2026-02-05 17:38:59,058 - DEBUG - Requesting: http://10.0.0.50:8081/analytics/uves/virtual-networks 2026-02-05 17:38:59,144 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-26107289:ctest-vn4-92933660', 'href': 'http://10.0.0.50:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-26107289:ctest-vn4-92933660?flat'} 2026-02-05 17:38:59,144 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-26107289:ctest-vn4-92933660 is found in opserver 2026-02-05 17:38:59,159 - DEBUG - Do not have enough data to verify VN in agent 2026-02-05 17:38:59,170 - DEBUG - VRF ids for VN ctest-vn4-92933660: {} 2026-02-05 17:38:59,172 - DEBUG - ====Verifying data for ctest-policy1-60566610 in API_Server ====== 2026-02-05 17:38:59,172 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2026-02-05 17:38:59,181 - DEBUG - Requesting: http://10.0.0.50:8082/domain/95764fa1-47f3-423c-9a8f-8b9a49e5a97c 2026-02-05 17:38:59,204 - DEBUG - Requesting: http://10.0.0.50:8082/project/cd27ea15-a23d-427a-bcda-c17f5d84e96b 2026-02-05 17:38:59,288 - DEBUG - Requesting: http://10.0.0.50:8082/network-policy/9ab7b791-5deb-47ec-92c9-43623bf8e3c1 2026-02-05 17:38:59,300 - INFO - Verified policy ctest-policy1-60566610 in API Server, Result: True 2026-02-05 17:38:59,300 - INFO - Done with setup and verification, moving onto test .. 2026-02-05 17:38:59,309 - INFO - Deleting VN ctest-vn4-92933660 2026-02-05 17:38:59,448 - DEBUG - Response for deleting network () 2026-02-05 17:38:59,448 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/bd12da79-4aaa-4dea-b9be-1a324760e261 2026-02-05 17:38:59,453 - DEBUG - Response Code: 404 2026-02-05 17:38:59,454 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2026-02-05 17:38:59,459 - DEBUG - Requesting: http://10.0.0.50:8082/domain/95764fa1-47f3-423c-9a8f-8b9a49e5a97c 2026-02-05 17:38:59,516 - DEBUG - Requesting: http://10.0.0.50:8082/project/cd27ea15-a23d-427a-bcda-c17f5d84e96b 2026-02-05 17:38:59,603 - INFO - Validated that VN ctest-vn4-92933660 is not found in API Server 2026-02-05 17:38:59,616 - DEBUG - VN ctest-vn4-92933660 is not present in Agent 10.0.0.50 2026-02-05 17:38:59,616 - INFO - Validated that VN ctest-vn4-92933660 is not in any agent 2026-02-05 17:38:59,637 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-92933660 info 2026-02-05 17:38:59,668 - INFO - Deleted policy ctest-policy1-60566610 2026-02-05 17:38:59,847 - DEBUG - policy ctest-policy1-60566610 is not found in API Server 2026-02-05 17:39:00,126 - DEBUG - No XMPP flaps were noticed during the test 2026-02-05 17:39:00,126 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:05] 2026-02-05 17:39:00,126 - INFO - -------------------------------------------------------------------------------- 2026-02-05 17:39:00,440 - DEBUG - No XMPP flaps were noticed during the test 2026-02-05 17:39:00,440 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:05] 2026-02-05 17:39:00,440 - INFO - -------------------------------------------------------------------------------- 2026-02-05 17:39:01,252 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-26107289, ID : cd27ea15-a23d-427a-bcda-c17f5d84e96b