2026-04-20 12:10:24,331 - INFO - Domain Default found not creating 2026-04-20 12:10:24,518 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-70908744 not found, creating it 2026-04-20 12:10:25,010 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-70908744, ID : face5b23-815a-4ff8-a18c-e36f5682f0a8 2026-04-20 12:10:26,579 - INFO - ================================================================================ 2026-04-20 12:10:26,580 - INFO - STARTING TEST : test_remove_policy_with_ref 2026-04-20 12:10:26,836 - DEBUG - Nothing to compare xmpp stats {'10.0.0.50': {'10.20.0.17': '0'}} with 2026-04-20 12:10:26,836 - INFO - Initial checks done. Running the testcase now 2026-04-20 12:10:26,836 - INFO - 2026-04-20 12:10:26,836 - INFO - ================================================================================ 2026-04-20 12:10:26,837 - INFO - STARTING TEST : test_remove_policy_with_ref 2026-04-20 12:10:26,837 - 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-04-20 12:10:27,135 - DEBUG - Nothing to compare xmpp stats {'10.0.0.50': {'10.20.0.17': '0'}} with 2026-04-20 12:10:27,135 - INFO - Initial checks done. Running the testcase now 2026-04-20 12:10:27,136 - INFO - 2026-04-20 12:10:27,504 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-70908744:ctest-vn4-83215339, 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-70908744:ctest-vn4-83215339, 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-70908744:ctest-vn4-83215339, 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-70908744:ctest-vn4-83215339, 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-04-20 12:10:28,061 - DEBUG - Response for create_network : {'network': {'id': '4c38b2ff-0fe6-4f70-b7b1-48ba67ae886c', 'name': 'ctest-vn4-83215339', 'tenant_id': 'face5b23815a4ff8a18ce36f5682f0a8', 'project_id': 'face5b23815a4ff8a18ce36f5682f0a8', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-70908744', 'ctest-vn4-83215339'], 'port_security_enabled': True, 'description': ''}} 2026-04-20 12:10:28,302 - DEBUG - Response for create_subnet : {'subnet': {'id': 'a8764f85-0358-4ba8-8489-bfff7bbf37c1', 'name': '', 'tenant_id': 'face5b23815a4ff8a18ce36f5682f0a8', 'network_id': '4c38b2ff-0fe6-4f70-b7b1-48ba67ae886c', 'ip_version': 4, 'cidr': '98.24.87.64/26', 'allocation_pools': [{'start': '98.24.87.66', 'end': '98.24.87.126'}], 'gateway_ip': '98.24.87.65', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '98.24.87.66', 'tags': [], 'project_id': 'face5b23815a4ff8a18ce36f5682f0a8'}} 2026-04-20 12:10:28,456 - DEBUG - Response for create_subnet : {'subnet': {'id': '1f06f061-40d9-4f5f-84e7-e6b600385427', 'name': '', 'tenant_id': 'face5b23815a4ff8a18ce36f5682f0a8', 'network_id': '4c38b2ff-0fe6-4f70-b7b1-48ba67ae886c', 'ip_version': 6, 'cidr': '2ce1:b867:dcb1:306f:bda9:417b::/96', 'allocation_pools': [{'start': '2ce1:b867:dcb1:306f:bda9:417b:0:2', 'end': '2ce1:b867:dcb1:306f:bda9:417b:ffff:fffe'}], 'gateway_ip': '2ce1:b867:dcb1:306f:bda9:417b:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '2ce1:b867:dcb1:306f:bda9:417b:0:2', 'tags': [], 'project_id': 'face5b23815a4ff8a18ce36f5682f0a8'}} 2026-04-20 12:10:28,481 - INFO - Created VN ctest-vn4-83215339 2026-04-20 12:10:28,538 - DEBUG - VN ctest-vn4-83215339 UUID is 4c38b2ff-0fe6-4f70-b7b1-48ba67ae886c 2026-04-20 12:10:28,778 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': '4c38b2ff-0fe6-4f70-b7b1-48ba67ae886c', 'name': 'ctest-vn4-83215339', 'tenant_id': 'face5b23815a4ff8a18ce36f5682f0a8', 'project_id': 'face5b23815a4ff8a18ce36f5682f0a8', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['a8764f85-0358-4ba8-8489-bfff7bbf37c1', '1f06f061-40d9-4f5f-84e7-e6b600385427'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-70908744', 'ctest-vn4-83215339'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-70908744', 'ctest-policy1-50924603']], 'subnet_ipam': [{'subnet_cidr': '98.24.87.64/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '2ce1:b867:dcb1:306f:bda9:417b::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2026-04-20 12:10:28,942 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2026-04-20 12:10:29,238 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2026-04-20 12:10:29,274 - DEBUG - Requesting: http://10.0.0.50:8082/domain/18a14f92-daf6-4052-b99b-1b0121998f5c 2026-04-20 12:10:29,288 - DEBUG - Requesting: http://10.0.0.50:8082/project/face5b23-815a-4ff8-a18c-e36f5682f0a8 2026-04-20 12:10:29,361 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/4c38b2ff-0fe6-4f70-b7b1-48ba67ae886c 2026-04-20 12:10:29,377 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/4c38b2ff-0fe6-4f70-b7b1-48ba67ae886c 2026-04-20 12:10:29,387 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/6762498e-e169-4931-aae5-ca1386d5f746 2026-04-20 12:10:29,395 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/6762498e-e169-4931-aae5-ca1386d5f746 2026-04-20 12:10:29,402 - DEBUG - Requesting: http://10.0.0.50:8082/route-target/ac2774f2-d4a3-4cd8-ac95-a77d43aa8d08 2026-04-20 12:10:29,409 - DEBUG - Route Targets: ['target:64512:8000004'] 2026-04-20 12:10:29,409 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/4c38b2ff-0fe6-4f70-b7b1-48ba67ae886c 2026-04-20 12:10:29,420 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/6762498e-e169-4931-aae5-ca1386d5f746 2026-04-20 12:10:29,436 - INFO - Verified VN network id 11 for VN 4c38b2ff-0fe6-4f70-b7b1-48ba67ae886c 2026-04-20 12:10:29,436 - INFO - Verifications in API Server for VN ctest-vn4-83215339 passed 2026-04-20 12:10:29,437 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/4c38b2ff-0fe6-4f70-b7b1-48ba67ae886c 2026-04-20 12:10:29,447 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/6762498e-e169-4931-aae5-ca1386d5f746 2026-04-20 12:10:29,455 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/6762498e-e169-4931-aae5-ca1386d5f746 2026-04-20 12:10:29,464 - DEBUG - Requesting: http://10.0.0.50:8082/route-target/ac2774f2-d4a3-4cd8-ac95-a77d43aa8d08 2026-04-20 12:10:29,478 - DEBUG - Control-node 10.0.0.50 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-70908744:ctest-vn4-83215339', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-70908744', 'owner-access': '7', 'group': 'reader', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '5492336554131476336', 'uuid-lslong': '13236440745259206764'}, 'enable': 'true', 'created': '2026-04-20T12:10:28', 'last-modified': '2026-04-20T12:10:28', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.736468'} 2026-04-20 12:10:29,484 - DEBUG - Route Targets: ['target:64512:8000004'] 2026-04-20 12:10:29,484 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-83215339 passed 2026-04-20 12:10:29,485 - DEBUG - ====Verifying policy data for ctest-vn4-83215339 in API_Server ====== 2026-04-20 12:10:29,485 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2026-04-20 12:10:29,491 - DEBUG - Requesting: http://10.0.0.50:8082/domain/18a14f92-daf6-4052-b99b-1b0121998f5c 2026-04-20 12:10:29,503 - DEBUG - Requesting: http://10.0.0.50:8082/project/face5b23-815a-4ff8-a18c-e36f5682f0a8 2026-04-20 12:10:29,575 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/4c38b2ff-0fe6-4f70-b7b1-48ba67ae886c 2026-04-20 12:10:29,586 - DEBUG - ==>Verifying data for policy with id: 6a433ce6-f8e5-4b94-a422-507500c21ba3, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-70908744', 'ctest-policy1-50924603'] 2026-04-20 12:10:29,586 - INFO - VN ctest-vn4-83215339 Policy verification: verify_vn_policy_in_api_server, status: True 2026-04-20 12:10:29,586 - DEBUG - Verifying the vn in opserver 2026-04-20 12:10:29,586 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-70908744:ctest-vn4-83215339 virtual network link through opserver 10.0.0.50 2026-04-20 12:10:29,586 - DEBUG - Requesting: http://10.0.0.50:8081/analytics/uves/virtual-networks 2026-04-20 12:10:29,882 - DEBUG - Requesting: http://10.0.0.50:8081/analytics/uves/virtual-networks 2026-04-20 12:10:29,948 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-70908744:ctest-vn4-83215339', 'href': 'http://10.0.0.50:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-70908744:ctest-vn4-83215339?flat'} 2026-04-20 12:10:29,948 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-70908744:ctest-vn4-83215339 is found in opserver 2026-04-20 12:10:29,958 - DEBUG - Do not have enough data to verify VN in agent 2026-04-20 12:10:29,963 - DEBUG - VRF ids for VN ctest-vn4-83215339: {} 2026-04-20 12:10:29,963 - DEBUG - ====Verifying data for ctest-policy1-50924603 in API_Server ====== 2026-04-20 12:10:29,963 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2026-04-20 12:10:29,970 - DEBUG - Requesting: http://10.0.0.50:8082/domain/18a14f92-daf6-4052-b99b-1b0121998f5c 2026-04-20 12:10:29,984 - DEBUG - Requesting: http://10.0.0.50:8082/project/face5b23-815a-4ff8-a18c-e36f5682f0a8 2026-04-20 12:10:30,060 - DEBUG - Requesting: http://10.0.0.50:8082/network-policy/6a433ce6-f8e5-4b94-a422-507500c21ba3 2026-04-20 12:10:30,071 - INFO - Verified policy ctest-policy1-50924603 in API Server, Result: True 2026-04-20 12:10:30,071 - INFO - Done with setup and verification, moving onto test .. 2026-04-20 12:10:30,084 - INFO - Deleting VN ctest-vn4-83215339 2026-04-20 12:10:30,202 - DEBUG - Response for deleting network () 2026-04-20 12:10:30,202 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/6762498e-e169-4931-aae5-ca1386d5f746 2026-04-20 12:10:30,208 - DEBUG - Response Code: 404 2026-04-20 12:10:30,208 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2026-04-20 12:10:30,214 - DEBUG - Requesting: http://10.0.0.50:8082/domain/18a14f92-daf6-4052-b99b-1b0121998f5c 2026-04-20 12:10:30,271 - DEBUG - Requesting: http://10.0.0.50:8082/project/face5b23-815a-4ff8-a18c-e36f5682f0a8 2026-04-20 12:10:30,344 - INFO - Validated that VN ctest-vn4-83215339 is not found in API Server 2026-04-20 12:10:30,355 - DEBUG - VN ctest-vn4-83215339 is not present in Agent 10.0.0.50 2026-04-20 12:10:30,355 - INFO - Validated that VN ctest-vn4-83215339 is not in any agent 2026-04-20 12:10:30,371 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-83215339 info 2026-04-20 12:10:30,400 - INFO - Deleted policy ctest-policy1-50924603 2026-04-20 12:10:30,570 - DEBUG - policy ctest-policy1-50924603 is not found in API Server 2026-04-20 12:10:30,823 - DEBUG - No XMPP flaps were noticed during the test 2026-04-20 12:10:30,824 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04] 2026-04-20 12:10:30,824 - INFO - -------------------------------------------------------------------------------- 2026-04-20 12:10:31,111 - DEBUG - No XMPP flaps were noticed during the test 2026-04-20 12:10:31,111 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:05] 2026-04-20 12:10:31,111 - INFO - -------------------------------------------------------------------------------- 2026-04-20 12:10:31,820 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-70908744, ID : face5b23-815a-4ff8-a18c-e36f5682f0a8