2026-04-24 15:38:22,327 - INFO - Domain Default found not creating 2026-04-24 15:38:22,541 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-32445779 not found, creating it 2026-04-24 15:38:23,096 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-32445779, ID : 2032c51c-6302-4f54-9258-761d17007f66 2026-04-24 15:38:24,859 - INFO - ================================================================================ 2026-04-24 15:38:24,859 - INFO - STARTING TEST : test_remove_policy_with_ref 2026-04-24 15:38:25,134 - DEBUG - Nothing to compare xmpp stats {'10.0.0.33': {'10.20.0.17': '0'}} with 2026-04-24 15:38:25,134 - INFO - Initial checks done. Running the testcase now 2026-04-24 15:38:25,134 - INFO - 2026-04-24 15:38:25,134 - INFO - ================================================================================ 2026-04-24 15:38:25,134 - INFO - STARTING TEST : test_remove_policy_with_ref 2026-04-24 15:38:25,134 - 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-24 15:38:25,434 - DEBUG - Nothing to compare xmpp stats {'10.0.0.33': {'10.20.0.17': '0'}} with 2026-04-24 15:38:25,434 - INFO - Initial checks done. Running the testcase now 2026-04-24 15:38:25,434 - INFO - 2026-04-24 15:38:25,852 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-32445779:ctest-vn4-65293086, 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-32445779:ctest-vn4-65293086, 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-32445779:ctest-vn4-65293086, 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-32445779:ctest-vn4-65293086, 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-24 15:38:26,432 - DEBUG - Response for create_network : {'network': {'id': '808eaf96-a4c2-4a94-9a16-c9cc7688557e', 'name': 'ctest-vn4-65293086', 'tenant_id': '2032c51c63024f549258761d17007f66', 'project_id': '2032c51c63024f549258761d17007f66', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-32445779', 'ctest-vn4-65293086'], 'port_security_enabled': True, 'description': ''}} 2026-04-24 15:38:26,667 - DEBUG - Response for create_subnet : {'subnet': {'id': '3c5709ad-f3b6-43dd-b84f-34541e6cbc66', 'name': '', 'tenant_id': '2032c51c63024f549258761d17007f66', 'network_id': '808eaf96-a4c2-4a94-9a16-c9cc7688557e', 'ip_version': 4, 'cidr': '209.93.16.128/26', 'allocation_pools': [{'start': '209.93.16.130', 'end': '209.93.16.190'}], 'gateway_ip': '209.93.16.129', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '209.93.16.130', 'tags': [], 'project_id': '2032c51c63024f549258761d17007f66'}} 2026-04-24 15:38:26,856 - DEBUG - Response for create_subnet : {'subnet': {'id': 'eb808c06-7f1e-4fa9-9183-cd869c08594a', 'name': '', 'tenant_id': '2032c51c63024f549258761d17007f66', 'network_id': '808eaf96-a4c2-4a94-9a16-c9cc7688557e', 'ip_version': 6, 'cidr': '2d38:e13a:5dc8:1f60:b421:8d77::/96', 'allocation_pools': [{'start': '2d38:e13a:5dc8:1f60:b421:8d77:0:2', 'end': '2d38:e13a:5dc8:1f60:b421:8d77:ffff:fffe'}], 'gateway_ip': '2d38:e13a:5dc8:1f60:b421:8d77:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '2d38:e13a:5dc8:1f60:b421:8d77:0:2', 'tags': [], 'project_id': '2032c51c63024f549258761d17007f66'}} 2026-04-24 15:38:26,885 - INFO - Created VN ctest-vn4-65293086 2026-04-24 15:38:26,943 - DEBUG - VN ctest-vn4-65293086 UUID is 808eaf96-a4c2-4a94-9a16-c9cc7688557e 2026-04-24 15:38:27,197 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': '808eaf96-a4c2-4a94-9a16-c9cc7688557e', 'name': 'ctest-vn4-65293086', 'tenant_id': '2032c51c63024f549258761d17007f66', 'project_id': '2032c51c63024f549258761d17007f66', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['3c5709ad-f3b6-43dd-b84f-34541e6cbc66', 'eb808c06-7f1e-4fa9-9183-cd869c08594a'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-32445779', 'ctest-vn4-65293086'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-32445779', 'ctest-policy1-56736626']], 'subnet_ipam': [{'subnet_cidr': '209.93.16.128/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '2d38:e13a:5dc8:1f60:b421:8d77::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2026-04-24 15:38:27,363 - DEBUG - Requesting: http://10.0.0.33:8082/domains 2026-04-24 15:38:27,670 - DEBUG - Requesting: http://10.0.0.33:8082/domains 2026-04-24 15:38:27,712 - DEBUG - Requesting: http://10.0.0.33:8082/domain/7a3a65c3-ba3f-44f9-93ee-6b7268143718 2026-04-24 15:38:27,730 - DEBUG - Requesting: http://10.0.0.33:8082/project/2032c51c-6302-4f54-9258-761d17007f66 2026-04-24 15:38:27,821 - DEBUG - Requesting: http://10.0.0.33:8082/virtual-network/808eaf96-a4c2-4a94-9a16-c9cc7688557e 2026-04-24 15:38:27,838 - DEBUG - Requesting: http://10.0.0.33:8082/virtual-network/808eaf96-a4c2-4a94-9a16-c9cc7688557e 2026-04-24 15:38:27,852 - DEBUG - Requesting: http://10.0.0.33:8082/routing-instance/3800e4eb-0134-4ed2-bccd-ed6cd6acbeab 2026-04-24 15:38:27,860 - DEBUG - Requesting: http://10.0.0.33:8082/routing-instance/3800e4eb-0134-4ed2-bccd-ed6cd6acbeab 2026-04-24 15:38:27,869 - DEBUG - Requesting: http://10.0.0.33:8082/route-target/6810979d-faf4-472f-befc-fa17445bda10 2026-04-24 15:38:27,877 - DEBUG - Route Targets: ['target:64512:8000004'] 2026-04-24 15:38:27,877 - DEBUG - Requesting: http://10.0.0.33:8082/virtual-network/808eaf96-a4c2-4a94-9a16-c9cc7688557e 2026-04-24 15:38:27,889 - DEBUG - Requesting: http://10.0.0.33:8082/routing-instance/3800e4eb-0134-4ed2-bccd-ed6cd6acbeab 2026-04-24 15:38:27,911 - INFO - Verified VN network id 9 for VN 808eaf96-a4c2-4a94-9a16-c9cc7688557e 2026-04-24 15:38:27,911 - INFO - Verifications in API Server for VN ctest-vn4-65293086 passed 2026-04-24 15:38:27,911 - DEBUG - Requesting: http://10.0.0.33:8082/virtual-network/808eaf96-a4c2-4a94-9a16-c9cc7688557e 2026-04-24 15:38:27,922 - DEBUG - Requesting: http://10.0.0.33:8082/routing-instance/3800e4eb-0134-4ed2-bccd-ed6cd6acbeab 2026-04-24 15:38:27,931 - DEBUG - Requesting: http://10.0.0.33:8082/routing-instance/3800e4eb-0134-4ed2-bccd-ed6cd6acbeab 2026-04-24 15:38:27,940 - DEBUG - Requesting: http://10.0.0.33:8082/route-target/6810979d-faf4-472f-befc-fa17445bda10 2026-04-24 15:38:27,956 - DEBUG - Control-node 10.0.0.33 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-32445779:ctest-vn4-65293086', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-32445779', 'owner-access': '7', 'group': 'reader', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '9263534545091840660', 'uuid-lslong': '11103283811327694206'}, 'enable': 'true', 'created': '2026-04-24T15:38:26', 'last-modified': '2026-04-24T15:38:27', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.786321'} 2026-04-24 15:38:27,963 - DEBUG - Route Targets: ['target:64512:8000004'] 2026-04-24 15:38:27,963 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-65293086 passed 2026-04-24 15:38:27,963 - DEBUG - ====Verifying policy data for ctest-vn4-65293086 in API_Server ====== 2026-04-24 15:38:27,963 - DEBUG - Requesting: http://10.0.0.33:8082/domains 2026-04-24 15:38:27,973 - DEBUG - Requesting: http://10.0.0.33:8082/domain/7a3a65c3-ba3f-44f9-93ee-6b7268143718 2026-04-24 15:38:27,987 - DEBUG - Requesting: http://10.0.0.33:8082/project/2032c51c-6302-4f54-9258-761d17007f66 2026-04-24 15:38:28,061 - DEBUG - Requesting: http://10.0.0.33:8082/virtual-network/808eaf96-a4c2-4a94-9a16-c9cc7688557e 2026-04-24 15:38:28,072 - DEBUG - ==>Verifying data for policy with id: 78a43710-fe14-4df1-83c4-596220f02931, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-32445779', 'ctest-policy1-56736626'] 2026-04-24 15:38:28,072 - INFO - VN ctest-vn4-65293086 Policy verification: verify_vn_policy_in_api_server, status: True 2026-04-24 15:38:28,072 - DEBUG - Verifying the vn in opserver 2026-04-24 15:38:28,072 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-32445779:ctest-vn4-65293086 virtual network link through opserver 10.0.0.33 2026-04-24 15:38:28,072 - DEBUG - Requesting: http://10.0.0.33:8081/analytics/uves/virtual-networks 2026-04-24 15:38:28,375 - DEBUG - Requesting: http://10.0.0.33:8081/analytics/uves/virtual-networks 2026-04-24 15:38:28,466 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-32445779:ctest-vn4-65293086', 'href': 'http://10.0.0.33:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-32445779:ctest-vn4-65293086?flat'} 2026-04-24 15:38:28,466 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-32445779:ctest-vn4-65293086 is found in opserver 2026-04-24 15:38:28,478 - DEBUG - Do not have enough data to verify VN in agent 2026-04-24 15:38:28,484 - DEBUG - VRF ids for VN ctest-vn4-65293086: {} 2026-04-24 15:38:28,485 - DEBUG - ====Verifying data for ctest-policy1-56736626 in API_Server ====== 2026-04-24 15:38:28,485 - DEBUG - Requesting: http://10.0.0.33:8082/domains 2026-04-24 15:38:28,493 - DEBUG - Requesting: http://10.0.0.33:8082/domain/7a3a65c3-ba3f-44f9-93ee-6b7268143718 2026-04-24 15:38:28,506 - DEBUG - Requesting: http://10.0.0.33:8082/project/2032c51c-6302-4f54-9258-761d17007f66 2026-04-24 15:38:28,584 - DEBUG - Requesting: http://10.0.0.33:8082/network-policy/78a43710-fe14-4df1-83c4-596220f02931 2026-04-24 15:38:28,595 - INFO - Verified policy ctest-policy1-56736626 in API Server, Result: True 2026-04-24 15:38:28,595 - INFO - Done with setup and verification, moving onto test .. 2026-04-24 15:38:28,605 - INFO - Deleting VN ctest-vn4-65293086 2026-04-24 15:38:28,764 - DEBUG - Response for deleting network () 2026-04-24 15:38:28,764 - DEBUG - Requesting: http://10.0.0.33:8082/routing-instance/3800e4eb-0134-4ed2-bccd-ed6cd6acbeab 2026-04-24 15:38:28,770 - DEBUG - Response Code: 404 2026-04-24 15:38:28,770 - DEBUG - Requesting: http://10.0.0.33:8082/domains 2026-04-24 15:38:28,777 - DEBUG - Requesting: http://10.0.0.33:8082/domain/7a3a65c3-ba3f-44f9-93ee-6b7268143718 2026-04-24 15:38:28,833 - DEBUG - Requesting: http://10.0.0.33:8082/project/2032c51c-6302-4f54-9258-761d17007f66 2026-04-24 15:38:28,925 - INFO - Validated that VN ctest-vn4-65293086 is not found in API Server 2026-04-24 15:38:28,938 - DEBUG - VN ctest-vn4-65293086 is not present in Agent 10.0.0.33 2026-04-24 15:38:28,938 - INFO - Validated that VN ctest-vn4-65293086 is not in any agent 2026-04-24 15:38:28,964 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-65293086 info 2026-04-24 15:38:29,012 - INFO - Deleted policy ctest-policy1-56736626 2026-04-24 15:38:29,203 - DEBUG - policy ctest-policy1-56736626 is not found in API Server 2026-04-24 15:38:29,485 - DEBUG - No XMPP flaps were noticed during the test 2026-04-24 15:38:29,485 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04] 2026-04-24 15:38:29,485 - INFO - -------------------------------------------------------------------------------- 2026-04-24 15:38:29,788 - DEBUG - No XMPP flaps were noticed during the test 2026-04-24 15:38:29,788 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:05] 2026-04-24 15:38:29,788 - INFO - -------------------------------------------------------------------------------- 2026-04-24 15:38:30,558 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-32445779, ID : 2032c51c-6302-4f54-9258-761d17007f66