2026-03-19 12:16:49,871 - INFO - Domain Default found not creating 2026-03-19 12:16:50,017 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-76727568 not found, creating it 2026-03-19 12:16:50,438 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-76727568, ID : 0c098594-b6d4-49ba-8a29-e6820f2505cf 2026-03-19 12:16:51,883 - INFO - ================================================================================ 2026-03-19 12:16:51,883 - INFO - STARTING TEST : test_remove_policy_with_ref 2026-03-19 12:16:52,138 - DEBUG - Nothing to compare xmpp stats {'10.0.0.141': {'10.20.0.14': '0'}} with 2026-03-19 12:16:52,138 - INFO - Initial checks done. Running the testcase now 2026-03-19 12:16:52,138 - INFO - 2026-03-19 12:16:52,138 - INFO - ================================================================================ 2026-03-19 12:16:52,138 - INFO - STARTING TEST : test_remove_policy_with_ref 2026-03-19 12:16:52,138 - 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-03-19 12:16:52,420 - DEBUG - Nothing to compare xmpp stats {'10.0.0.141': {'10.20.0.14': '0'}} with 2026-03-19 12:16:52,420 - INFO - Initial checks done. Running the testcase now 2026-03-19 12:16:52,420 - INFO - 2026-03-19 12:16:52,785 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-76727568:ctest-vn4-09944394, 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-76727568:ctest-vn4-09944394, 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-76727568:ctest-vn4-09944394, 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-76727568:ctest-vn4-09944394, 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-03-19 12:16:53,326 - DEBUG - Response for create_network : {'network': {'id': 'a59706b4-05b3-4a09-9ca5-67e576f4d1fd', 'name': 'ctest-vn4-09944394', 'tenant_id': '0c098594b6d449ba8a29e6820f2505cf', 'project_id': '0c098594b6d449ba8a29e6820f2505cf', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-76727568', 'ctest-vn4-09944394'], 'port_security_enabled': True, 'description': ''}} 2026-03-19 12:16:53,528 - DEBUG - Response for create_subnet : {'subnet': {'id': '04ba408c-f210-4894-b194-25488c92bba7', 'name': '', 'tenant_id': '0c098594b6d449ba8a29e6820f2505cf', 'network_id': 'a59706b4-05b3-4a09-9ca5-67e576f4d1fd', 'ip_version': 4, 'cidr': '45.157.23.0/26', 'allocation_pools': [{'start': '45.157.23.2', 'end': '45.157.23.62'}], 'gateway_ip': '45.157.23.1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '45.157.23.2', 'tags': [], 'project_id': '0c098594b6d449ba8a29e6820f2505cf'}} 2026-03-19 12:16:53,680 - DEBUG - Response for create_subnet : {'subnet': {'id': '0e2762a9-1004-4008-b441-87d66a8e88e4', 'name': '', 'tenant_id': '0c098594b6d449ba8a29e6820f2505cf', 'network_id': 'a59706b4-05b3-4a09-9ca5-67e576f4d1fd', 'ip_version': 6, 'cidr': '39a9:3d76:6e6e:e57:b6f1:59ae::/96', 'allocation_pools': [{'start': '39a9:3d76:6e6e:e57:b6f1:59ae:0:2', 'end': '39a9:3d76:6e6e:e57:b6f1:59ae:ffff:fffe'}], 'gateway_ip': '39a9:3d76:6e6e:e57:b6f1:59ae:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '39a9:3d76:6e6e:e57:b6f1:59ae:0:2', 'tags': [], 'project_id': '0c098594b6d449ba8a29e6820f2505cf'}} 2026-03-19 12:16:53,702 - INFO - Created VN ctest-vn4-09944394 2026-03-19 12:16:53,755 - DEBUG - VN ctest-vn4-09944394 UUID is a59706b4-05b3-4a09-9ca5-67e576f4d1fd 2026-03-19 12:16:53,976 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': 'a59706b4-05b3-4a09-9ca5-67e576f4d1fd', 'name': 'ctest-vn4-09944394', 'tenant_id': '0c098594b6d449ba8a29e6820f2505cf', 'project_id': '0c098594b6d449ba8a29e6820f2505cf', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['04ba408c-f210-4894-b194-25488c92bba7', '0e2762a9-1004-4008-b441-87d66a8e88e4'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-76727568', 'ctest-vn4-09944394'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-76727568', 'ctest-policy1-12760355']], 'subnet_ipam': [{'subnet_cidr': '45.157.23.0/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '39a9:3d76:6e6e:e57:b6f1:59ae::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2026-03-19 12:16:54,151 - DEBUG - Requesting: http://10.0.0.141:8082/domains 2026-03-19 12:16:54,450 - DEBUG - Requesting: http://10.0.0.141:8082/domains 2026-03-19 12:16:54,482 - DEBUG - Requesting: http://10.0.0.141:8082/domain/c7fc54b5-94dc-4f40-a9dd-5250fce52f04 2026-03-19 12:16:54,493 - DEBUG - Requesting: http://10.0.0.141:8082/project/0c098594-b6d4-49ba-8a29-e6820f2505cf 2026-03-19 12:16:54,562 - DEBUG - Requesting: http://10.0.0.141:8082/virtual-network/a59706b4-05b3-4a09-9ca5-67e576f4d1fd 2026-03-19 12:16:54,575 - DEBUG - Requesting: http://10.0.0.141:8082/virtual-network/a59706b4-05b3-4a09-9ca5-67e576f4d1fd 2026-03-19 12:16:54,585 - DEBUG - Requesting: http://10.0.0.141:8082/routing-instance/984c5c4e-a6fd-44d8-b5c3-e3f968bece0f 2026-03-19 12:16:54,592 - DEBUG - Requesting: http://10.0.0.141:8082/routing-instance/984c5c4e-a6fd-44d8-b5c3-e3f968bece0f 2026-03-19 12:16:54,599 - DEBUG - Requesting: http://10.0.0.141:8082/route-target/ba32dcf5-7fb7-4ea0-a4a6-167e8dd6482e 2026-03-19 12:16:54,605 - DEBUG - Route Targets: ['target:64512:8000004'] 2026-03-19 12:16:54,605 - DEBUG - Requesting: http://10.0.0.141:8082/virtual-network/a59706b4-05b3-4a09-9ca5-67e576f4d1fd 2026-03-19 12:16:54,615 - DEBUG - Requesting: http://10.0.0.141:8082/routing-instance/984c5c4e-a6fd-44d8-b5c3-e3f968bece0f 2026-03-19 12:16:54,631 - INFO - Verified VN network id 11 for VN a59706b4-05b3-4a09-9ca5-67e576f4d1fd 2026-03-19 12:16:54,631 - INFO - Verifications in API Server for VN ctest-vn4-09944394 passed 2026-03-19 12:16:54,631 - DEBUG - Requesting: http://10.0.0.141:8082/virtual-network/a59706b4-05b3-4a09-9ca5-67e576f4d1fd 2026-03-19 12:16:54,640 - DEBUG - Requesting: http://10.0.0.141:8082/routing-instance/984c5c4e-a6fd-44d8-b5c3-e3f968bece0f 2026-03-19 12:16:54,646 - DEBUG - Requesting: http://10.0.0.141:8082/routing-instance/984c5c4e-a6fd-44d8-b5c3-e3f968bece0f 2026-03-19 12:16:54,653 - DEBUG - Requesting: http://10.0.0.141:8082/route-target/ba32dcf5-7fb7-4ea0-a4a6-167e8dd6482e 2026-03-19 12:16:54,666 - DEBUG - Control-node 10.0.0.141 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-76727568:ctest-vn4-09944394', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-76727568', 'owner-access': '7', 'group': 'member', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '11932013108000934409', 'uuid-lslong': '11287542276314943997'}, 'enable': 'true', 'created': '2026-03-19T12:16:53', 'last-modified': '2026-03-19T12:16:53', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.730039'} 2026-03-19 12:16:54,672 - DEBUG - Route Targets: ['target:64512:8000004'] 2026-03-19 12:16:54,672 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-09944394 passed 2026-03-19 12:16:54,672 - DEBUG - ====Verifying policy data for ctest-vn4-09944394 in API_Server ====== 2026-03-19 12:16:54,672 - DEBUG - Requesting: http://10.0.0.141:8082/domains 2026-03-19 12:16:54,677 - DEBUG - Requesting: http://10.0.0.141:8082/domain/c7fc54b5-94dc-4f40-a9dd-5250fce52f04 2026-03-19 12:16:54,689 - DEBUG - Requesting: http://10.0.0.141:8082/project/0c098594-b6d4-49ba-8a29-e6820f2505cf 2026-03-19 12:16:54,761 - DEBUG - Requesting: http://10.0.0.141:8082/virtual-network/a59706b4-05b3-4a09-9ca5-67e576f4d1fd 2026-03-19 12:16:54,769 - DEBUG - ==>Verifying data for policy with id: e2fcd2d4-7f79-48cb-8ca1-fc9f73779a75, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-76727568', 'ctest-policy1-12760355'] 2026-03-19 12:16:54,770 - INFO - VN ctest-vn4-09944394 Policy verification: verify_vn_policy_in_api_server, status: True 2026-03-19 12:16:54,770 - DEBUG - Verifying the vn in opserver 2026-03-19 12:16:54,770 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-76727568:ctest-vn4-09944394 virtual network link through opserver 10.0.0.141 2026-03-19 12:16:54,770 - DEBUG - Requesting: http://10.0.0.141:8081/analytics/uves/virtual-networks 2026-03-19 12:16:55,066 - DEBUG - Requesting: http://10.0.0.141:8081/analytics/uves/virtual-networks 2026-03-19 12:16:55,129 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-76727568:ctest-vn4-09944394', 'href': 'http://10.0.0.141:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-76727568:ctest-vn4-09944394?flat'} 2026-03-19 12:16:55,129 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-76727568:ctest-vn4-09944394 is found in opserver 2026-03-19 12:16:55,138 - DEBUG - Do not have enough data to verify VN in agent 2026-03-19 12:16:55,143 - DEBUG - VRF ids for VN ctest-vn4-09944394: {} 2026-03-19 12:16:55,143 - DEBUG - ====Verifying data for ctest-policy1-12760355 in API_Server ====== 2026-03-19 12:16:55,143 - DEBUG - Requesting: http://10.0.0.141:8082/domains 2026-03-19 12:16:55,149 - DEBUG - Requesting: http://10.0.0.141:8082/domain/c7fc54b5-94dc-4f40-a9dd-5250fce52f04 2026-03-19 12:16:55,160 - DEBUG - Requesting: http://10.0.0.141:8082/project/0c098594-b6d4-49ba-8a29-e6820f2505cf 2026-03-19 12:16:55,226 - DEBUG - Requesting: http://10.0.0.141:8082/network-policy/e2fcd2d4-7f79-48cb-8ca1-fc9f73779a75 2026-03-19 12:16:55,234 - INFO - Verified policy ctest-policy1-12760355 in API Server, Result: True 2026-03-19 12:16:55,235 - INFO - Done with setup and verification, moving onto test .. 2026-03-19 12:16:55,242 - INFO - Deleting VN ctest-vn4-09944394 2026-03-19 12:16:55,342 - DEBUG - Response for deleting network () 2026-03-19 12:16:55,342 - DEBUG - Requesting: http://10.0.0.141:8082/routing-instance/984c5c4e-a6fd-44d8-b5c3-e3f968bece0f 2026-03-19 12:16:55,347 - DEBUG - Response Code: 404 2026-03-19 12:16:55,347 - DEBUG - Requesting: http://10.0.0.141:8082/domains 2026-03-19 12:16:55,352 - DEBUG - Requesting: http://10.0.0.141:8082/domain/c7fc54b5-94dc-4f40-a9dd-5250fce52f04 2026-03-19 12:16:55,408 - DEBUG - Requesting: http://10.0.0.141:8082/project/0c098594-b6d4-49ba-8a29-e6820f2505cf 2026-03-19 12:16:55,475 - INFO - Validated that VN ctest-vn4-09944394 is not found in API Server 2026-03-19 12:16:55,484 - DEBUG - VN ctest-vn4-09944394 is not present in Agent 10.0.0.141 2026-03-19 12:16:55,484 - INFO - Validated that VN ctest-vn4-09944394 is not in any agent 2026-03-19 12:16:55,497 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-09944394 info 2026-03-19 12:16:55,522 - INFO - Deleted policy ctest-policy1-12760355 2026-03-19 12:16:55,691 - DEBUG - policy ctest-policy1-12760355 is not found in API Server 2026-03-19 12:16:55,944 - DEBUG - No XMPP flaps were noticed during the test
2026-03-19 12:16:55,944 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:03]
2026-03-19 12:16:55,945 - INFO - -------------------------------------------------------------------------------- 2026-03-19 12:16:56,232 - DEBUG - No XMPP flaps were noticed during the test
2026-03-19 12:16:56,232 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:05]
2026-03-19 12:16:56,232 - INFO - -------------------------------------------------------------------------------- 2026-03-19 12:16:56,949 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-76727568, ID : 0c098594-b6d4-49ba-8a29-e6820f2505cf