2025-09-08 12:49:13,009 - INFO - Domain Default found not creating 2025-09-08 12:49:13,144 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-96686236 not found, creating it 2025-09-08 12:49:13,565 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-96686236, ID : d13e2df3-07a0-4e2e-89b9-ec47e9a02e51 2025-09-08 12:49:14,942 - INFO - ================================================================================ 2025-09-08 12:49:14,942 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-09-08 12:49:15,202 - DEBUG - Nothing to compare xmpp stats {'10.0.0.254': {'10.20.0.17': '0'}} with 2025-09-08 12:49:15,202 - INFO - Initial checks done. Running the testcase now 2025-09-08 12:49:15,203 - INFO - 2025-09-08 12:49:15,203 - INFO - ================================================================================ 2025-09-08 12:49:15,203 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-09-08 12:49:15,203 - 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-09-08 12:49:15,490 - DEBUG - Nothing to compare xmpp stats {'10.0.0.254': {'10.20.0.17': '0'}} with 2025-09-08 12:49:15,490 - INFO - Initial checks done. Running the testcase now 2025-09-08 12:49:15,490 - INFO - 2025-09-08 12:49:15,837 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-96686236:ctest-vn4-31533609, 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-96686236:ctest-vn4-31533609, 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-96686236:ctest-vn4-31533609, 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-96686236:ctest-vn4-31533609, 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-09-08 12:49:16,342 - DEBUG - Response for create_network : {'network': {'id': '42f71f5b-8c4e-4c5c-827b-4d6c267ccf57', 'name': 'ctest-vn4-31533609', 'tenant_id': 'd13e2df307a04e2e89b9ec47e9a02e51', 'project_id': 'd13e2df307a04e2e89b9ec47e9a02e51', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-96686236', 'ctest-vn4-31533609'], 'port_security_enabled': True, 'description': ''}} 2025-09-08 12:49:16,490 - DEBUG - Response for create_subnet : {'subnet': {'id': '19f0531a-eb6f-4195-9827-278dcc396b85', 'name': '', 'tenant_id': 'd13e2df307a04e2e89b9ec47e9a02e51', 'network_id': '42f71f5b-8c4e-4c5c-827b-4d6c267ccf57', 'ip_version': 4, 'cidr': '46.99.101.128/26', 'allocation_pools': [{'start': '46.99.101.130', 'end': '46.99.101.190'}], 'gateway_ip': '46.99.101.129', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '46.99.101.130', 'tags': [], 'project_id': 'd13e2df307a04e2e89b9ec47e9a02e51'}} 2025-09-08 12:49:16,638 - DEBUG - Response for create_subnet : {'subnet': {'id': '90489bcc-3d89-4e5b-9504-fb19da545f95', 'name': '', 'tenant_id': 'd13e2df307a04e2e89b9ec47e9a02e51', 'network_id': '42f71f5b-8c4e-4c5c-827b-4d6c267ccf57', 'ip_version': 6, 'cidr': '34f8:b595:7743:760d:f4d9:2e6f::/96', 'allocation_pools': [{'start': '34f8:b595:7743:760d:f4d9:2e6f:0:2', 'end': '34f8:b595:7743:760d:f4d9:2e6f:ffff:fffe'}], 'gateway_ip': '34f8:b595:7743:760d:f4d9:2e6f:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '34f8:b595:7743:760d:f4d9:2e6f:0:2', 'tags': [], 'project_id': 'd13e2df307a04e2e89b9ec47e9a02e51'}} 2025-09-08 12:49:16,655 - INFO - Created VN ctest-vn4-31533609 2025-09-08 12:49:16,705 - DEBUG - VN ctest-vn4-31533609 UUID is 42f71f5b-8c4e-4c5c-827b-4d6c267ccf57 2025-09-08 12:49:16,886 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': '42f71f5b-8c4e-4c5c-827b-4d6c267ccf57', 'name': 'ctest-vn4-31533609', 'tenant_id': 'd13e2df307a04e2e89b9ec47e9a02e51', 'project_id': 'd13e2df307a04e2e89b9ec47e9a02e51', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['19f0531a-eb6f-4195-9827-278dcc396b85', '90489bcc-3d89-4e5b-9504-fb19da545f95'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-96686236', 'ctest-vn4-31533609'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-96686236', 'ctest-policy1-76993294']], 'subnet_ipam': [{'subnet_cidr': '46.99.101.128/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '34f8:b595:7743:760d:f4d9:2e6f::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2025-09-08 12:49:17,049 - DEBUG - Requesting: http://10.0.0.254:8082/domains 2025-09-08 12:49:17,344 - DEBUG - Requesting: http://10.0.0.254:8082/domains 2025-09-08 12:49:17,370 - DEBUG - Requesting: http://10.0.0.254:8082/domain/b42a849c-efeb-4ae6-9594-7aa8d1081f90 2025-09-08 12:49:17,383 - DEBUG - Requesting: http://10.0.0.254:8082/project/d13e2df3-07a0-4e2e-89b9-ec47e9a02e51 2025-09-08 12:49:17,450 - DEBUG - Requesting: http://10.0.0.254:8082/virtual-network/42f71f5b-8c4e-4c5c-827b-4d6c267ccf57 2025-09-08 12:49:17,462 - DEBUG - Requesting: http://10.0.0.254:8082/virtual-network/42f71f5b-8c4e-4c5c-827b-4d6c267ccf57 2025-09-08 12:49:17,470 - DEBUG - Requesting: http://10.0.0.254:8082/routing-instance/68e2e02e-5a2a-4666-a0d7-d2905ad46678 2025-09-08 12:49:17,476 - DEBUG - Requesting: http://10.0.0.254:8082/routing-instance/68e2e02e-5a2a-4666-a0d7-d2905ad46678 2025-09-08 12:49:17,481 - DEBUG - Requesting: http://10.0.0.254:8082/route-target/266df4e3-7c86-43b0-906c-375bc8f6125e 2025-09-08 12:49:17,485 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-09-08 12:49:17,485 - DEBUG - Requesting: http://10.0.0.254:8082/virtual-network/42f71f5b-8c4e-4c5c-827b-4d6c267ccf57 2025-09-08 12:49:17,492 - DEBUG - Requesting: http://10.0.0.254:8082/routing-instance/68e2e02e-5a2a-4666-a0d7-d2905ad46678 2025-09-08 12:49:17,505 - INFO - Verified VN network id 12 for VN 42f71f5b-8c4e-4c5c-827b-4d6c267ccf57 2025-09-08 12:49:17,505 - INFO - Verifications in API Server for VN ctest-vn4-31533609 passed 2025-09-08 12:49:17,505 - DEBUG - Requesting: http://10.0.0.254:8082/virtual-network/42f71f5b-8c4e-4c5c-827b-4d6c267ccf57 2025-09-08 12:49:17,512 - DEBUG - Requesting: http://10.0.0.254:8082/routing-instance/68e2e02e-5a2a-4666-a0d7-d2905ad46678 2025-09-08 12:49:17,517 - DEBUG - Requesting: http://10.0.0.254:8082/routing-instance/68e2e02e-5a2a-4666-a0d7-d2905ad46678 2025-09-08 12:49:17,523 - DEBUG - Requesting: http://10.0.0.254:8082/route-target/266df4e3-7c86-43b0-906c-375bc8f6125e 2025-09-08 12:49:17,531 - DEBUG - Control-node 10.0.0.254 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-96686236:ctest-vn4-31533609', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-96686236', 'owner-access': '7', 'group': 'reader', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '4825360003807202396', 'uuid-lslong': '9402193773963562839'}, 'enable': 'true', 'created': '2025-09-08T12:49:16', 'last-modified': '2025-09-08T12:49:16', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.670475'} 2025-09-08 12:49:17,536 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-09-08 12:49:17,536 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-31533609 passed 2025-09-08 12:49:17,536 - DEBUG - ====Verifying policy data for ctest-vn4-31533609 in API_Server ====== 2025-09-08 12:49:17,536 - DEBUG - Requesting: http://10.0.0.254:8082/domains 2025-09-08 12:49:17,540 - DEBUG - Requesting: http://10.0.0.254:8082/domain/b42a849c-efeb-4ae6-9594-7aa8d1081f90 2025-09-08 12:49:17,552 - DEBUG - Requesting: http://10.0.0.254:8082/project/d13e2df3-07a0-4e2e-89b9-ec47e9a02e51 2025-09-08 12:49:17,619 - DEBUG - Requesting: http://10.0.0.254:8082/virtual-network/42f71f5b-8c4e-4c5c-827b-4d6c267ccf57 2025-09-08 12:49:17,628 - DEBUG - ==>Verifying data for policy with id: 3b75c3fd-eee5-46ea-8660-06b1ace40775, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-96686236', 'ctest-policy1-76993294'] 2025-09-08 12:49:17,628 - INFO - VN ctest-vn4-31533609 Policy verification: verify_vn_policy_in_api_server, status: True 2025-09-08 12:49:17,628 - DEBUG - Verifying the vn in opserver 2025-09-08 12:49:17,628 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-96686236:ctest-vn4-31533609 virtual network link through opserver 10.0.0.254 2025-09-08 12:49:17,628 - DEBUG - Requesting: http://10.0.0.254:8081/analytics/uves/virtual-networks 2025-09-08 12:49:17,916 - DEBUG - Requesting: http://10.0.0.254:8081/analytics/uves/virtual-networks 2025-09-08 12:49:17,965 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-96686236:ctest-vn4-31533609', 'href': 'http://10.0.0.254:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-96686236:ctest-vn4-31533609?flat'} 2025-09-08 12:49:17,965 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-96686236:ctest-vn4-31533609 is found in opserver 2025-09-08 12:49:17,974 - DEBUG - Do not have enough data to verify VN in agent 2025-09-08 12:49:17,978 - DEBUG - VRF ids for VN ctest-vn4-31533609: {} 2025-09-08 12:49:17,979 - DEBUG - ====Verifying data for ctest-policy1-76993294 in API_Server ====== 2025-09-08 12:49:17,979 - DEBUG - Requesting: http://10.0.0.254:8082/domains 2025-09-08 12:49:17,983 - DEBUG - Requesting: http://10.0.0.254:8082/domain/b42a849c-efeb-4ae6-9594-7aa8d1081f90 2025-09-08 12:49:17,993 - DEBUG - Requesting: http://10.0.0.254:8082/project/d13e2df3-07a0-4e2e-89b9-ec47e9a02e51 2025-09-08 12:49:18,061 - DEBUG - Requesting: http://10.0.0.254:8082/network-policy/3b75c3fd-eee5-46ea-8660-06b1ace40775 2025-09-08 12:49:18,070 - INFO - Verified policy ctest-policy1-76993294 in API Server, Result: True 2025-09-08 12:49:18,070 - INFO - Done with setup and verification, moving onto test .. 2025-09-08 12:49:18,077 - INFO - Deleting VN ctest-vn4-31533609 2025-09-08 12:49:18,188 - DEBUG - Response for deleting network () 2025-09-08 12:49:18,188 - DEBUG - Requesting: http://10.0.0.254:8082/routing-instance/68e2e02e-5a2a-4666-a0d7-d2905ad46678 2025-09-08 12:49:18,192 - DEBUG - Response Code: 404 2025-09-08 12:49:18,192 - DEBUG - Requesting: http://10.0.0.254:8082/domains 2025-09-08 12:49:18,197 - DEBUG - Requesting: http://10.0.0.254:8082/domain/b42a849c-efeb-4ae6-9594-7aa8d1081f90 2025-09-08 12:49:18,250 - DEBUG - Requesting: http://10.0.0.254:8082/project/d13e2df3-07a0-4e2e-89b9-ec47e9a02e51 2025-09-08 12:49:18,319 - INFO - Validated that VN ctest-vn4-31533609 is not found in API Server 2025-09-08 12:49:18,329 - DEBUG - VN ctest-vn4-31533609 is not present in Agent 10.0.0.254 2025-09-08 12:49:18,329 - INFO - Validated that VN ctest-vn4-31533609 is not in any agent 2025-09-08 12:49:18,343 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-31533609 info 2025-09-08 12:49:18,366 - INFO - Deleted policy ctest-policy1-76993294 2025-09-08 12:49:18,529 - DEBUG - policy ctest-policy1-76993294 is not found in API Server 2025-09-08 12:49:18,782 - DEBUG - No XMPP flaps were noticed during the test 2025-09-08 12:49:18,782 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:03] 2025-09-08 12:49:18,782 - INFO - -------------------------------------------------------------------------------- 2025-09-08 12:49:19,089 - DEBUG - No XMPP flaps were noticed during the test 2025-09-08 12:49:19,089 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:05] 2025-09-08 12:49:19,089 - INFO - -------------------------------------------------------------------------------- 2025-09-08 12:49:19,744 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-96686236, ID : d13e2df3-07a0-4e2e-89b9-ec47e9a02e51