2026-04-03 13:21:02,642 - INFO - Domain Default found not creating 2026-04-03 13:21:02,819 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-78717725 not found, creating it 2026-04-03 13:21:03,318 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-78717725, ID : b37fcdf0-6e68-4b60-95c6-67cbcd35ef7f 2026-04-03 13:21:04,792 - INFO - ================================================================================ 2026-04-03 13:21:04,792 - INFO - STARTING TEST : test_remove_policy_with_ref 2026-04-03 13:21:05,046 - DEBUG - Nothing to compare xmpp stats {'10.0.0.38': {'10.20.0.17': '0'}} with 2026-04-03 13:21:05,046 - INFO - Initial checks done. Running the testcase now 2026-04-03 13:21:05,046 - INFO - 2026-04-03 13:21:05,046 - INFO - ================================================================================ 2026-04-03 13:21:05,046 - INFO - STARTING TEST : test_remove_policy_with_ref 2026-04-03 13:21:05,047 - 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-03 13:21:05,334 - DEBUG - Nothing to compare xmpp stats {'10.0.0.38': {'10.20.0.17': '0'}} with 2026-04-03 13:21:05,334 - INFO - Initial checks done. Running the testcase now 2026-04-03 13:21:05,334 - INFO - 2026-04-03 13:21:05,760 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-78717725:ctest-vn4-65954689, 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-78717725:ctest-vn4-65954689, 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-78717725:ctest-vn4-65954689, 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-78717725:ctest-vn4-65954689, 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-03 13:21:06,270 - DEBUG - Response for create_network : {'network': {'id': '43f0deb4-c2b2-41ff-bf2b-09538590d5f3', 'name': 'ctest-vn4-65954689', 'tenant_id': 'b37fcdf06e684b6095c667cbcd35ef7f', 'project_id': 'b37fcdf06e684b6095c667cbcd35ef7f', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-78717725', 'ctest-vn4-65954689'], 'port_security_enabled': True, 'description': ''}} 2026-04-03 13:21:06,497 - DEBUG - Response for create_subnet : {'subnet': {'id': '14a12562-313b-4f5c-8a14-cbe7dc3c1c7a', 'name': '', 'tenant_id': 'b37fcdf06e684b6095c667cbcd35ef7f', 'network_id': '43f0deb4-c2b2-41ff-bf2b-09538590d5f3', 'ip_version': 4, 'cidr': '161.90.37.192/26', 'allocation_pools': [{'start': '161.90.37.194', 'end': '161.90.37.254'}], 'gateway_ip': '161.90.37.193', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '161.90.37.194', 'tags': [], 'project_id': 'b37fcdf06e684b6095c667cbcd35ef7f'}} 2026-04-03 13:21:06,640 - DEBUG - Response for create_subnet : {'subnet': {'id': '297d8b41-7e7d-46c8-b424-4f386f457b8b', 'name': '', 'tenant_id': 'b37fcdf06e684b6095c667cbcd35ef7f', 'network_id': '43f0deb4-c2b2-41ff-bf2b-09538590d5f3', 'ip_version': 6, 'cidr': '26b8:686:f481:2993:71ef:66d1::/96', 'allocation_pools': [{'start': '26b8:686:f481:2993:71ef:66d1:0:2', 'end': '26b8:686:f481:2993:71ef:66d1:ffff:fffe'}], 'gateway_ip': '26b8:686:f481:2993:71ef:66d1:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '26b8:686:f481:2993:71ef:66d1:0:2', 'tags': [], 'project_id': 'b37fcdf06e684b6095c667cbcd35ef7f'}} 2026-04-03 13:21:06,661 - INFO - Created VN ctest-vn4-65954689 2026-04-03 13:21:06,712 - DEBUG - VN ctest-vn4-65954689 UUID is 43f0deb4-c2b2-41ff-bf2b-09538590d5f3 2026-04-03 13:21:06,923 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': '43f0deb4-c2b2-41ff-bf2b-09538590d5f3', 'name': 'ctest-vn4-65954689', 'tenant_id': 'b37fcdf06e684b6095c667cbcd35ef7f', 'project_id': 'b37fcdf06e684b6095c667cbcd35ef7f', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['14a12562-313b-4f5c-8a14-cbe7dc3c1c7a', '297d8b41-7e7d-46c8-b424-4f386f457b8b'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-78717725', 'ctest-vn4-65954689'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-78717725', 'ctest-policy1-26114494']], 'subnet_ipam': [{'subnet_cidr': '161.90.37.192/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '26b8:686:f481:2993:71ef:66d1::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2026-04-03 13:21:07,116 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2026-04-03 13:21:07,451 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2026-04-03 13:21:07,502 - DEBUG - Requesting: http://10.0.0.38:8082/domain/d3fa6066-2972-4f98-9aa3-c23174dd5620 2026-04-03 13:21:07,523 - DEBUG - Requesting: http://10.0.0.38:8082/project/b37fcdf0-6e68-4b60-95c6-67cbcd35ef7f 2026-04-03 13:21:07,602 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/43f0deb4-c2b2-41ff-bf2b-09538590d5f3 2026-04-03 13:21:07,614 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/43f0deb4-c2b2-41ff-bf2b-09538590d5f3 2026-04-03 13:21:07,624 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/dfe2fba1-5c7b-4a03-a9a9-e212a5a4878c 2026-04-03 13:21:07,630 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/dfe2fba1-5c7b-4a03-a9a9-e212a5a4878c 2026-04-03 13:21:07,636 - DEBUG - Requesting: http://10.0.0.38:8082/route-target/3e15d28f-3621-4d86-9b99-6c3934ca27e1 2026-04-03 13:21:07,643 - DEBUG - Route Targets: ['target:64512:8000004'] 2026-04-03 13:21:07,643 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/43f0deb4-c2b2-41ff-bf2b-09538590d5f3 2026-04-03 13:21:07,652 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/dfe2fba1-5c7b-4a03-a9a9-e212a5a4878c 2026-04-03 13:21:07,666 - INFO - Verified VN network id 11 for VN 43f0deb4-c2b2-41ff-bf2b-09538590d5f3 2026-04-03 13:21:07,666 - INFO - Verifications in API Server for VN ctest-vn4-65954689 passed 2026-04-03 13:21:07,666 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/43f0deb4-c2b2-41ff-bf2b-09538590d5f3 2026-04-03 13:21:07,677 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/dfe2fba1-5c7b-4a03-a9a9-e212a5a4878c 2026-04-03 13:21:07,685 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/dfe2fba1-5c7b-4a03-a9a9-e212a5a4878c 2026-04-03 13:21:07,692 - DEBUG - Requesting: http://10.0.0.38:8082/route-target/3e15d28f-3621-4d86-9b99-6c3934ca27e1 2026-04-03 13:21:07,707 - DEBUG - Control-node 10.0.0.38 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-78717725:ctest-vn4-65954689', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-78717725', 'owner-access': '7', 'group': 'admin', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '4895657662893670911', 'uuid-lslong': '13775114139570591219'}, 'enable': 'true', 'created': '2026-04-03T13:21:06', 'last-modified': '2026-04-03T13:21:06', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.804271'} 2026-04-03 13:21:07,713 - DEBUG - Route Targets: ['target:64512:8000004'] 2026-04-03 13:21:07,714 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-65954689 passed 2026-04-03 13:21:07,714 - DEBUG - ====Verifying policy data for ctest-vn4-65954689 in API_Server ====== 2026-04-03 13:21:07,714 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2026-04-03 13:21:07,719 - DEBUG - Requesting: http://10.0.0.38:8082/domain/d3fa6066-2972-4f98-9aa3-c23174dd5620 2026-04-03 13:21:07,729 - DEBUG - Requesting: http://10.0.0.38:8082/project/b37fcdf0-6e68-4b60-95c6-67cbcd35ef7f 2026-04-03 13:21:07,808 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/43f0deb4-c2b2-41ff-bf2b-09538590d5f3 2026-04-03 13:21:07,822 - DEBUG - ==>Verifying data for policy with id: e92c9605-b94d-4871-9752-eebdc74bfc42, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-78717725', 'ctest-policy1-26114494'] 2026-04-03 13:21:07,822 - INFO - VN ctest-vn4-65954689 Policy verification: verify_vn_policy_in_api_server, status: True 2026-04-03 13:21:07,822 - DEBUG - Verifying the vn in opserver 2026-04-03 13:21:07,822 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-78717725:ctest-vn4-65954689 virtual network link through opserver 10.0.0.38 2026-04-03 13:21:07,822 - DEBUG - Requesting: http://10.0.0.38:8081/analytics/uves/virtual-networks 2026-04-03 13:21:08,113 - DEBUG - Requesting: http://10.0.0.38:8081/analytics/uves/virtual-networks 2026-04-03 13:21:08,182 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-78717725:ctest-vn4-65954689', 'href': 'http://10.0.0.38:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-78717725:ctest-vn4-65954689?flat'} 2026-04-03 13:21:08,182 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-78717725:ctest-vn4-65954689 is found in opserver 2026-04-03 13:21:08,192 - DEBUG - Do not have enough data to verify VN in agent 2026-04-03 13:21:08,198 - DEBUG - VRF ids for VN ctest-vn4-65954689: {} 2026-04-03 13:21:08,198 - DEBUG - ====Verifying data for ctest-policy1-26114494 in API_Server ====== 2026-04-03 13:21:08,199 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2026-04-03 13:21:08,205 - DEBUG - Requesting: http://10.0.0.38:8082/domain/d3fa6066-2972-4f98-9aa3-c23174dd5620 2026-04-03 13:21:08,216 - DEBUG - Requesting: http://10.0.0.38:8082/project/b37fcdf0-6e68-4b60-95c6-67cbcd35ef7f 2026-04-03 13:21:08,289 - DEBUG - Requesting: http://10.0.0.38:8082/network-policy/e92c9605-b94d-4871-9752-eebdc74bfc42 2026-04-03 13:21:08,300 - INFO - Verified policy ctest-policy1-26114494 in API Server, Result: True 2026-04-03 13:21:08,300 - INFO - Done with setup and verification, moving onto test .. 2026-04-03 13:21:08,309 - INFO - Deleting VN ctest-vn4-65954689 2026-04-03 13:21:08,450 - DEBUG - Response for deleting network () 2026-04-03 13:21:08,450 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/dfe2fba1-5c7b-4a03-a9a9-e212a5a4878c 2026-04-03 13:21:08,456 - DEBUG - Response Code: 404 2026-04-03 13:21:08,456 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2026-04-03 13:21:08,464 - DEBUG - Requesting: http://10.0.0.38:8082/domain/d3fa6066-2972-4f98-9aa3-c23174dd5620 2026-04-03 13:21:08,518 - DEBUG - Requesting: http://10.0.0.38:8082/project/b37fcdf0-6e68-4b60-95c6-67cbcd35ef7f 2026-04-03 13:21:08,592 - INFO - Validated that VN ctest-vn4-65954689 is not found in API Server 2026-04-03 13:21:08,603 - DEBUG - VN ctest-vn4-65954689 is not present in Agent 10.0.0.38 2026-04-03 13:21:08,603 - INFO - Validated that VN ctest-vn4-65954689 is not in any agent 2026-04-03 13:21:08,619 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-65954689 info 2026-04-03 13:21:08,645 - INFO - Deleted policy ctest-policy1-26114494 2026-04-03 13:21:08,812 - DEBUG - policy ctest-policy1-26114494 is not found in API Server 2026-04-03 13:21:09,089 - DEBUG - No XMPP flaps were noticed during the test
2026-04-03 13:21:09,089 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04]
2026-04-03 13:21:09,090 - INFO - -------------------------------------------------------------------------------- 2026-04-03 13:21:09,375 - DEBUG - No XMPP flaps were noticed during the test
2026-04-03 13:21:09,375 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:05]
2026-04-03 13:21:09,375 - INFO - -------------------------------------------------------------------------------- 2026-04-03 13:21:10,117 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-78717725, ID : b37fcdf0-6e68-4b60-95c6-67cbcd35ef7f