2026-04-24 12:48:16,329 - INFO - Domain Default found not creating 2026-04-24 12:48:16,562 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-64925021 not found, creating it 2026-04-24 12:48:17,065 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-64925021, ID : 7b1f78f1-0441-4981-bbd9-90f721b225c0 2026-04-24 12:48:18,936 - INFO - ================================================================================ 2026-04-24 12:48:18,936 - INFO - STARTING TEST : test_remove_policy_with_ref 2026-04-24 12:48:19,201 - DEBUG - Nothing to compare xmpp stats {'10.0.0.38': {'10.20.0.17': '0'}} with 2026-04-24 12:48:19,201 - INFO - Initial checks done. Running the testcase now 2026-04-24 12:48:19,201 - INFO - 2026-04-24 12:48:19,202 - INFO - ================================================================================ 2026-04-24 12:48:19,202 - INFO - STARTING TEST : test_remove_policy_with_ref 2026-04-24 12:48:19,202 - 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 12:48:19,512 - DEBUG - Nothing to compare xmpp stats {'10.0.0.38': {'10.20.0.17': '0'}} with 2026-04-24 12:48:19,512 - INFO - Initial checks done. Running the testcase now 2026-04-24 12:48:19,512 - INFO - 2026-04-24 12:48:19,853 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-64925021:ctest-vn4-23668605, 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-64925021:ctest-vn4-23668605, 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-64925021:ctest-vn4-23668605, 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-64925021:ctest-vn4-23668605, 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 12:48:20,428 - DEBUG - Response for create_network : {'network': {'id': '2a2b8d40-ae57-4d88-94bd-2d2f91eeb560', 'name': 'ctest-vn4-23668605', 'tenant_id': '7b1f78f104414981bbd990f721b225c0', 'project_id': '7b1f78f104414981bbd990f721b225c0', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-64925021', 'ctest-vn4-23668605'], 'port_security_enabled': True, 'description': ''}} 2026-04-24 12:48:20,615 - DEBUG - Response for create_subnet : {'subnet': {'id': '24580bef-eb9c-4e22-8846-3d1b32aeb3cf', 'name': '', 'tenant_id': '7b1f78f104414981bbd990f721b225c0', 'network_id': '2a2b8d40-ae57-4d88-94bd-2d2f91eeb560', 'ip_version': 4, 'cidr': '101.93.139.0/26', 'allocation_pools': [{'start': '101.93.139.2', 'end': '101.93.139.62'}], 'gateway_ip': '101.93.139.1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '101.93.139.2', 'tags': [], 'project_id': '7b1f78f104414981bbd990f721b225c0'}} 2026-04-24 12:48:20,826 - DEBUG - Response for create_subnet : {'subnet': {'id': 'eeca5658-63db-421d-9169-d9c5d9191343', 'name': '', 'tenant_id': '7b1f78f104414981bbd990f721b225c0', 'network_id': '2a2b8d40-ae57-4d88-94bd-2d2f91eeb560', 'ip_version': 6, 'cidr': '3002:f6b2:d73d:7e6f:8c63:9c21::/96', 'allocation_pools': [{'start': '3002:f6b2:d73d:7e6f:8c63:9c21:0:2', 'end': '3002:f6b2:d73d:7e6f:8c63:9c21:ffff:fffe'}], 'gateway_ip': '3002:f6b2:d73d:7e6f:8c63:9c21:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '3002:f6b2:d73d:7e6f:8c63:9c21:0:2', 'tags': [], 'project_id': '7b1f78f104414981bbd990f721b225c0'}} 2026-04-24 12:48:20,851 - INFO - Created VN ctest-vn4-23668605 2026-04-24 12:48:20,907 - DEBUG - VN ctest-vn4-23668605 UUID is 2a2b8d40-ae57-4d88-94bd-2d2f91eeb560 2026-04-24 12:48:21,132 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': '2a2b8d40-ae57-4d88-94bd-2d2f91eeb560', 'name': 'ctest-vn4-23668605', 'tenant_id': '7b1f78f104414981bbd990f721b225c0', 'project_id': '7b1f78f104414981bbd990f721b225c0', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['24580bef-eb9c-4e22-8846-3d1b32aeb3cf', 'eeca5658-63db-421d-9169-d9c5d9191343'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-64925021', 'ctest-vn4-23668605'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-64925021', 'ctest-policy1-50924421']], 'subnet_ipam': [{'subnet_cidr': '101.93.139.0/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '3002:f6b2:d73d:7e6f:8c63:9c21::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2026-04-24 12:48:21,299 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2026-04-24 12:48:21,608 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2026-04-24 12:48:21,646 - DEBUG - Requesting: http://10.0.0.38:8082/domain/9baee0df-b805-487b-b59f-1480aee99557 2026-04-24 12:48:21,660 - DEBUG - Requesting: http://10.0.0.38:8082/project/7b1f78f1-0441-4981-bbd9-90f721b225c0 2026-04-24 12:48:21,738 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/2a2b8d40-ae57-4d88-94bd-2d2f91eeb560 2026-04-24 12:48:21,752 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/2a2b8d40-ae57-4d88-94bd-2d2f91eeb560 2026-04-24 12:48:21,764 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/1ce89ea0-1408-4244-a3d3-d38f71d256eb 2026-04-24 12:48:21,774 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/1ce89ea0-1408-4244-a3d3-d38f71d256eb 2026-04-24 12:48:21,783 - DEBUG - Requesting: http://10.0.0.38:8082/route-target/f7554f7b-bf81-4d90-8b3d-9d2304358716 2026-04-24 12:48:21,791 - DEBUG - Route Targets: ['target:64512:8000004'] 2026-04-24 12:48:21,791 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/2a2b8d40-ae57-4d88-94bd-2d2f91eeb560 2026-04-24 12:48:21,801 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/1ce89ea0-1408-4244-a3d3-d38f71d256eb 2026-04-24 12:48:21,819 - INFO - Verified VN network id 9 for VN 2a2b8d40-ae57-4d88-94bd-2d2f91eeb560 2026-04-24 12:48:21,819 - INFO - Verifications in API Server for VN ctest-vn4-23668605 passed 2026-04-24 12:48:21,819 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/2a2b8d40-ae57-4d88-94bd-2d2f91eeb560 2026-04-24 12:48:21,830 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/1ce89ea0-1408-4244-a3d3-d38f71d256eb 2026-04-24 12:48:21,839 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/1ce89ea0-1408-4244-a3d3-d38f71d256eb 2026-04-24 12:48:21,848 - DEBUG - Requesting: http://10.0.0.38:8082/route-target/f7554f7b-bf81-4d90-8b3d-9d2304358716 2026-04-24 12:48:21,864 - DEBUG - Control-node 10.0.0.38 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-64925021:ctest-vn4-23668605', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-64925021', 'owner-access': '7', 'group': 'member', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '3038677682533911944', 'uuid-lslong': '10717772370546701664'}, 'enable': 'true', 'created': '2026-04-24T12:48:20', 'last-modified': '2026-04-24T12:48:21', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.758116'} 2026-04-24 12:48:21,871 - DEBUG - Route Targets: ['target:64512:8000004'] 2026-04-24 12:48:21,871 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-23668605 passed 2026-04-24 12:48:21,871 - DEBUG - ====Verifying policy data for ctest-vn4-23668605 in API_Server ====== 2026-04-24 12:48:21,871 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2026-04-24 12:48:21,878 - DEBUG - Requesting: http://10.0.0.38:8082/domain/9baee0df-b805-487b-b59f-1480aee99557 2026-04-24 12:48:21,892 - DEBUG - Requesting: http://10.0.0.38:8082/project/7b1f78f1-0441-4981-bbd9-90f721b225c0 2026-04-24 12:48:21,975 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/2a2b8d40-ae57-4d88-94bd-2d2f91eeb560 2026-04-24 12:48:21,988 - DEBUG - ==>Verifying data for policy with id: 0978593f-1d06-4fe8-8fb7-86cf0f969ee1, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-64925021', 'ctest-policy1-50924421'] 2026-04-24 12:48:21,988 - INFO - VN ctest-vn4-23668605 Policy verification: verify_vn_policy_in_api_server, status: True 2026-04-24 12:48:21,988 - DEBUG - Verifying the vn in opserver 2026-04-24 12:48:21,988 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-64925021:ctest-vn4-23668605 virtual network link through opserver 10.0.0.38 2026-04-24 12:48:21,989 - DEBUG - Requesting: http://10.0.0.38:8081/analytics/uves/virtual-networks 2026-04-24 12:48:22,294 - DEBUG - Requesting: http://10.0.0.38:8081/analytics/uves/virtual-networks 2026-04-24 12:48:22,372 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-64925021:ctest-vn4-23668605', 'href': 'http://10.0.0.38:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-64925021:ctest-vn4-23668605?flat'} 2026-04-24 12:48:22,372 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-64925021:ctest-vn4-23668605 is found in opserver 2026-04-24 12:48:22,383 - DEBUG - Do not have enough data to verify VN in agent 2026-04-24 12:48:22,390 - DEBUG - VRF ids for VN ctest-vn4-23668605: {} 2026-04-24 12:48:22,390 - DEBUG - ====Verifying data for ctest-policy1-50924421 in API_Server ====== 2026-04-24 12:48:22,390 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2026-04-24 12:48:22,397 - DEBUG - Requesting: http://10.0.0.38:8082/domain/9baee0df-b805-487b-b59f-1480aee99557 2026-04-24 12:48:22,417 - DEBUG - Requesting: http://10.0.0.38:8082/project/7b1f78f1-0441-4981-bbd9-90f721b225c0 2026-04-24 12:48:22,501 - DEBUG - Requesting: http://10.0.0.38:8082/network-policy/0978593f-1d06-4fe8-8fb7-86cf0f969ee1 2026-04-24 12:48:22,512 - INFO - Verified policy ctest-policy1-50924421 in API Server, Result: True 2026-04-24 12:48:22,512 - INFO - Done with setup and verification, moving onto test .. 2026-04-24 12:48:22,521 - INFO - Deleting VN ctest-vn4-23668605 2026-04-24 12:48:22,660 - DEBUG - Response for deleting network () 2026-04-24 12:48:22,660 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/1ce89ea0-1408-4244-a3d3-d38f71d256eb 2026-04-24 12:48:22,666 - DEBUG - Response Code: 404 2026-04-24 12:48:22,667 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2026-04-24 12:48:22,674 - DEBUG - Requesting: http://10.0.0.38:8082/domain/9baee0df-b805-487b-b59f-1480aee99557 2026-04-24 12:48:22,729 - DEBUG - Requesting: http://10.0.0.38:8082/project/7b1f78f1-0441-4981-bbd9-90f721b225c0 2026-04-24 12:48:22,810 - INFO - Validated that VN ctest-vn4-23668605 is not found in API Server 2026-04-24 12:48:22,821 - DEBUG - VN ctest-vn4-23668605 is not present in Agent 10.0.0.38 2026-04-24 12:48:22,821 - INFO - Validated that VN ctest-vn4-23668605 is not in any agent 2026-04-24 12:48:22,839 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-23668605 info 2026-04-24 12:48:22,877 - INFO - Deleted policy ctest-policy1-50924421 2026-04-24 12:48:23,043 - DEBUG - policy ctest-policy1-50924421 is not found in API Server 2026-04-24 12:48:23,298 - DEBUG - No XMPP flaps were noticed during the test 2026-04-24 12:48:23,298 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04] 2026-04-24 12:48:23,298 - INFO - -------------------------------------------------------------------------------- 2026-04-24 12:48:23,599 - DEBUG - No XMPP flaps were noticed during the test 2026-04-24 12:48:23,600 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:05] 2026-04-24 12:48:23,600 - INFO - -------------------------------------------------------------------------------- 2026-04-24 12:48:24,722 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-64925021, ID : 7b1f78f1-0441-4981-bbd9-90f721b225c0