2026-08-17 09:46:24,148 - INFO - Domain Default found not creating 2026-08-17 09:46:24,316 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-00134405 not found, creating it 2026-08-17 09:46:24,822 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-00134405, ID : 1ea0168d-f4ce-4826-a331-c1e574ea682d 2026-08-17 09:46:26,557 - INFO - ================================================================================ 2026-08-17 09:46:26,557 - INFO - STARTING TEST : test_remove_policy_with_ref 2026-08-17 09:46:26,818 - DEBUG - Nothing to compare xmpp stats {'10.0.0.161': {'10.20.0.254': '0'}} with 2026-08-17 09:46:26,819 - INFO - Initial checks done. Running the testcase now 2026-08-17 09:46:26,819 - INFO - 2026-08-17 09:46:26,819 - INFO - ================================================================================ 2026-08-17 09:46:26,819 - INFO - STARTING TEST : test_remove_policy_with_ref 2026-08-17 09:46:26,819 - 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-08-17 09:46:27,129 - DEBUG - Nothing to compare xmpp stats {'10.0.0.161': {'10.20.0.254': '0'}} with 2026-08-17 09:46:27,129 - INFO - Initial checks done. Running the testcase now 2026-08-17 09:46:27,129 - INFO - 2026-08-17 09:46:27,629 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-00134405:ctest-vn4-43121629, 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-00134405:ctest-vn4-43121629, 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-00134405:ctest-vn4-43121629, 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-00134405:ctest-vn4-43121629, 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-08-17 09:46:28,175 - DEBUG - Response for create_network : {'network': {'id': '9257ca15-5fe3-493c-83d0-79e6562f7996', 'name': 'ctest-vn4-43121629', 'tenant_id': '1ea0168df4ce4826a331c1e574ea682d', 'project_id': '1ea0168df4ce4826a331c1e574ea682d', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-00134405', 'ctest-vn4-43121629'], 'port_security_enabled': True, 'description': ''}} 2026-08-17 09:46:28,410 - DEBUG - Response for create_subnet : {'subnet': {'id': 'cc544d41-b409-4832-bc8d-75f2ae46b61d', 'name': '', 'tenant_id': '1ea0168df4ce4826a331c1e574ea682d', 'network_id': '9257ca15-5fe3-493c-83d0-79e6562f7996', 'ip_version': 4, 'cidr': '220.191.84.128/26', 'allocation_pools': [{'start': '220.191.84.130', 'end': '220.191.84.190'}], 'gateway_ip': '220.191.84.129', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '220.191.84.130', 'tags': [], 'project_id': '1ea0168df4ce4826a331c1e574ea682d'}} 2026-08-17 09:46:28,570 - DEBUG - Response for create_subnet : {'subnet': {'id': '76fd00b6-da4d-4741-a595-133b0faf490e', 'name': '', 'tenant_id': '1ea0168df4ce4826a331c1e574ea682d', 'network_id': '9257ca15-5fe3-493c-83d0-79e6562f7996', 'ip_version': 6, 'cidr': '2d2c:9fbc:625d:b999:dcd2:18a1::/96', 'allocation_pools': [{'start': '2d2c:9fbc:625d:b999:dcd2:18a1:0:2', 'end': '2d2c:9fbc:625d:b999:dcd2:18a1:ffff:fffe'}], 'gateway_ip': '2d2c:9fbc:625d:b999:dcd2:18a1:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '2d2c:9fbc:625d:b999:dcd2:18a1:0:2', 'tags': [], 'project_id': '1ea0168df4ce4826a331c1e574ea682d'}} 2026-08-17 09:46:28,592 - INFO - Created VN ctest-vn4-43121629 2026-08-17 09:46:28,644 - DEBUG - VN ctest-vn4-43121629 UUID is 9257ca15-5fe3-493c-83d0-79e6562f7996 2026-08-17 09:46:28,865 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': '9257ca15-5fe3-493c-83d0-79e6562f7996', 'name': 'ctest-vn4-43121629', 'tenant_id': '1ea0168df4ce4826a331c1e574ea682d', 'project_id': '1ea0168df4ce4826a331c1e574ea682d', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['cc544d41-b409-4832-bc8d-75f2ae46b61d', '76fd00b6-da4d-4741-a595-133b0faf490e'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-00134405', 'ctest-vn4-43121629'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-00134405', 'ctest-policy1-24484932']], 'subnet_ipam': [{'subnet_cidr': '220.191.84.128/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '2d2c:9fbc:625d:b999:dcd2:18a1::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2026-08-17 09:46:29,036 - DEBUG - Requesting: http://10.0.0.161:8082/domains 2026-08-17 09:46:29,409 - DEBUG - Requesting: http://10.0.0.161:8082/domains 2026-08-17 09:46:29,439 - DEBUG - Requesting: http://10.0.0.161:8082/domain/c0a87636-2201-40fd-8987-a049dbaf0e1e 2026-08-17 09:46:29,453 - DEBUG - Requesting: http://10.0.0.161:8082/project/1ea0168d-f4ce-4826-a331-c1e574ea682d 2026-08-17 09:46:29,532 - DEBUG - Requesting: http://10.0.0.161:8082/virtual-network/9257ca15-5fe3-493c-83d0-79e6562f7996 2026-08-17 09:46:29,546 - DEBUG - Requesting: http://10.0.0.161:8082/virtual-network/9257ca15-5fe3-493c-83d0-79e6562f7996 2026-08-17 09:46:29,556 - DEBUG - Requesting: http://10.0.0.161:8082/routing-instance/b28d2fca-9781-456c-9558-756e5ceb2d09 2026-08-17 09:46:29,564 - DEBUG - Requesting: http://10.0.0.161:8082/routing-instance/b28d2fca-9781-456c-9558-756e5ceb2d09 2026-08-17 09:46:29,571 - DEBUG - Requesting: http://10.0.0.161:8082/route-target/1ebc0eb6-2659-4f3c-8cb3-21781882d3ba 2026-08-17 09:46:29,578 - DEBUG - Route Targets: ['target:64512:8000004'] 2026-08-17 09:46:29,578 - DEBUG - Requesting: http://10.0.0.161:8082/virtual-network/9257ca15-5fe3-493c-83d0-79e6562f7996 2026-08-17 09:46:29,590 - DEBUG - Requesting: http://10.0.0.161:8082/routing-instance/b28d2fca-9781-456c-9558-756e5ceb2d09 2026-08-17 09:46:29,606 - INFO - Verified VN network id 11 for VN 9257ca15-5fe3-493c-83d0-79e6562f7996 2026-08-17 09:46:29,606 - INFO - Verifications in API Server for VN ctest-vn4-43121629 passed 2026-08-17 09:46:29,606 - DEBUG - Requesting: http://10.0.0.161:8082/virtual-network/9257ca15-5fe3-493c-83d0-79e6562f7996 2026-08-17 09:46:29,616 - DEBUG - Requesting: http://10.0.0.161:8082/routing-instance/b28d2fca-9781-456c-9558-756e5ceb2d09 2026-08-17 09:46:29,623 - DEBUG - Requesting: http://10.0.0.161:8082/routing-instance/b28d2fca-9781-456c-9558-756e5ceb2d09 2026-08-17 09:46:29,630 - DEBUG - Requesting: http://10.0.0.161:8082/route-target/1ebc0eb6-2659-4f3c-8cb3-21781882d3ba 2026-08-17 09:46:29,649 - DEBUG - Control-node 10.0.0.161 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-00134405:ctest-vn4-43121629', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-00134405', 'owner-access': '7', 'group': 'reader', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '10545119245663160636', 'uuid-lslong': '9498225644319766934'}, 'enable': 'true', 'created': '2026-08-17T09:46:28', 'last-modified': '2026-08-17T09:46:28', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.818834'} 2026-08-17 09:46:29,656 - DEBUG - Route Targets: ['target:64512:8000004'] 2026-08-17 09:46:29,656 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-43121629 passed 2026-08-17 09:46:29,656 - DEBUG - ====Verifying policy data for ctest-vn4-43121629 in API_Server ====== 2026-08-17 09:46:29,656 - DEBUG - Requesting: http://10.0.0.161:8082/domains 2026-08-17 09:46:29,662 - DEBUG - Requesting: http://10.0.0.161:8082/domain/c0a87636-2201-40fd-8987-a049dbaf0e1e 2026-08-17 09:46:29,677 - DEBUG - Requesting: http://10.0.0.161:8082/project/1ea0168d-f4ce-4826-a331-c1e574ea682d 2026-08-17 09:46:29,756 - DEBUG - Requesting: http://10.0.0.161:8082/virtual-network/9257ca15-5fe3-493c-83d0-79e6562f7996 2026-08-17 09:46:29,767 - DEBUG - ==>Verifying data for policy with id: ea9e9087-971c-4778-9c6b-4d3c30176b42, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-00134405', 'ctest-policy1-24484932'] 2026-08-17 09:46:29,767 - INFO - VN ctest-vn4-43121629 Policy verification: verify_vn_policy_in_api_server, status: True 2026-08-17 09:46:29,767 - DEBUG - Verifying the vn in opserver 2026-08-17 09:46:29,767 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-00134405:ctest-vn4-43121629 virtual network link through opserver 10.0.0.161 2026-08-17 09:46:29,768 - DEBUG - Requesting: http://10.0.0.161:8081/analytics/uves/virtual-networks 2026-08-17 09:46:30,148 - DEBUG - Requesting: http://10.0.0.161:8081/analytics/uves/virtual-networks 2026-08-17 09:46:30,202 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-00134405:ctest-vn4-43121629', 'href': 'http://10.0.0.161:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-00134405:ctest-vn4-43121629?flat'} 2026-08-17 09:46:30,202 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-00134405:ctest-vn4-43121629 is found in opserver 2026-08-17 09:46:30,214 - DEBUG - Do not have enough data to verify VN in agent 2026-08-17 09:46:30,221 - DEBUG - VRF ids for VN ctest-vn4-43121629: {} 2026-08-17 09:46:30,221 - DEBUG - ====Verifying data for ctest-policy1-24484932 in API_Server ====== 2026-08-17 09:46:30,221 - DEBUG - Requesting: http://10.0.0.161:8082/domains 2026-08-17 09:46:30,228 - DEBUG - Requesting: http://10.0.0.161:8082/domain/c0a87636-2201-40fd-8987-a049dbaf0e1e 2026-08-17 09:46:30,241 - DEBUG - Requesting: http://10.0.0.161:8082/project/1ea0168d-f4ce-4826-a331-c1e574ea682d 2026-08-17 09:46:30,324 - DEBUG - Requesting: http://10.0.0.161:8082/network-policy/ea9e9087-971c-4778-9c6b-4d3c30176b42 2026-08-17 09:46:30,336 - INFO - Verified policy ctest-policy1-24484932 in API Server, Result: True 2026-08-17 09:46:30,336 - INFO - Done with setup and verification, moving onto test .. 2026-08-17 09:46:30,347 - INFO - Deleting VN ctest-vn4-43121629 2026-08-17 09:46:30,486 - DEBUG - Response for deleting network () 2026-08-17 09:46:30,487 - DEBUG - Requesting: http://10.0.0.161:8082/routing-instance/b28d2fca-9781-456c-9558-756e5ceb2d09 2026-08-17 09:46:30,493 - DEBUG - Response Code: 404 2026-08-17 09:46:30,493 - DEBUG - Requesting: http://10.0.0.161:8082/domains 2026-08-17 09:46:30,499 - DEBUG - Requesting: http://10.0.0.161:8082/domain/c0a87636-2201-40fd-8987-a049dbaf0e1e 2026-08-17 09:46:30,554 - DEBUG - Requesting: http://10.0.0.161:8082/project/1ea0168d-f4ce-4826-a331-c1e574ea682d 2026-08-17 09:46:30,629 - INFO - Validated that VN ctest-vn4-43121629 is not found in API Server 2026-08-17 09:46:30,639 - DEBUG - VN ctest-vn4-43121629 is not present in Agent 10.0.0.161 2026-08-17 09:46:30,639 - INFO - Validated that VN ctest-vn4-43121629 is not in any agent 2026-08-17 09:46:30,656 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-43121629 info 2026-08-17 09:46:30,682 - INFO - Deleted policy ctest-policy1-24484932 2026-08-17 09:46:30,848 - DEBUG - policy ctest-policy1-24484932 is not found in API Server 2026-08-17 09:46:31,117 - DEBUG - No XMPP flaps were noticed during the test 2026-08-17 09:46:31,117 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:05] 2026-08-17 09:46:31,117 - INFO - -------------------------------------------------------------------------------- 2026-08-17 09:46:31,413 - DEBUG - No XMPP flaps were noticed during the test 2026-08-17 09:46:31,413 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:05] 2026-08-17 09:46:31,413 - INFO - -------------------------------------------------------------------------------- 2026-08-17 09:46:32,206 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-00134405, ID : 1ea0168d-f4ce-4826-a331-c1e574ea682d