2026-01-28 12:14:01,797 - INFO - Domain Default found not creating 2026-01-28 12:14:01,988 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-42433646 not found, creating it 2026-01-28 12:14:02,462 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-42433646, ID : 591f8272-dcac-48b8-be2c-c03e2a8e159b 2026-01-28 12:14:04,242 - INFO - ================================================================================ 2026-01-28 12:14:04,242 - INFO - STARTING TEST : test_remove_policy_with_ref 2026-01-28 12:14:04,516 - DEBUG - Nothing to compare xmpp stats {'10.0.0.41': {'10.20.0.17': '0'}} with 2026-01-28 12:14:04,517 - INFO - Initial checks done. Running the testcase now 2026-01-28 12:14:04,517 - INFO - 2026-01-28 12:14:04,517 - INFO - ================================================================================ 2026-01-28 12:14:04,517 - INFO - STARTING TEST : test_remove_policy_with_ref 2026-01-28 12:14:04,517 - 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-28 12:14:04,814 - DEBUG - Nothing to compare xmpp stats {'10.0.0.41': {'10.20.0.17': '0'}} with 2026-01-28 12:14:04,814 - INFO - Initial checks done. Running the testcase now 2026-01-28 12:14:04,814 - INFO - 2026-01-28 12:14:05,199 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-42433646:ctest-vn4-36052219, 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-42433646:ctest-vn4-36052219, 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-42433646:ctest-vn4-36052219, 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-42433646:ctest-vn4-36052219, 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-28 12:14:05,782 - DEBUG - Response for create_network : {'network': {'id': '4aff13b9-b935-48c8-9778-c55d02936021', 'name': 'ctest-vn4-36052219', 'tenant_id': '591f8272dcac48b8be2cc03e2a8e159b', 'project_id': '591f8272dcac48b8be2cc03e2a8e159b', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-42433646', 'ctest-vn4-36052219'], 'port_security_enabled': True, 'description': ''}} 2026-01-28 12:14:05,995 - DEBUG - Response for create_subnet : {'subnet': {'id': 'e94d396b-d79f-46ea-ae7e-f100a1949573', 'name': '', 'tenant_id': '591f8272dcac48b8be2cc03e2a8e159b', 'network_id': '4aff13b9-b935-48c8-9778-c55d02936021', 'ip_version': 4, 'cidr': '211.18.145.0/26', 'allocation_pools': [{'start': '211.18.145.2', 'end': '211.18.145.62'}], 'gateway_ip': '211.18.145.1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '211.18.145.2', 'tags': [], 'project_id': '591f8272dcac48b8be2cc03e2a8e159b'}} 2026-01-28 12:14:06,220 - DEBUG - Response for create_subnet : {'subnet': {'id': '1f68c6e4-0ba6-4c03-87c2-934496bf4bcf', 'name': '', 'tenant_id': '591f8272dcac48b8be2cc03e2a8e159b', 'network_id': '4aff13b9-b935-48c8-9778-c55d02936021', 'ip_version': 6, 'cidr': '3983:6c42:9a52:64c0:89cd:3077::/96', 'allocation_pools': [{'start': '3983:6c42:9a52:64c0:89cd:3077:0:2', 'end': '3983:6c42:9a52:64c0:89cd:3077:ffff:fffe'}], 'gateway_ip': '3983:6c42:9a52:64c0:89cd:3077:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '3983:6c42:9a52:64c0:89cd:3077:0:2', 'tags': [], 'project_id': '591f8272dcac48b8be2cc03e2a8e159b'}} 2026-01-28 12:14:06,244 - INFO - Created VN ctest-vn4-36052219 2026-01-28 12:14:06,298 - DEBUG - VN ctest-vn4-36052219 UUID is 4aff13b9-b935-48c8-9778-c55d02936021 2026-01-28 12:14:06,541 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': '4aff13b9-b935-48c8-9778-c55d02936021', 'name': 'ctest-vn4-36052219', 'tenant_id': '591f8272dcac48b8be2cc03e2a8e159b', 'project_id': '591f8272dcac48b8be2cc03e2a8e159b', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['e94d396b-d79f-46ea-ae7e-f100a1949573', '1f68c6e4-0ba6-4c03-87c2-934496bf4bcf'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-42433646', 'ctest-vn4-36052219'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-42433646', 'ctest-policy1-50396231']], 'subnet_ipam': [{'subnet_cidr': '211.18.145.0/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '3983:6c42:9a52:64c0:89cd:3077::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2026-01-28 12:14:06,714 - DEBUG - Requesting: http://10.0.0.41:8082/domains 2026-01-28 12:14:07,017 - DEBUG - Requesting: http://10.0.0.41:8082/domains 2026-01-28 12:14:07,058 - DEBUG - Requesting: http://10.0.0.41:8082/domain/42cc43ea-94fc-4dc3-b416-505084781ce3 2026-01-28 12:14:07,078 - DEBUG - Requesting: http://10.0.0.41:8082/project/591f8272-dcac-48b8-be2c-c03e2a8e159b 2026-01-28 12:14:07,162 - DEBUG - Requesting: http://10.0.0.41:8082/virtual-network/4aff13b9-b935-48c8-9778-c55d02936021 2026-01-28 12:14:07,176 - DEBUG - Requesting: http://10.0.0.41:8082/virtual-network/4aff13b9-b935-48c8-9778-c55d02936021 2026-01-28 12:14:07,187 - DEBUG - Requesting: http://10.0.0.41:8082/routing-instance/7b374fd6-b8cc-4c06-a6c8-5175a4e0095d 2026-01-28 12:14:07,195 - DEBUG - Requesting: http://10.0.0.41:8082/routing-instance/7b374fd6-b8cc-4c06-a6c8-5175a4e0095d 2026-01-28 12:14:07,204 - DEBUG - Requesting: http://10.0.0.41:8082/route-target/56ced60b-a834-43f8-b1ae-e0831ef62fc6 2026-01-28 12:14:07,212 - DEBUG - Route Targets: ['target:64512:8000004'] 2026-01-28 12:14:07,212 - DEBUG - Requesting: http://10.0.0.41:8082/virtual-network/4aff13b9-b935-48c8-9778-c55d02936021 2026-01-28 12:14:07,224 - DEBUG - Requesting: http://10.0.0.41:8082/routing-instance/7b374fd6-b8cc-4c06-a6c8-5175a4e0095d 2026-01-28 12:14:07,251 - INFO - Verified VN network id 11 for VN 4aff13b9-b935-48c8-9778-c55d02936021 2026-01-28 12:14:07,251 - INFO - Verifications in API Server for VN ctest-vn4-36052219 passed 2026-01-28 12:14:07,251 - DEBUG - Requesting: http://10.0.0.41:8082/virtual-network/4aff13b9-b935-48c8-9778-c55d02936021 2026-01-28 12:14:07,264 - DEBUG - Requesting: http://10.0.0.41:8082/routing-instance/7b374fd6-b8cc-4c06-a6c8-5175a4e0095d 2026-01-28 12:14:07,274 - DEBUG - Requesting: http://10.0.0.41:8082/routing-instance/7b374fd6-b8cc-4c06-a6c8-5175a4e0095d 2026-01-28 12:14:07,284 - DEBUG - Requesting: http://10.0.0.41:8082/route-target/56ced60b-a834-43f8-b1ae-e0831ef62fc6 2026-01-28 12:14:07,302 - DEBUG - Control-node 10.0.0.41 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-42433646:ctest-vn4-36052219', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-42433646', 'owner-access': '7', 'group': 'reader', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '5404059766265039048', 'uuid-lslong': '10914690700198240289'}, 'enable': 'true', 'created': '2026-01-28T12:14:05', 'last-modified': '2026-01-28T12:14:06', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.795784'} 2026-01-28 12:14:07,308 - DEBUG - Route Targets: ['target:64512:8000004'] 2026-01-28 12:14:07,309 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-36052219 passed 2026-01-28 12:14:07,309 - DEBUG - ====Verifying policy data for ctest-vn4-36052219 in API_Server ====== 2026-01-28 12:14:07,309 - DEBUG - Requesting: http://10.0.0.41:8082/domains 2026-01-28 12:14:07,315 - DEBUG - Requesting: http://10.0.0.41:8082/domain/42cc43ea-94fc-4dc3-b416-505084781ce3 2026-01-28 12:14:07,326 - DEBUG - Requesting: http://10.0.0.41:8082/project/591f8272-dcac-48b8-be2c-c03e2a8e159b 2026-01-28 12:14:07,417 - DEBUG - Requesting: http://10.0.0.41:8082/virtual-network/4aff13b9-b935-48c8-9778-c55d02936021 2026-01-28 12:14:07,432 - DEBUG - ==>Verifying data for policy with id: 010a6944-4692-4d50-b51f-0afcbb5f0683, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-42433646', 'ctest-policy1-50396231'] 2026-01-28 12:14:07,433 - INFO - VN ctest-vn4-36052219 Policy verification: verify_vn_policy_in_api_server, status: True 2026-01-28 12:14:07,433 - DEBUG - Verifying the vn in opserver 2026-01-28 12:14:07,433 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-42433646:ctest-vn4-36052219 virtual network link through opserver 10.0.0.41 2026-01-28 12:14:07,433 - DEBUG - Requesting: http://10.0.0.41:8081/analytics/uves/virtual-networks 2026-01-28 12:14:07,732 - DEBUG - Requesting: http://10.0.0.41:8081/analytics/uves/virtual-networks 2026-01-28 12:14:07,808 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-42433646:ctest-vn4-36052219', 'href': 'http://10.0.0.41:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-42433646:ctest-vn4-36052219?flat'} 2026-01-28 12:14:07,808 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-42433646:ctest-vn4-36052219 is found in opserver 2026-01-28 12:14:07,822 - DEBUG - Do not have enough data to verify VN in agent 2026-01-28 12:14:07,828 - DEBUG - VRF ids for VN ctest-vn4-36052219: {} 2026-01-28 12:14:07,828 - DEBUG - ====Verifying data for ctest-policy1-50396231 in API_Server ====== 2026-01-28 12:14:07,829 - DEBUG - Requesting: http://10.0.0.41:8082/domains 2026-01-28 12:14:07,834 - DEBUG - Requesting: http://10.0.0.41:8082/domain/42cc43ea-94fc-4dc3-b416-505084781ce3 2026-01-28 12:14:07,846 - DEBUG - Requesting: http://10.0.0.41:8082/project/591f8272-dcac-48b8-be2c-c03e2a8e159b 2026-01-28 12:14:07,921 - DEBUG - Requesting: http://10.0.0.41:8082/network-policy/010a6944-4692-4d50-b51f-0afcbb5f0683 2026-01-28 12:14:07,932 - INFO - Verified policy ctest-policy1-50396231 in API Server, Result: True 2026-01-28 12:14:07,932 - INFO - Done with setup and verification, moving onto test .. 2026-01-28 12:14:07,940 - INFO - Deleting VN ctest-vn4-36052219 2026-01-28 12:14:08,080 - DEBUG - Response for deleting network () 2026-01-28 12:14:08,080 - DEBUG - Requesting: http://10.0.0.41:8082/routing-instance/7b374fd6-b8cc-4c06-a6c8-5175a4e0095d 2026-01-28 12:14:08,086 - DEBUG - Response Code: 404 2026-01-28 12:14:08,086 - DEBUG - Requesting: http://10.0.0.41:8082/domains 2026-01-28 12:14:08,093 - DEBUG - Requesting: http://10.0.0.41:8082/domain/42cc43ea-94fc-4dc3-b416-505084781ce3 2026-01-28 12:14:08,151 - DEBUG - Requesting: http://10.0.0.41:8082/project/591f8272-dcac-48b8-be2c-c03e2a8e159b 2026-01-28 12:14:08,236 - INFO - Validated that VN ctest-vn4-36052219 is not found in API Server 2026-01-28 12:14:08,249 - DEBUG - VN ctest-vn4-36052219 is not present in Agent 10.0.0.41 2026-01-28 12:14:08,249 - INFO - Validated that VN ctest-vn4-36052219 is not in any agent 2026-01-28 12:14:08,269 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-36052219 info 2026-01-28 12:14:08,303 - INFO - Deleted policy ctest-policy1-50396231 2026-01-28 12:14:08,478 - DEBUG - policy ctest-policy1-50396231 is not found in API Server 2026-01-28 12:14:08,752 - DEBUG - No XMPP flaps were noticed during the test
2026-01-28 12:14:08,753 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04]
2026-01-28 12:14:08,753 - INFO - -------------------------------------------------------------------------------- 2026-01-28 12:14:09,040 - DEBUG - No XMPP flaps were noticed during the test
2026-01-28 12:14:09,040 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:05]
2026-01-28 12:14:09,040 - INFO - -------------------------------------------------------------------------------- 2026-01-28 12:14:09,791 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-42433646, ID : 591f8272-dcac-48b8-be2c-c03e2a8e159b