2025-11-03 09:12:43,640 - INFO - Domain Default found not creating 2025-11-03 09:12:43,797 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-28373364 not found, creating it 2025-11-03 09:12:44,253 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-28373364, ID : 0df02aa8-539a-4dfd-816f-e1ff103320cc 2025-11-03 09:12:45,842 - INFO - ================================================================================ 2025-11-03 09:12:45,842 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-11-03 09:12:46,095 - DEBUG - Nothing to compare xmpp stats {'10.0.0.65': {'10.20.0.254': '0'}} with 2025-11-03 09:12:46,095 - INFO - Initial checks done. Running the testcase now 2025-11-03 09:12:46,096 - INFO - 2025-11-03 09:12:46,096 - INFO - ================================================================================ 2025-11-03 09:12:46,096 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-11-03 09:12:46,096 - 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. 2025-11-03 09:12:46,387 - DEBUG - Nothing to compare xmpp stats {'10.0.0.65': {'10.20.0.254': '0'}} with 2025-11-03 09:12:46,387 - INFO - Initial checks done. Running the testcase now 2025-11-03 09:12:46,387 - INFO - 2025-11-03 09:12:46,777 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-28373364:ctest-vn4-30507060, 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-28373364:ctest-vn4-30507060, 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-28373364:ctest-vn4-30507060, 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-28373364:ctest-vn4-30507060, 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] 2025-11-03 09:12:47,289 - DEBUG - Response for create_network : {'network': {'id': '96152011-9a24-48f1-8d90-17fd3962f003', 'name': 'ctest-vn4-30507060', 'tenant_id': '0df02aa8539a4dfd816fe1ff103320cc', 'project_id': '0df02aa8539a4dfd816fe1ff103320cc', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-28373364', 'ctest-vn4-30507060'], 'port_security_enabled': True, 'description': ''}} 2025-11-03 09:12:47,483 - DEBUG - Response for create_subnet : {'subnet': {'id': 'fe89d24d-33d8-4751-9ae9-27eb26ecec92', 'name': '', 'tenant_id': '0df02aa8539a4dfd816fe1ff103320cc', 'network_id': '96152011-9a24-48f1-8d90-17fd3962f003', 'ip_version': 4, 'cidr': '37.91.123.0/26', 'allocation_pools': [{'start': '37.91.123.2', 'end': '37.91.123.62'}], 'gateway_ip': '37.91.123.1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '37.91.123.2', 'tags': [], 'project_id': '0df02aa8539a4dfd816fe1ff103320cc'}} 2025-11-03 09:12:47,632 - DEBUG - Response for create_subnet : {'subnet': {'id': '07dbebb9-d236-41ec-9178-e04bf63cdef3', 'name': '', 'tenant_id': '0df02aa8539a4dfd816fe1ff103320cc', 'network_id': '96152011-9a24-48f1-8d90-17fd3962f003', 'ip_version': 6, 'cidr': '3aad:fdfb:72b1:5650:4a35:bdf9::/96', 'allocation_pools': [{'start': '3aad:fdfb:72b1:5650:4a35:bdf9:0:2', 'end': '3aad:fdfb:72b1:5650:4a35:bdf9:ffff:fffe'}], 'gateway_ip': '3aad:fdfb:72b1:5650:4a35:bdf9:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '3aad:fdfb:72b1:5650:4a35:bdf9:0:2', 'tags': [], 'project_id': '0df02aa8539a4dfd816fe1ff103320cc'}} 2025-11-03 09:12:47,652 - INFO - Created VN ctest-vn4-30507060 2025-11-03 09:12:47,702 - DEBUG - VN ctest-vn4-30507060 UUID is 96152011-9a24-48f1-8d90-17fd3962f003 2025-11-03 09:12:47,902 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': '96152011-9a24-48f1-8d90-17fd3962f003', 'name': 'ctest-vn4-30507060', 'tenant_id': '0df02aa8539a4dfd816fe1ff103320cc', 'project_id': '0df02aa8539a4dfd816fe1ff103320cc', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['fe89d24d-33d8-4751-9ae9-27eb26ecec92', '07dbebb9-d236-41ec-9178-e04bf63cdef3'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-28373364', 'ctest-vn4-30507060'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-28373364', 'ctest-policy1-67235416']], 'subnet_ipam': [{'subnet_cidr': '37.91.123.0/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '3aad:fdfb:72b1:5650:4a35:bdf9::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2025-11-03 09:12:48,070 - DEBUG - Requesting: http://10.0.0.65:8082/domains 2025-11-03 09:12:48,402 - DEBUG - Requesting: http://10.0.0.65:8082/domains 2025-11-03 09:12:48,432 - DEBUG - Requesting: http://10.0.0.65:8082/domain/411773d3-55f5-43b5-aeca-a54e26606168 2025-11-03 09:12:48,444 - DEBUG - Requesting: http://10.0.0.65:8082/project/0df02aa8-539a-4dfd-816f-e1ff103320cc 2025-11-03 09:12:48,519 - DEBUG - Requesting: http://10.0.0.65:8082/virtual-network/96152011-9a24-48f1-8d90-17fd3962f003 2025-11-03 09:12:48,531 - DEBUG - Requesting: http://10.0.0.65:8082/virtual-network/96152011-9a24-48f1-8d90-17fd3962f003 2025-11-03 09:12:48,540 - DEBUG - Requesting: http://10.0.0.65:8082/routing-instance/76e97995-aecc-4a59-ba6b-7b248f085514 2025-11-03 09:12:48,546 - DEBUG - Requesting: http://10.0.0.65:8082/routing-instance/76e97995-aecc-4a59-ba6b-7b248f085514 2025-11-03 09:12:48,551 - DEBUG - Requesting: http://10.0.0.65:8082/route-target/5816af4e-7566-480b-951b-7fa88463ae09 2025-11-03 09:12:48,557 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-11-03 09:12:48,557 - DEBUG - Requesting: http://10.0.0.65:8082/virtual-network/96152011-9a24-48f1-8d90-17fd3962f003 2025-11-03 09:12:48,565 - DEBUG - Requesting: http://10.0.0.65:8082/routing-instance/76e97995-aecc-4a59-ba6b-7b248f085514 2025-11-03 09:12:48,577 - INFO - Verified VN network id 11 for VN 96152011-9a24-48f1-8d90-17fd3962f003 2025-11-03 09:12:48,577 - INFO - Verifications in API Server for VN ctest-vn4-30507060 passed 2025-11-03 09:12:48,577 - DEBUG - Requesting: http://10.0.0.65:8082/virtual-network/96152011-9a24-48f1-8d90-17fd3962f003 2025-11-03 09:12:48,586 - DEBUG - Requesting: http://10.0.0.65:8082/routing-instance/76e97995-aecc-4a59-ba6b-7b248f085514 2025-11-03 09:12:48,592 - DEBUG - Requesting: http://10.0.0.65:8082/routing-instance/76e97995-aecc-4a59-ba6b-7b248f085514 2025-11-03 09:12:48,597 - DEBUG - Requesting: http://10.0.0.65:8082/route-target/5816af4e-7566-480b-951b-7fa88463ae09 2025-11-03 09:12:48,607 - DEBUG - Control-node 10.0.0.65 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-28373364:ctest-vn4-30507060', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-28373364', 'owner-access': '7', 'group': 'admin', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '10814585340172716273', 'uuid-lslong': '10200679532351123459'}, 'enable': 'true', 'created': '2025-11-03T09:12:47', 'last-modified': '2025-11-03T09:12:47', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.725685'} 2025-11-03 09:12:48,615 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-11-03 09:12:48,615 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-30507060 passed 2025-11-03 09:12:48,615 - DEBUG - ====Verifying policy data for ctest-vn4-30507060 in API_Server ====== 2025-11-03 09:12:48,615 - DEBUG - Requesting: http://10.0.0.65:8082/domains 2025-11-03 09:12:48,620 - DEBUG - Requesting: http://10.0.0.65:8082/domain/411773d3-55f5-43b5-aeca-a54e26606168 2025-11-03 09:12:48,632 - DEBUG - Requesting: http://10.0.0.65:8082/project/0df02aa8-539a-4dfd-816f-e1ff103320cc 2025-11-03 09:12:48,699 - DEBUG - Requesting: http://10.0.0.65:8082/virtual-network/96152011-9a24-48f1-8d90-17fd3962f003 2025-11-03 09:12:48,708 - DEBUG - ==>Verifying data for policy with id: 8e5c2b76-c6d6-4070-ae29-6153a708adcd, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-28373364', 'ctest-policy1-67235416'] 2025-11-03 09:12:48,708 - INFO - VN ctest-vn4-30507060 Policy verification: verify_vn_policy_in_api_server, status: True 2025-11-03 09:12:48,708 - DEBUG - Verifying the vn in opserver 2025-11-03 09:12:48,708 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-28373364:ctest-vn4-30507060 virtual network link through opserver 10.0.0.65 2025-11-03 09:12:48,709 - DEBUG - Requesting: http://10.0.0.65:8081/analytics/uves/virtual-networks 2025-11-03 09:12:49,039 - DEBUG - Requesting: http://10.0.0.65:8081/analytics/uves/virtual-networks 2025-11-03 09:12:49,096 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-28373364:ctest-vn4-30507060', 'href': 'http://10.0.0.65:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-28373364:ctest-vn4-30507060?flat'} 2025-11-03 09:12:49,097 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-28373364:ctest-vn4-30507060 is found in opserver 2025-11-03 09:12:49,106 - DEBUG - Do not have enough data to verify VN in agent 2025-11-03 09:12:49,110 - DEBUG - VRF ids for VN ctest-vn4-30507060: {} 2025-11-03 09:12:49,111 - DEBUG - ====Verifying data for ctest-policy1-67235416 in API_Server ====== 2025-11-03 09:12:49,111 - DEBUG - Requesting: http://10.0.0.65:8082/domains 2025-11-03 09:12:49,116 - DEBUG - Requesting: http://10.0.0.65:8082/domain/411773d3-55f5-43b5-aeca-a54e26606168 2025-11-03 09:12:49,127 - DEBUG - Requesting: http://10.0.0.65:8082/project/0df02aa8-539a-4dfd-816f-e1ff103320cc 2025-11-03 09:12:49,193 - DEBUG - Requesting: http://10.0.0.65:8082/network-policy/8e5c2b76-c6d6-4070-ae29-6153a708adcd 2025-11-03 09:12:49,202 - INFO - Verified policy ctest-policy1-67235416 in API Server, Result: True 2025-11-03 09:12:49,203 - INFO - Done with setup and verification, moving onto test .. 2025-11-03 09:12:49,209 - INFO - Deleting VN ctest-vn4-30507060 2025-11-03 09:12:49,327 - DEBUG - Response for deleting network () 2025-11-03 09:12:49,327 - DEBUG - Requesting: http://10.0.0.65:8082/routing-instance/76e97995-aecc-4a59-ba6b-7b248f085514 2025-11-03 09:12:49,332 - DEBUG - Response Code: 404 2025-11-03 09:12:49,332 - DEBUG - Requesting: http://10.0.0.65:8082/domains 2025-11-03 09:12:49,337 - DEBUG - Requesting: http://10.0.0.65:8082/domain/411773d3-55f5-43b5-aeca-a54e26606168 2025-11-03 09:12:49,392 - DEBUG - Requesting: http://10.0.0.65:8082/project/0df02aa8-539a-4dfd-816f-e1ff103320cc 2025-11-03 09:12:49,468 - INFO - Validated that VN ctest-vn4-30507060 is not found in API Server 2025-11-03 09:12:49,477 - DEBUG - VN ctest-vn4-30507060 is not present in Agent 10.0.0.65 2025-11-03 09:12:49,478 - INFO - Validated that VN ctest-vn4-30507060 is not in any agent 2025-11-03 09:12:49,490 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-30507060 info 2025-11-03 09:12:49,514 - INFO - Deleted policy ctest-policy1-67235416 2025-11-03 09:12:49,678 - DEBUG - policy ctest-policy1-67235416 is not found in API Server 2025-11-03 09:12:49,935 - DEBUG - No XMPP flaps were noticed during the test
2025-11-03 09:12:49,935 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:03]
2025-11-03 09:12:49,935 - INFO - -------------------------------------------------------------------------------- 2025-11-03 09:12:50,224 - DEBUG - No XMPP flaps were noticed during the test
2025-11-03 09:12:50,224 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:05]
2025-11-03 09:12:50,224 - INFO - -------------------------------------------------------------------------------- 2025-11-03 09:12:51,007 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-28373364, ID : 0df02aa8-539a-4dfd-816f-e1ff103320cc