2026-04-17 19:34:05,118 - INFO - Domain Default found not creating 2026-04-17 19:34:05,304 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-78729072 not found, creating it 2026-04-17 19:34:05,788 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-78729072, ID : b835b543-895d-497f-9982-79a09fbf56cd 2026-04-17 19:34:07,291 - INFO - ================================================================================ 2026-04-17 19:34:07,291 - INFO - STARTING TEST : test_remove_policy_with_ref 2026-04-17 19:34:07,547 - DEBUG - Nothing to compare xmpp stats {'10.0.0.50': {'10.20.0.254': '0'}} with 2026-04-17 19:34:07,547 - INFO - Initial checks done. Running the testcase now 2026-04-17 19:34:07,547 - INFO - 2026-04-17 19:34:07,547 - INFO - ================================================================================ 2026-04-17 19:34:07,547 - INFO - STARTING TEST : test_remove_policy_with_ref 2026-04-17 19:34:07,547 - 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-04-17 19:34:07,838 - DEBUG - Nothing to compare xmpp stats {'10.0.0.50': {'10.20.0.254': '0'}} with 2026-04-17 19:34:07,838 - INFO - Initial checks done. Running the testcase now 2026-04-17 19:34:07,838 - INFO - 2026-04-17 19:34:08,200 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-78729072:ctest-vn4-69959309, 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-78729072:ctest-vn4-69959309, 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-78729072:ctest-vn4-69959309, 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-78729072:ctest-vn4-69959309, 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-04-17 19:34:08,721 - DEBUG - Response for create_network : {'network': {'id': '967969cb-a79a-46f5-841c-94ca5db6eb6d', 'name': 'ctest-vn4-69959309', 'tenant_id': 'b835b543895d497f998279a09fbf56cd', 'project_id': 'b835b543895d497f998279a09fbf56cd', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-78729072', 'ctest-vn4-69959309'], 'port_security_enabled': True, 'description': ''}} 2026-04-17 19:34:08,875 - DEBUG - Response for create_subnet : {'subnet': {'id': '4f9dcb38-8404-4a5e-a910-c80bcd8c7f07', 'name': '', 'tenant_id': 'b835b543895d497f998279a09fbf56cd', 'network_id': '967969cb-a79a-46f5-841c-94ca5db6eb6d', 'ip_version': 4, 'cidr': '162.190.197.128/26', 'allocation_pools': [{'start': '162.190.197.130', 'end': '162.190.197.190'}], 'gateway_ip': '162.190.197.129', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '162.190.197.130', 'tags': [], 'project_id': 'b835b543895d497f998279a09fbf56cd'}} 2026-04-17 19:34:09,050 - DEBUG - Response for create_subnet : {'subnet': {'id': '3d7eba90-aef5-49a3-8acb-316bc807a68a', 'name': '', 'tenant_id': 'b835b543895d497f998279a09fbf56cd', 'network_id': '967969cb-a79a-46f5-841c-94ca5db6eb6d', 'ip_version': 6, 'cidr': '226f:8128:246c:9393:16f8:cf7e::/96', 'allocation_pools': [{'start': '226f:8128:246c:9393:16f8:cf7e:0:2', 'end': '226f:8128:246c:9393:16f8:cf7e:ffff:fffe'}], 'gateway_ip': '226f:8128:246c:9393:16f8:cf7e:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '226f:8128:246c:9393:16f8:cf7e:0:2', 'tags': [], 'project_id': 'b835b543895d497f998279a09fbf56cd'}} 2026-04-17 19:34:09,070 - INFO - Created VN ctest-vn4-69959309 2026-04-17 19:34:09,121 - DEBUG - VN ctest-vn4-69959309 UUID is 967969cb-a79a-46f5-841c-94ca5db6eb6d 2026-04-17 19:34:09,326 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': '967969cb-a79a-46f5-841c-94ca5db6eb6d', 'name': 'ctest-vn4-69959309', 'tenant_id': 'b835b543895d497f998279a09fbf56cd', 'project_id': 'b835b543895d497f998279a09fbf56cd', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['4f9dcb38-8404-4a5e-a910-c80bcd8c7f07', '3d7eba90-aef5-49a3-8acb-316bc807a68a'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-78729072', 'ctest-vn4-69959309'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-78729072', 'ctest-policy1-80860524']], 'subnet_ipam': [{'subnet_cidr': '162.190.197.128/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '226f:8128:246c:9393:16f8:cf7e::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2026-04-17 19:34:09,489 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2026-04-17 19:34:09,781 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2026-04-17 19:34:09,812 - DEBUG - Requesting: http://10.0.0.50:8082/domain/dbe9f8d5-dd2d-42e0-ab20-640162b0d859 2026-04-17 19:34:09,824 - DEBUG - Requesting: http://10.0.0.50:8082/project/b835b543-895d-497f-9982-79a09fbf56cd 2026-04-17 19:34:09,898 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/967969cb-a79a-46f5-841c-94ca5db6eb6d 2026-04-17 19:34:09,913 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/967969cb-a79a-46f5-841c-94ca5db6eb6d 2026-04-17 19:34:09,926 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/a76662fd-4532-42e6-933c-cbbd5f4eb8b2 2026-04-17 19:34:09,934 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/a76662fd-4532-42e6-933c-cbbd5f4eb8b2 2026-04-17 19:34:09,943 - DEBUG - Requesting: http://10.0.0.50:8082/route-target/e84912ce-d4bf-4a06-942f-651b092ba188 2026-04-17 19:34:09,950 - DEBUG - Route Targets: ['target:64512:8000004'] 2026-04-17 19:34:09,950 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/967969cb-a79a-46f5-841c-94ca5db6eb6d 2026-04-17 19:34:09,962 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/a76662fd-4532-42e6-933c-cbbd5f4eb8b2 2026-04-17 19:34:09,981 - INFO - Verified VN network id 11 for VN 967969cb-a79a-46f5-841c-94ca5db6eb6d 2026-04-17 19:34:09,982 - INFO - Verifications in API Server for VN ctest-vn4-69959309 passed 2026-04-17 19:34:09,982 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/967969cb-a79a-46f5-841c-94ca5db6eb6d 2026-04-17 19:34:09,993 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/a76662fd-4532-42e6-933c-cbbd5f4eb8b2 2026-04-17 19:34:09,999 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/a76662fd-4532-42e6-933c-cbbd5f4eb8b2 2026-04-17 19:34:10,005 - DEBUG - Requesting: http://10.0.0.50:8082/route-target/e84912ce-d4bf-4a06-942f-651b092ba188 2026-04-17 19:34:10,017 - DEBUG - Control-node 10.0.0.50 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-78729072:ctest-vn4-69959309', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-78729072', 'owner-access': '7', 'group': 'member', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '10842813901282363125', 'uuid-lslong': '9519647309230959469'}, 'enable': 'true', 'created': '2026-04-17T19:34:08', 'last-modified': '2026-04-17T19:34:09', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.717267'} 2026-04-17 19:34:10,023 - DEBUG - Route Targets: ['target:64512:8000004'] 2026-04-17 19:34:10,023 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-69959309 passed 2026-04-17 19:34:10,024 - DEBUG - ====Verifying policy data for ctest-vn4-69959309 in API_Server ====== 2026-04-17 19:34:10,024 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2026-04-17 19:34:10,030 - DEBUG - Requesting: http://10.0.0.50:8082/domain/dbe9f8d5-dd2d-42e0-ab20-640162b0d859 2026-04-17 19:34:10,042 - DEBUG - Requesting: http://10.0.0.50:8082/project/b835b543-895d-497f-9982-79a09fbf56cd 2026-04-17 19:34:10,110 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/967969cb-a79a-46f5-841c-94ca5db6eb6d 2026-04-17 19:34:10,119 - DEBUG - ==>Verifying data for policy with id: b2eadbd4-a8ae-4989-b526-3dddee106634, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-78729072', 'ctest-policy1-80860524'] 2026-04-17 19:34:10,119 - INFO - VN ctest-vn4-69959309 Policy verification: verify_vn_policy_in_api_server, status: True 2026-04-17 19:34:10,119 - DEBUG - Verifying the vn in opserver 2026-04-17 19:34:10,119 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-78729072:ctest-vn4-69959309 virtual network link through opserver 10.0.0.50 2026-04-17 19:34:10,119 - DEBUG - Requesting: http://10.0.0.50:8081/analytics/uves/virtual-networks 2026-04-17 19:34:10,420 - DEBUG - Requesting: http://10.0.0.50:8081/analytics/uves/virtual-networks 2026-04-17 19:34:10,483 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-78729072:ctest-vn4-69959309', 'href': 'http://10.0.0.50:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-78729072:ctest-vn4-69959309?flat'} 2026-04-17 19:34:10,483 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-78729072:ctest-vn4-69959309 is found in opserver 2026-04-17 19:34:10,494 - DEBUG - Do not have enough data to verify VN in agent 2026-04-17 19:34:10,499 - DEBUG - VRF ids for VN ctest-vn4-69959309: {} 2026-04-17 19:34:10,499 - DEBUG - ====Verifying data for ctest-policy1-80860524 in API_Server ====== 2026-04-17 19:34:10,499 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2026-04-17 19:34:10,506 - DEBUG - Requesting: http://10.0.0.50:8082/domain/dbe9f8d5-dd2d-42e0-ab20-640162b0d859 2026-04-17 19:34:10,518 - DEBUG - Requesting: http://10.0.0.50:8082/project/b835b543-895d-497f-9982-79a09fbf56cd 2026-04-17 19:34:10,590 - DEBUG - Requesting: http://10.0.0.50:8082/network-policy/b2eadbd4-a8ae-4989-b526-3dddee106634 2026-04-17 19:34:10,600 - INFO - Verified policy ctest-policy1-80860524 in API Server, Result: True 2026-04-17 19:34:10,600 - INFO - Done with setup and verification, moving onto test .. 2026-04-17 19:34:10,607 - INFO - Deleting VN ctest-vn4-69959309 2026-04-17 19:34:10,722 - DEBUG - Response for deleting network () 2026-04-17 19:34:10,722 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/a76662fd-4532-42e6-933c-cbbd5f4eb8b2 2026-04-17 19:34:10,728 - DEBUG - Response Code: 404 2026-04-17 19:34:10,728 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2026-04-17 19:34:10,734 - DEBUG - Requesting: http://10.0.0.50:8082/domain/dbe9f8d5-dd2d-42e0-ab20-640162b0d859 2026-04-17 19:34:10,786 - DEBUG - Requesting: http://10.0.0.50:8082/project/b835b543-895d-497f-9982-79a09fbf56cd 2026-04-17 19:34:10,856 - INFO - Validated that VN ctest-vn4-69959309 is not found in API Server 2026-04-17 19:34:10,865 - DEBUG - VN ctest-vn4-69959309 is not present in Agent 10.0.0.50 2026-04-17 19:34:10,865 - INFO - Validated that VN ctest-vn4-69959309 is not in any agent 2026-04-17 19:34:10,879 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-69959309 info 2026-04-17 19:34:10,903 - INFO - Deleted policy ctest-policy1-80860524 2026-04-17 19:34:11,061 - DEBUG - policy ctest-policy1-80860524 is not found in API Server 2026-04-17 19:34:11,314 - DEBUG - No XMPP flaps were noticed during the test 2026-04-17 19:34:11,314 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04] 2026-04-17 19:34:11,314 - INFO - -------------------------------------------------------------------------------- 2026-04-17 19:34:11,603 - DEBUG - No XMPP flaps were noticed during the test 2026-04-17 19:34:11,603 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04] 2026-04-17 19:34:11,603 - INFO - -------------------------------------------------------------------------------- 2026-04-17 19:34:12,283 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-78729072, ID : b835b543-895d-497f-9982-79a09fbf56cd