2025-10-20 13:59:06,335 - INFO - Reading existing Domain with UUID 359ab6ea-20cc-44f4-9df6-3d9ae739b7c5 2025-10-20 13:59:06,345 - INFO - Using existing domain ['admin_domain'](359ab6ea-20cc-44f4-9df6-3d9ae739b7c5) 2025-10-20 13:59:06,554 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-58248156 not found, creating it 2025-10-20 13:59:07,055 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-58248156, ID : 2100040d-7683-4e92-b667-e95e5f4e1ab3 2025-10-20 13:59:08,775 - INFO - ================================================================================ 2025-10-20 13:59:08,776 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-10-20 13:59:09,165 - DEBUG - Nothing to compare xmpp stats {'10.0.0.137': {'10.0.0.137': '0'}} with 2025-10-20 13:59:09,166 - INFO - Initial checks done. Running the testcase now 2025-10-20 13:59:09,166 - INFO - 2025-10-20 13:59:09,166 - INFO - ================================================================================ 2025-10-20 13:59:09,166 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-10-20 13:59:09,166 - 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-10-20 13:59:09,545 - DEBUG - Nothing to compare xmpp stats {'10.0.0.137': {'10.0.0.137': '0'}} with 2025-10-20 13:59:09,545 - INFO - Initial checks done. Running the testcase now 2025-10-20 13:59:09,545 - INFO - 2025-10-20 13:59:09,923 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = admin_domain:ctest-TestBasicPolicyNegativeIpv4v6-58248156:ctest-vn4-51899622, security_group = None, network_policy = None, subnet_list = []], src_ports = [start_port = -1, end_port = -1], application = [], dst_addresses = [subnet = None, virtual_network = admin_domain:ctest-TestBasicPolicyNegativeIpv4v6-58248156:ctest-vn4-51899622, 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 = admin_domain:ctest-TestBasicPolicyNegativeIpv4v6-58248156:ctest-vn4-51899622, security_group = None, network_policy = None, subnet_list = []], src_ports = [start_port = -1, end_port = -1], application = [], dst_addresses = [subnet = None, virtual_network = admin_domain:ctest-TestBasicPolicyNegativeIpv4v6-58248156:ctest-vn4-51899622, 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-10-20 13:59:10,620 - DEBUG - Response for create_network : {'network': {'id': 'd2d72173-50f6-4e5a-98b2-72fe76eafee9', 'name': 'ctest-vn4-51899622', 'tenant_id': '2100040d76834e92b667e95e5f4e1ab3', 'project_id': '2100040d76834e92b667e95e5f4e1ab3', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['admin_domain', 'ctest-TestBasicPolicyNegativeIpv4v6-58248156', 'ctest-vn4-51899622'], 'port_security_enabled': True, 'description': '', 'created_at': None, 'updated_at': None}} 2025-10-20 13:59:10,893 - DEBUG - Response for create_subnet : {'subnet': {'id': 'f9fb9e12-399c-439c-b528-2e6f17989aa5', 'name': '', 'tenant_id': '2100040d76834e92b667e95e5f4e1ab3', 'network_id': 'd2d72173-50f6-4e5a-98b2-72fe76eafee9', 'ip_version': 4, 'cidr': '38.59.37.64/26', 'allocation_pools': [{'start': '38.59.37.66', 'end': '38.59.37.126'}], 'gateway_ip': '38.59.37.65', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'created_at': '2025-10-20T13:59:10.800119', 'updated_at': '2025-10-20T13:59:10.800119', 'dns_server_address': '38.59.37.66', 'tags': [], 'project_id': '2100040d76834e92b667e95e5f4e1ab3'}} 2025-10-20 13:59:11,132 - DEBUG - Response for create_subnet : {'subnet': {'id': '55c9c1a2-8aa7-44fc-824e-52c0754cc176', 'name': '', 'tenant_id': '2100040d76834e92b667e95e5f4e1ab3', 'network_id': 'd2d72173-50f6-4e5a-98b2-72fe76eafee9', 'ip_version': 6, 'cidr': '38e8:c292:298a:f1c1:612c:f7a5::/96', 'allocation_pools': [{'start': '38e8:c292:298a:f1c1:612c:f7a5:0:2', 'end': '38e8:c292:298a:f1c1:612c:f7a5:ffff:fffe'}], 'gateway_ip': '38e8:c292:298a:f1c1:612c:f7a5:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'created_at': '2025-10-20T13:59:11.025824', 'updated_at': '2025-10-20T13:59:11.025824', 'dns_server_address': '38e8:c292:298a:f1c1:612c:f7a5:0:2', 'tags': [], 'project_id': '2100040d76834e92b667e95e5f4e1ab3'}} 2025-10-20 13:59:11,198 - INFO - Created VN ctest-vn4-51899622 2025-10-20 13:59:11,252 - DEBUG - VN ctest-vn4-51899622 UUID is d2d72173-50f6-4e5a-98b2-72fe76eafee9 2025-10-20 13:59:11,716 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': 'd2d72173-50f6-4e5a-98b2-72fe76eafee9', 'name': 'ctest-vn4-51899622', 'tenant_id': '2100040d76834e92b667e95e5f4e1ab3', 'project_id': '2100040d76834e92b667e95e5f4e1ab3', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['f9fb9e12-399c-439c-b528-2e6f17989aa5', '55c9c1a2-8aa7-44fc-824e-52c0754cc176'], 'fq_name': ['admin_domain', 'ctest-TestBasicPolicyNegativeIpv4v6-58248156', 'ctest-vn4-51899622'], 'policys': [['admin_domain', 'ctest-TestBasicPolicyNegativeIpv4v6-58248156', 'ctest-policy1-75891026']], 'subnet_ipam': [{'subnet_cidr': '38.59.37.64/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '38e8:c292:298a:f1c1:612c:f7a5::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': '', 'created_at': '2025-10-20T13:59:10.544536', 'updated_at': '2025-10-20T13:59:11.040382'}} 2025-10-20 13:59:11,888 - DEBUG - Requesting: https://10.0.0.137:8082/domains 2025-10-20 13:59:12,235 - DEBUG - Requesting: https://10.0.0.137:8082/domains 2025-10-20 13:59:12,316 - DEBUG - Requesting: https://10.0.0.137:8082/domain/359ab6ea-20cc-44f4-9df6-3d9ae739b7c5 2025-10-20 13:59:12,373 - DEBUG - Requesting: https://10.0.0.137:8082/project/2100040d-7683-4e92-b667-e95e5f4e1ab3 2025-10-20 13:59:12,457 - DEBUG - Requesting: https://10.0.0.137:8082/virtual-network/d2d72173-50f6-4e5a-98b2-72fe76eafee9 2025-10-20 13:59:12,514 - DEBUG - Requesting: https://10.0.0.137:8082/virtual-network/d2d72173-50f6-4e5a-98b2-72fe76eafee9 2025-10-20 13:59:12,570 - DEBUG - Requesting: https://10.0.0.137:8082/routing-instance/56275d32-e66c-4399-bf96-9be23511fe38 2025-10-20 13:59:12,625 - DEBUG - Requesting: https://10.0.0.137:8082/routing-instance/56275d32-e66c-4399-bf96-9be23511fe38 2025-10-20 13:59:12,681 - DEBUG - Requesting: https://10.0.0.137:8082/route-target/e41fe69d-b1da-40c8-bc6f-6ad044011b99 2025-10-20 13:59:12,733 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-10-20 13:59:12,733 - DEBUG - Requesting: https://10.0.0.137:8082/virtual-network/d2d72173-50f6-4e5a-98b2-72fe76eafee9 2025-10-20 13:59:12,795 - DEBUG - Requesting: https://10.0.0.137:8082/routing-instance/56275d32-e66c-4399-bf96-9be23511fe38 2025-10-20 13:59:12,862 - INFO - Verified VN network id 11 for VN d2d72173-50f6-4e5a-98b2-72fe76eafee9 2025-10-20 13:59:12,862 - INFO - Verifications in API Server for VN ctest-vn4-51899622 passed 2025-10-20 13:59:12,862 - DEBUG - Requesting: https://10.0.0.137:8082/virtual-network/d2d72173-50f6-4e5a-98b2-72fe76eafee9 2025-10-20 13:59:12,919 - DEBUG - Requesting: https://10.0.0.137:8082/routing-instance/56275d32-e66c-4399-bf96-9be23511fe38 2025-10-20 13:59:12,973 - DEBUG - Requesting: https://10.0.0.137:8082/routing-instance/56275d32-e66c-4399-bf96-9be23511fe38 2025-10-20 13:59:13,025 - DEBUG - Requesting: https://10.0.0.137:8082/route-target/e41fe69d-b1da-40c8-bc6f-6ad044011b99 2025-10-20 13:59:13,130 - DEBUG - Control-node 10.0.0.137 : VN object is : {'node_name': 'virtual-network:admin_domain:ctest-TestBasicPolicyNegativeIpv4v6-58248156:ctest-vn4-51899622', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-58248156', 'owner-access': '7', 'group': 'reader', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '15192648647120932442', 'uuid-lslong': '11002983276861914857'}, 'enable': 'true', 'created': '2025-10-20T13:59:10', 'last-modified': '2025-10-20T13:59:11', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:01.449796'} 2025-10-20 13:59:13,187 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-10-20 13:59:13,187 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-51899622 passed 2025-10-20 13:59:13,187 - DEBUG - ====Verifying policy data for ctest-vn4-51899622 in API_Server ====== 2025-10-20 13:59:13,187 - DEBUG - Requesting: https://10.0.0.137:8082/domains 2025-10-20 13:59:13,240 - DEBUG - Requesting: https://10.0.0.137:8082/domain/359ab6ea-20cc-44f4-9df6-3d9ae739b7c5 2025-10-20 13:59:13,297 - DEBUG - Requesting: https://10.0.0.137:8082/project/2100040d-7683-4e92-b667-e95e5f4e1ab3 2025-10-20 13:59:13,377 - DEBUG - Requesting: https://10.0.0.137:8082/virtual-network/d2d72173-50f6-4e5a-98b2-72fe76eafee9 2025-10-20 13:59:13,434 - DEBUG - ==>Verifying data for policy with id: ea5071db-7e77-4626-b256-b2976418c5b9, fqn: ['admin_domain', 'ctest-TestBasicPolicyNegativeIpv4v6-58248156', 'ctest-policy1-75891026'] 2025-10-20 13:59:13,434 - INFO - VN ctest-vn4-51899622 Policy verification: verify_vn_policy_in_api_server, status: True 2025-10-20 13:59:13,434 - DEBUG - Verifying the vn in opserver 2025-10-20 13:59:13,434 - DEBUG - Verifying the admin_domain:ctest-TestBasicPolicyNegativeIpv4v6-58248156:ctest-vn4-51899622 virtual network link through opserver 10.0.0.137 2025-10-20 13:59:13,435 - DEBUG - Requesting: https://10.0.0.137:8081/analytics/uves/virtual-networks 2025-10-20 13:59:13,777 - DEBUG - Requesting: https://10.0.0.137:8081/analytics/uves/virtual-networks 2025-10-20 13:59:13,892 - DEBUG - vn link and name as {'name': 'admin_domain:ctest-TestBasicPolicyNegativeIpv4v6-58248156:ctest-vn4-51899622', 'href': 'https://10.0.0.137:8081/analytics/uves/virtual-network/admin_domain:ctest-TestBasicPolicyNegativeIpv4v6-58248156:ctest-vn4-51899622?flat'} 2025-10-20 13:59:13,892 - INFO - Validated that VN admin_domain:ctest-TestBasicPolicyNegativeIpv4v6-58248156:ctest-vn4-51899622 is found in opserver 2025-10-20 13:59:13,995 - DEBUG - Do not have enough data to verify VN in agent 2025-10-20 13:59:14,044 - DEBUG - VRF ids for VN ctest-vn4-51899622: {} 2025-10-20 13:59:14,045 - DEBUG - ====Verifying data for ctest-policy1-75891026 in API_Server ====== 2025-10-20 13:59:14,045 - DEBUG - Requesting: https://10.0.0.137:8082/domains 2025-10-20 13:59:14,100 - DEBUG - Requesting: https://10.0.0.137:8082/domain/359ab6ea-20cc-44f4-9df6-3d9ae739b7c5 2025-10-20 13:59:14,161 - DEBUG - Requesting: https://10.0.0.137:8082/project/2100040d-7683-4e92-b667-e95e5f4e1ab3 2025-10-20 13:59:14,237 - DEBUG - Requesting: https://10.0.0.137:8082/network-policy/ea5071db-7e77-4626-b256-b2976418c5b9 2025-10-20 13:59:14,291 - INFO - Verified policy ctest-policy1-75891026 in API Server, Result: True 2025-10-20 13:59:14,291 - INFO - Done with setup and verification, moving onto test .. 2025-10-20 13:59:14,299 - INFO - Deleting VN ctest-vn4-51899622 2025-10-20 13:59:14,484 - DEBUG - Response for deleting network () 2025-10-20 13:59:14,484 - DEBUG - Requesting: https://10.0.0.137:8082/routing-instance/56275d32-e66c-4399-bf96-9be23511fe38 2025-10-20 13:59:14,536 - DEBUG - Response Code: 404 2025-10-20 13:59:14,536 - DEBUG - Requesting: https://10.0.0.137:8082/domains 2025-10-20 13:59:14,592 - DEBUG - Requesting: https://10.0.0.137:8082/domain/359ab6ea-20cc-44f4-9df6-3d9ae739b7c5 2025-10-20 13:59:14,653 - DEBUG - Requesting: https://10.0.0.137:8082/project/2100040d-7683-4e92-b667-e95e5f4e1ab3 2025-10-20 13:59:14,725 - INFO - Validated that VN ctest-vn4-51899622 is not found in API Server 2025-10-20 13:59:14,824 - DEBUG - VN ctest-vn4-51899622 is not present in Agent 10.0.0.137 2025-10-20 13:59:14,825 - INFO - Validated that VN ctest-vn4-51899622 is not in any agent 2025-10-20 13:59:14,981 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-51899622 info 2025-10-20 13:59:15,008 - INFO - Deleted policy ctest-policy1-75891026 2025-10-20 13:59:15,176 - DEBUG - policy ctest-policy1-75891026 is not found in API Server 2025-10-20 13:59:15,549 - DEBUG - No XMPP flaps were noticed during the test
2025-10-20 13:59:15,549 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:06]
2025-10-20 13:59:15,549 - INFO - -------------------------------------------------------------------------------- 2025-10-20 13:59:15,925 - DEBUG - No XMPP flaps were noticed during the test
2025-10-20 13:59:15,925 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:07]
2025-10-20 13:59:15,925 - INFO - -------------------------------------------------------------------------------- 2025-10-20 13:59:16,667 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-58248156, ID : 2100040d-7683-4e92-b667-e95e5f4e1ab3