2026-01-20 15:38:03,315 - INFO - Domain Default found not creating 2026-01-20 15:38:03,545 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-28643283 not found, creating it 2026-01-20 15:38:04,089 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-28643283, ID : b5a5834f-bb47-4c30-8994-c6aea5ceb903 2026-01-20 15:38:05,927 - INFO - ================================================================================ 2026-01-20 15:38:05,927 - INFO - STARTING TEST : test_remove_policy_with_ref 2026-01-20 15:38:06,190 - DEBUG - Nothing to compare xmpp stats {'10.0.0.50': {'10.20.0.254': '0'}} with 2026-01-20 15:38:06,190 - INFO - Initial checks done. Running the testcase now 2026-01-20 15:38:06,191 - INFO - 2026-01-20 15:38:06,191 - INFO - ================================================================================ 2026-01-20 15:38:06,191 - INFO - STARTING TEST : test_remove_policy_with_ref 2026-01-20 15:38:06,191 - 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-01-20 15:38:06,503 - DEBUG - Nothing to compare xmpp stats {'10.0.0.50': {'10.20.0.254': '0'}} with 2026-01-20 15:38:06,503 - INFO - Initial checks done. Running the testcase now 2026-01-20 15:38:06,503 - INFO - 2026-01-20 15:38:06,900 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-28643283:ctest-vn4-55066679, 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-28643283:ctest-vn4-55066679, 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-28643283:ctest-vn4-55066679, 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-28643283:ctest-vn4-55066679, 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-01-20 15:38:07,477 - DEBUG - Response for create_network : {'network': {'id': '0561198e-94e4-4c0e-8473-c56a6f88504f', 'name': 'ctest-vn4-55066679', 'tenant_id': 'b5a5834fbb474c308994c6aea5ceb903', 'project_id': 'b5a5834fbb474c308994c6aea5ceb903', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-28643283', 'ctest-vn4-55066679'], 'port_security_enabled': True, 'description': ''}} 2026-01-20 15:38:07,658 - DEBUG - Response for create_subnet : {'subnet': {'id': 'b6ada57c-e83f-49d1-8a42-ae79d8a43d32', 'name': '', 'tenant_id': 'b5a5834fbb474c308994c6aea5ceb903', 'network_id': '0561198e-94e4-4c0e-8473-c56a6f88504f', 'ip_version': 4, 'cidr': '156.51.115.0/26', 'allocation_pools': [{'start': '156.51.115.2', 'end': '156.51.115.62'}], 'gateway_ip': '156.51.115.1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '156.51.115.2', 'tags': [], 'project_id': 'b5a5834fbb474c308994c6aea5ceb903'}} 2026-01-20 15:38:07,865 - DEBUG - Response for create_subnet : {'subnet': {'id': 'e4142bd6-f9ed-46a5-a0af-ff7b76bc59d7', 'name': '', 'tenant_id': 'b5a5834fbb474c308994c6aea5ceb903', 'network_id': '0561198e-94e4-4c0e-8473-c56a6f88504f', 'ip_version': 6, 'cidr': '22e6:82ee:8e57:11a7:ec39:7470::/96', 'allocation_pools': [{'start': '22e6:82ee:8e57:11a7:ec39:7470:0:2', 'end': '22e6:82ee:8e57:11a7:ec39:7470:ffff:fffe'}], 'gateway_ip': '22e6:82ee:8e57:11a7:ec39:7470:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '22e6:82ee:8e57:11a7:ec39:7470:0:2', 'tags': [], 'project_id': 'b5a5834fbb474c308994c6aea5ceb903'}} 2026-01-20 15:38:07,890 - INFO - Created VN ctest-vn4-55066679 2026-01-20 15:38:07,946 - DEBUG - VN ctest-vn4-55066679 UUID is 0561198e-94e4-4c0e-8473-c56a6f88504f 2026-01-20 15:38:08,192 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': '0561198e-94e4-4c0e-8473-c56a6f88504f', 'name': 'ctest-vn4-55066679', 'tenant_id': 'b5a5834fbb474c308994c6aea5ceb903', 'project_id': 'b5a5834fbb474c308994c6aea5ceb903', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['b6ada57c-e83f-49d1-8a42-ae79d8a43d32', 'e4142bd6-f9ed-46a5-a0af-ff7b76bc59d7'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-28643283', 'ctest-vn4-55066679'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-28643283', 'ctest-policy1-98997959']], 'subnet_ipam': [{'subnet_cidr': '156.51.115.0/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '22e6:82ee:8e57:11a7:ec39:7470::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2026-01-20 15:38:08,374 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2026-01-20 15:38:08,691 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2026-01-20 15:38:08,731 - DEBUG - Requesting: http://10.0.0.50:8082/domain/3bc5aa90-91ed-41a6-8596-526f2437f8ef 2026-01-20 15:38:08,747 - DEBUG - Requesting: http://10.0.0.50:8082/project/b5a5834f-bb47-4c30-8994-c6aea5ceb903 2026-01-20 15:38:08,825 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/0561198e-94e4-4c0e-8473-c56a6f88504f 2026-01-20 15:38:08,839 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/0561198e-94e4-4c0e-8473-c56a6f88504f 2026-01-20 15:38:08,852 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/70a0083d-78f5-4e94-9775-412b9d9071e2 2026-01-20 15:38:08,861 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/70a0083d-78f5-4e94-9775-412b9d9071e2 2026-01-20 15:38:08,869 - DEBUG - Requesting: http://10.0.0.50:8082/route-target/69221f06-e11b-4205-abac-bad517dbade6 2026-01-20 15:38:08,878 - DEBUG - Route Targets: ['target:64512:8000004'] 2026-01-20 15:38:08,878 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/0561198e-94e4-4c0e-8473-c56a6f88504f 2026-01-20 15:38:08,891 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/70a0083d-78f5-4e94-9775-412b9d9071e2 2026-01-20 15:38:08,909 - INFO - Verified VN network id 12 for VN 0561198e-94e4-4c0e-8473-c56a6f88504f 2026-01-20 15:38:08,909 - INFO - Verifications in API Server for VN ctest-vn4-55066679 passed 2026-01-20 15:38:08,910 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/0561198e-94e4-4c0e-8473-c56a6f88504f 2026-01-20 15:38:08,924 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/70a0083d-78f5-4e94-9775-412b9d9071e2 2026-01-20 15:38:08,935 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/70a0083d-78f5-4e94-9775-412b9d9071e2 2026-01-20 15:38:08,945 - DEBUG - Requesting: http://10.0.0.50:8082/route-target/69221f06-e11b-4205-abac-bad517dbade6 2026-01-20 15:38:08,960 - DEBUG - Control-node 10.0.0.50 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-28643283:ctest-vn4-55066679', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-28643283', 'owner-access': '7', 'group': 'member', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '387619143104613390', 'uuid-lslong': '9544189096256622671'}, 'enable': 'true', 'created': '2026-01-20T15:38:07', 'last-modified': '2026-01-20T15:38:08', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.807017'} 2026-01-20 15:38:08,967 - DEBUG - Route Targets: ['target:64512:8000004'] 2026-01-20 15:38:08,967 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-55066679 passed 2026-01-20 15:38:08,968 - DEBUG - ====Verifying policy data for ctest-vn4-55066679 in API_Server ====== 2026-01-20 15:38:08,968 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2026-01-20 15:38:08,975 - DEBUG - Requesting: http://10.0.0.50:8082/domain/3bc5aa90-91ed-41a6-8596-526f2437f8ef 2026-01-20 15:38:08,989 - DEBUG - Requesting: http://10.0.0.50:8082/project/b5a5834f-bb47-4c30-8994-c6aea5ceb903 2026-01-20 15:38:09,063 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/0561198e-94e4-4c0e-8473-c56a6f88504f 2026-01-20 15:38:09,074 - DEBUG - ==>Verifying data for policy with id: 0e8f1d0e-36fc-464d-9070-5565eb09bcb3, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-28643283', 'ctest-policy1-98997959'] 2026-01-20 15:38:09,075 - INFO - VN ctest-vn4-55066679 Policy verification: verify_vn_policy_in_api_server, status: True 2026-01-20 15:38:09,075 - DEBUG - Verifying the vn in opserver 2026-01-20 15:38:09,075 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-28643283:ctest-vn4-55066679 virtual network link through opserver 10.0.0.50 2026-01-20 15:38:09,075 - DEBUG - Requesting: http://10.0.0.50:8081/analytics/uves/virtual-networks 2026-01-20 15:38:09,387 - DEBUG - Requesting: http://10.0.0.50:8081/analytics/uves/virtual-networks 2026-01-20 15:38:09,466 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-28643283:ctest-vn4-55066679', 'href': 'http://10.0.0.50:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-28643283:ctest-vn4-55066679?flat'} 2026-01-20 15:38:09,466 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-28643283:ctest-vn4-55066679 is found in opserver 2026-01-20 15:38:09,477 - DEBUG - Do not have enough data to verify VN in agent 2026-01-20 15:38:09,483 - DEBUG - VRF ids for VN ctest-vn4-55066679: {} 2026-01-20 15:38:09,483 - DEBUG - ====Verifying data for ctest-policy1-98997959 in API_Server ====== 2026-01-20 15:38:09,484 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2026-01-20 15:38:09,491 - DEBUG - Requesting: http://10.0.0.50:8082/domain/3bc5aa90-91ed-41a6-8596-526f2437f8ef 2026-01-20 15:38:09,503 - DEBUG - Requesting: http://10.0.0.50:8082/project/b5a5834f-bb47-4c30-8994-c6aea5ceb903 2026-01-20 15:38:09,577 - DEBUG - Requesting: http://10.0.0.50:8082/network-policy/0e8f1d0e-36fc-464d-9070-5565eb09bcb3 2026-01-20 15:38:09,589 - INFO - Verified policy ctest-policy1-98997959 in API Server, Result: True 2026-01-20 15:38:09,589 - INFO - Done with setup and verification, moving onto test .. 2026-01-20 15:38:09,601 - INFO - Deleting VN ctest-vn4-55066679 2026-01-20 15:38:09,759 - DEBUG - Response for deleting network () 2026-01-20 15:38:09,759 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/70a0083d-78f5-4e94-9775-412b9d9071e2 2026-01-20 15:38:09,765 - DEBUG - Response Code: 404 2026-01-20 15:38:09,765 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2026-01-20 15:38:09,774 - DEBUG - Requesting: http://10.0.0.50:8082/domain/3bc5aa90-91ed-41a6-8596-526f2437f8ef 2026-01-20 15:38:09,832 - DEBUG - Requesting: http://10.0.0.50:8082/project/b5a5834f-bb47-4c30-8994-c6aea5ceb903 2026-01-20 15:38:09,908 - INFO - Validated that VN ctest-vn4-55066679 is not found in API Server 2026-01-20 15:38:09,919 - DEBUG - VN ctest-vn4-55066679 is not present in Agent 10.0.0.50 2026-01-20 15:38:09,919 - INFO - Validated that VN ctest-vn4-55066679 is not in any agent 2026-01-20 15:38:09,934 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-55066679 info 2026-01-20 15:38:09,963 - INFO - Deleted policy ctest-policy1-98997959 2026-01-20 15:38:10,138 - DEBUG - policy ctest-policy1-98997959 is not found in API Server 2026-01-20 15:38:10,407 - DEBUG - No XMPP flaps were noticed during the test 2026-01-20 15:38:10,407 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04] 2026-01-20 15:38:10,407 - INFO - -------------------------------------------------------------------------------- 2026-01-20 15:38:10,695 - DEBUG - No XMPP flaps were noticed during the test 2026-01-20 15:38:10,695 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:05] 2026-01-20 15:38:10,695 - INFO - -------------------------------------------------------------------------------- 2026-01-20 15:38:11,443 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-28643283, ID : b5a5834f-bb47-4c30-8994-c6aea5ceb903