2025-11-13 12:47:31,639 - INFO - Domain Default found not creating 2025-11-13 12:47:31,803 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-28477720 not found, creating it 2025-11-13 12:47:32,276 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-28477720, ID : 311b4f95-18f0-47f4-9801-6bab75e9bb31 2025-11-13 12:47:33,706 - INFO - ================================================================================ 2025-11-13 12:47:33,706 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-11-13 12:47:33,967 - DEBUG - Nothing to compare xmpp stats {'10.0.0.38': {'10.20.0.254': '0'}} with 2025-11-13 12:47:33,967 - INFO - Initial checks done. Running the testcase now 2025-11-13 12:47:33,967 - INFO - 2025-11-13 12:47:33,967 - INFO - ================================================================================ 2025-11-13 12:47:33,967 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-11-13 12:47:33,967 - 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-13 12:47:34,255 - DEBUG - Nothing to compare xmpp stats {'10.0.0.38': {'10.20.0.254': '0'}} with 2025-11-13 12:47:34,255 - INFO - Initial checks done. Running the testcase now 2025-11-13 12:47:34,255 - INFO - 2025-11-13 12:47:34,607 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-28477720:ctest-vn4-06885501, 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-28477720:ctest-vn4-06885501, 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-28477720:ctest-vn4-06885501, 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-28477720:ctest-vn4-06885501, 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-13 12:47:35,135 - DEBUG - Response for create_network : {'network': {'id': '9177e070-5473-4136-aa90-5dbaf1448f95', 'name': 'ctest-vn4-06885501', 'tenant_id': '311b4f9518f047f498016bab75e9bb31', 'project_id': '311b4f9518f047f498016bab75e9bb31', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-28477720', 'ctest-vn4-06885501'], 'port_security_enabled': True, 'description': ''}} 2025-11-13 12:47:35,349 - DEBUG - Response for create_subnet : {'subnet': {'id': '49bbff91-f791-44e8-bc59-991ef3d4c6b1', 'name': '', 'tenant_id': '311b4f9518f047f498016bab75e9bb31', 'network_id': '9177e070-5473-4136-aa90-5dbaf1448f95', 'ip_version': 4, 'cidr': '154.132.72.128/26', 'allocation_pools': [{'start': '154.132.72.130', 'end': '154.132.72.190'}], 'gateway_ip': '154.132.72.129', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '154.132.72.130', 'tags': [], 'project_id': '311b4f9518f047f498016bab75e9bb31'}} 2025-11-13 12:47:35,546 - DEBUG - Response for create_subnet : {'subnet': {'id': '6d50cf7b-3b5f-4959-825c-3625b6b25977', 'name': '', 'tenant_id': '311b4f9518f047f498016bab75e9bb31', 'network_id': '9177e070-5473-4136-aa90-5dbaf1448f95', 'ip_version': 6, 'cidr': '2183:f42d:50a8:d273:d8c8:9d59::/96', 'allocation_pools': [{'start': '2183:f42d:50a8:d273:d8c8:9d59:0:2', 'end': '2183:f42d:50a8:d273:d8c8:9d59:ffff:fffe'}], 'gateway_ip': '2183:f42d:50a8:d273:d8c8:9d59:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '2183:f42d:50a8:d273:d8c8:9d59:0:2', 'tags': [], 'project_id': '311b4f9518f047f498016bab75e9bb31'}} 2025-11-13 12:47:35,564 - INFO - Created VN ctest-vn4-06885501 2025-11-13 12:47:35,618 - DEBUG - VN ctest-vn4-06885501 UUID is 9177e070-5473-4136-aa90-5dbaf1448f95 2025-11-13 12:47:35,811 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': '9177e070-5473-4136-aa90-5dbaf1448f95', 'name': 'ctest-vn4-06885501', 'tenant_id': '311b4f9518f047f498016bab75e9bb31', 'project_id': '311b4f9518f047f498016bab75e9bb31', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['49bbff91-f791-44e8-bc59-991ef3d4c6b1', '6d50cf7b-3b5f-4959-825c-3625b6b25977'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-28477720', 'ctest-vn4-06885501'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-28477720', 'ctest-policy1-25589054']], 'subnet_ipam': [{'subnet_cidr': '154.132.72.128/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '2183:f42d:50a8:d273:d8c8:9d59::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2025-11-13 12:47:35,966 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2025-11-13 12:47:36,259 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2025-11-13 12:47:36,287 - DEBUG - Requesting: http://10.0.0.38:8082/domain/cffd1dc8-b619-4051-90c2-fd7f00aedc9a 2025-11-13 12:47:36,298 - DEBUG - Requesting: http://10.0.0.38:8082/project/311b4f95-18f0-47f4-9801-6bab75e9bb31 2025-11-13 12:47:36,367 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/9177e070-5473-4136-aa90-5dbaf1448f95 2025-11-13 12:47:36,378 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/9177e070-5473-4136-aa90-5dbaf1448f95 2025-11-13 12:47:36,388 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/deb8ba8e-a8e8-4769-9c91-a288129de1da 2025-11-13 12:47:36,396 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/deb8ba8e-a8e8-4769-9c91-a288129de1da 2025-11-13 12:47:36,402 - DEBUG - Requesting: http://10.0.0.38:8082/route-target/1a81507d-e774-4d6e-8c57-4a44ed4f5a42 2025-11-13 12:47:36,408 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-11-13 12:47:36,408 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/9177e070-5473-4136-aa90-5dbaf1448f95 2025-11-13 12:47:36,417 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/deb8ba8e-a8e8-4769-9c91-a288129de1da 2025-11-13 12:47:36,431 - INFO - Verified VN network id 11 for VN 9177e070-5473-4136-aa90-5dbaf1448f95 2025-11-13 12:47:36,431 - INFO - Verifications in API Server for VN ctest-vn4-06885501 passed 2025-11-13 12:47:36,431 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/9177e070-5473-4136-aa90-5dbaf1448f95 2025-11-13 12:47:36,439 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/deb8ba8e-a8e8-4769-9c91-a288129de1da 2025-11-13 12:47:36,445 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/deb8ba8e-a8e8-4769-9c91-a288129de1da 2025-11-13 12:47:36,451 - DEBUG - Requesting: http://10.0.0.38:8082/route-target/1a81507d-e774-4d6e-8c57-4a44ed4f5a42 2025-11-13 12:47:36,461 - DEBUG - Control-node 10.0.0.38 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-28477720:ctest-vn4-06885501', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-28477720', 'owner-access': '7', 'group': 'reader', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '10482093430785917238', 'uuid-lslong': '12290426440587186069'}, 'enable': 'true', 'created': '2025-11-13T12:47:35', 'last-modified': '2025-11-13T12:47:35', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.677754'} 2025-11-13 12:47:36,467 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-11-13 12:47:36,467 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-06885501 passed 2025-11-13 12:47:36,467 - DEBUG - ====Verifying policy data for ctest-vn4-06885501 in API_Server ====== 2025-11-13 12:47:36,470 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2025-11-13 12:47:36,474 - DEBUG - Requesting: http://10.0.0.38:8082/domain/cffd1dc8-b619-4051-90c2-fd7f00aedc9a 2025-11-13 12:47:36,484 - DEBUG - Requesting: http://10.0.0.38:8082/project/311b4f95-18f0-47f4-9801-6bab75e9bb31 2025-11-13 12:47:36,552 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/9177e070-5473-4136-aa90-5dbaf1448f95 2025-11-13 12:47:36,561 - DEBUG - ==>Verifying data for policy with id: 26cd25d2-9e10-4052-8de1-e4230bee49e4, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-28477720', 'ctest-policy1-25589054'] 2025-11-13 12:47:36,561 - INFO - VN ctest-vn4-06885501 Policy verification: verify_vn_policy_in_api_server, status: True 2025-11-13 12:47:36,561 - DEBUG - Verifying the vn in opserver 2025-11-13 12:47:36,561 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-28477720:ctest-vn4-06885501 virtual network link through opserver 10.0.0.38 2025-11-13 12:47:36,561 - DEBUG - Requesting: http://10.0.0.38:8081/analytics/uves/virtual-networks 2025-11-13 12:47:36,851 - DEBUG - Requesting: http://10.0.0.38:8081/analytics/uves/virtual-networks 2025-11-13 12:47:37,215 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-28477720:ctest-vn4-06885501', 'href': 'http://10.0.0.38:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-28477720:ctest-vn4-06885501?flat'} 2025-11-13 12:47:37,215 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-28477720:ctest-vn4-06885501 is found in opserver 2025-11-13 12:47:37,225 - DEBUG - Do not have enough data to verify VN in agent 2025-11-13 12:47:37,229 - DEBUG - VRF ids for VN ctest-vn4-06885501: {} 2025-11-13 12:47:37,230 - DEBUG - ====Verifying data for ctest-policy1-25589054 in API_Server ====== 2025-11-13 12:47:37,230 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2025-11-13 12:47:37,235 - DEBUG - Requesting: http://10.0.0.38:8082/domain/cffd1dc8-b619-4051-90c2-fd7f00aedc9a 2025-11-13 12:47:37,246 - DEBUG - Requesting: http://10.0.0.38:8082/project/311b4f95-18f0-47f4-9801-6bab75e9bb31 2025-11-13 12:47:37,315 - DEBUG - Requesting: http://10.0.0.38:8082/network-policy/26cd25d2-9e10-4052-8de1-e4230bee49e4 2025-11-13 12:47:37,325 - INFO - Verified policy ctest-policy1-25589054 in API Server, Result: True 2025-11-13 12:47:37,325 - INFO - Done with setup and verification, moving onto test .. 2025-11-13 12:47:37,334 - INFO - Deleting VN ctest-vn4-06885501 2025-11-13 12:47:37,443 - DEBUG - Response for deleting network () 2025-11-13 12:47:37,443 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/deb8ba8e-a8e8-4769-9c91-a288129de1da 2025-11-13 12:47:37,447 - DEBUG - Response Code: 404 2025-11-13 12:47:37,447 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2025-11-13 12:47:37,452 - DEBUG - Requesting: http://10.0.0.38:8082/domain/cffd1dc8-b619-4051-90c2-fd7f00aedc9a 2025-11-13 12:47:37,502 - DEBUG - Requesting: http://10.0.0.38:8082/project/311b4f95-18f0-47f4-9801-6bab75e9bb31 2025-11-13 12:47:37,575 - INFO - Validated that VN ctest-vn4-06885501 is not found in API Server 2025-11-13 12:47:37,584 - DEBUG - VN ctest-vn4-06885501 is not present in Agent 10.0.0.38 2025-11-13 12:47:37,584 - INFO - Validated that VN ctest-vn4-06885501 is not in any agent 2025-11-13 12:47:37,598 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-06885501 info 2025-11-13 12:47:37,627 - INFO - Deleted policy ctest-policy1-25589054 2025-11-13 12:47:37,794 - DEBUG - policy ctest-policy1-25589054 is not found in API Server 2025-11-13 12:47:38,050 - DEBUG - No XMPP flaps were noticed during the test 2025-11-13 12:47:38,050 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:05] 2025-11-13 12:47:38,050 - INFO - -------------------------------------------------------------------------------- 2025-11-13 12:47:38,338 - DEBUG - No XMPP flaps were noticed during the test 2025-11-13 12:47:38,338 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:05] 2025-11-13 12:47:38,338 - INFO - -------------------------------------------------------------------------------- 2025-11-13 12:47:39,018 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-28477720, ID : 311b4f95-18f0-47f4-9801-6bab75e9bb31