2025-09-04 16:24:21,090 - INFO - Domain Default found not creating 2025-09-04 16:24:21,250 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-16734038 not found, creating it 2025-09-04 16:24:21,703 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-16734038, ID : c542f6a1-5b94-4aec-b8fb-fe1d1fc5a708 2025-09-04 16:24:23,271 - INFO - ================================================================================ 2025-09-04 16:24:23,271 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-09-04 16:24:23,535 - DEBUG - Nothing to compare xmpp stats {'10.0.0.33': {'10.20.0.17': '0'}} with 2025-09-04 16:24:23,535 - INFO - Initial checks done. Running the testcase now 2025-09-04 16:24:23,535 - INFO - 2025-09-04 16:24:23,535 - INFO - ================================================================================ 2025-09-04 16:24:23,535 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-09-04 16:24:23,535 - 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-09-04 16:24:23,817 - DEBUG - Nothing to compare xmpp stats {'10.0.0.33': {'10.20.0.17': '0'}} with 2025-09-04 16:24:23,817 - INFO - Initial checks done. Running the testcase now 2025-09-04 16:24:23,817 - INFO - 2025-09-04 16:24:24,226 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-16734038:ctest-vn4-73204566, 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-16734038:ctest-vn4-73204566, 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-16734038:ctest-vn4-73204566, 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-16734038:ctest-vn4-73204566, 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-09-04 16:24:24,770 - DEBUG - Response for create_network : {'network': {'id': '94a95e5c-3ec6-4129-9d96-fafd70e30a29', 'name': 'ctest-vn4-73204566', 'tenant_id': 'c542f6a15b944aecb8fbfe1d1fc5a708', 'project_id': 'c542f6a15b944aecb8fbfe1d1fc5a708', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-16734038', 'ctest-vn4-73204566'], 'port_security_enabled': True, 'description': ''}} 2025-09-04 16:24:24,957 - DEBUG - Response for create_subnet : {'subnet': {'id': 'ac6bcc7d-961b-4489-8b91-b51485205c95', 'name': '', 'tenant_id': 'c542f6a15b944aecb8fbfe1d1fc5a708', 'network_id': '94a95e5c-3ec6-4129-9d96-fafd70e30a29', 'ip_version': 4, 'cidr': '159.214.87.128/26', 'allocation_pools': [{'start': '159.214.87.130', 'end': '159.214.87.190'}], 'gateway_ip': '159.214.87.129', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '159.214.87.130', 'tags': [], 'project_id': 'c542f6a15b944aecb8fbfe1d1fc5a708'}} 2025-09-04 16:24:25,103 - DEBUG - Response for create_subnet : {'subnet': {'id': '2b5852d5-56c9-4a96-8c25-dd4e488d7c14', 'name': '', 'tenant_id': 'c542f6a15b944aecb8fbfe1d1fc5a708', 'network_id': '94a95e5c-3ec6-4129-9d96-fafd70e30a29', 'ip_version': 6, 'cidr': '2aa7:e4af:135:5d69:202e:b0af::/96', 'allocation_pools': [{'start': '2aa7:e4af:135:5d69:202e:b0af:0:2', 'end': '2aa7:e4af:135:5d69:202e:b0af:ffff:fffe'}], 'gateway_ip': '2aa7:e4af:135:5d69:202e:b0af:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '2aa7:e4af:135:5d69:202e:b0af:0:2', 'tags': [], 'project_id': 'c542f6a15b944aecb8fbfe1d1fc5a708'}} 2025-09-04 16:24:25,124 - INFO - Created VN ctest-vn4-73204566 2025-09-04 16:24:25,175 - DEBUG - VN ctest-vn4-73204566 UUID is 94a95e5c-3ec6-4129-9d96-fafd70e30a29 2025-09-04 16:24:25,381 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': '94a95e5c-3ec6-4129-9d96-fafd70e30a29', 'name': 'ctest-vn4-73204566', 'tenant_id': 'c542f6a15b944aecb8fbfe1d1fc5a708', 'project_id': 'c542f6a15b944aecb8fbfe1d1fc5a708', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['ac6bcc7d-961b-4489-8b91-b51485205c95', '2b5852d5-56c9-4a96-8c25-dd4e488d7c14'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-16734038', 'ctest-vn4-73204566'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-16734038', 'ctest-policy1-12976252']], 'subnet_ipam': [{'subnet_cidr': '159.214.87.128/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '2aa7:e4af:135:5d69:202e:b0af::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2025-09-04 16:24:25,535 - DEBUG - Requesting: http://10.0.0.33:8082/domains 2025-09-04 16:24:25,874 - DEBUG - Requesting: http://10.0.0.33:8082/domains 2025-09-04 16:24:25,904 - DEBUG - Requesting: http://10.0.0.33:8082/domain/f175ec21-e8ca-45bc-b5a3-0fc6800d490a 2025-09-04 16:24:25,917 - DEBUG - Requesting: http://10.0.0.33:8082/project/c542f6a1-5b94-4aec-b8fb-fe1d1fc5a708 2025-09-04 16:24:25,990 - DEBUG - Requesting: http://10.0.0.33:8082/virtual-network/94a95e5c-3ec6-4129-9d96-fafd70e30a29 2025-09-04 16:24:26,001 - DEBUG - Requesting: http://10.0.0.33:8082/virtual-network/94a95e5c-3ec6-4129-9d96-fafd70e30a29 2025-09-04 16:24:26,011 - DEBUG - Requesting: http://10.0.0.33:8082/routing-instance/d3dc5bd4-9f82-485e-abf1-9cb6d72b48de 2025-09-04 16:24:26,017 - DEBUG - Requesting: http://10.0.0.33:8082/routing-instance/d3dc5bd4-9f82-485e-abf1-9cb6d72b48de 2025-09-04 16:24:26,024 - DEBUG - Requesting: http://10.0.0.33:8082/route-target/ccf3c8d7-7053-4f10-890c-2060dae03215 2025-09-04 16:24:26,030 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-09-04 16:24:26,030 - DEBUG - Requesting: http://10.0.0.33:8082/virtual-network/94a95e5c-3ec6-4129-9d96-fafd70e30a29 2025-09-04 16:24:26,038 - DEBUG - Requesting: http://10.0.0.33:8082/routing-instance/d3dc5bd4-9f82-485e-abf1-9cb6d72b48de 2025-09-04 16:24:26,050 - INFO - Verified VN network id 11 for VN 94a95e5c-3ec6-4129-9d96-fafd70e30a29 2025-09-04 16:24:26,050 - INFO - Verifications in API Server for VN ctest-vn4-73204566 passed 2025-09-04 16:24:26,050 - DEBUG - Requesting: http://10.0.0.33:8082/virtual-network/94a95e5c-3ec6-4129-9d96-fafd70e30a29 2025-09-04 16:24:26,060 - DEBUG - Requesting: http://10.0.0.33:8082/routing-instance/d3dc5bd4-9f82-485e-abf1-9cb6d72b48de 2025-09-04 16:24:26,066 - DEBUG - Requesting: http://10.0.0.33:8082/routing-instance/d3dc5bd4-9f82-485e-abf1-9cb6d72b48de 2025-09-04 16:24:26,072 - DEBUG - Requesting: http://10.0.0.33:8082/route-target/ccf3c8d7-7053-4f10-890c-2060dae03215 2025-09-04 16:24:26,086 - DEBUG - Control-node 10.0.0.33 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-16734038:ctest-vn4-73204566', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-16734038', 'owner-access': '7', 'group': 'reader', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '10712196938960617769', 'uuid-lslong': '11355539476888881705'}, 'enable': 'true', 'created': '2025-09-04T16:24:24', 'last-modified': '2025-09-04T16:24:25', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.735522'} 2025-09-04 16:24:26,094 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-09-04 16:24:26,094 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-73204566 passed 2025-09-04 16:24:26,094 - DEBUG - ====Verifying policy data for ctest-vn4-73204566 in API_Server ====== 2025-09-04 16:24:26,094 - DEBUG - Requesting: http://10.0.0.33:8082/domains 2025-09-04 16:24:26,101 - DEBUG - Requesting: http://10.0.0.33:8082/domain/f175ec21-e8ca-45bc-b5a3-0fc6800d490a 2025-09-04 16:24:26,113 - DEBUG - Requesting: http://10.0.0.33:8082/project/c542f6a1-5b94-4aec-b8fb-fe1d1fc5a708 2025-09-04 16:24:26,191 - DEBUG - Requesting: http://10.0.0.33:8082/virtual-network/94a95e5c-3ec6-4129-9d96-fafd70e30a29 2025-09-04 16:24:26,201 - DEBUG - ==>Verifying data for policy with id: ff9c4ebe-09da-49aa-b402-4b5a308b591a, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-16734038', 'ctest-policy1-12976252'] 2025-09-04 16:24:26,201 - INFO - VN ctest-vn4-73204566 Policy verification: verify_vn_policy_in_api_server, status: True 2025-09-04 16:24:26,201 - DEBUG - Verifying the vn in opserver 2025-09-04 16:24:26,201 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-16734038:ctest-vn4-73204566 virtual network link through opserver 10.0.0.33 2025-09-04 16:24:26,201 - DEBUG - Requesting: http://10.0.0.33:8081/analytics/uves/virtual-networks 2025-09-04 16:24:26,530 - DEBUG - Requesting: http://10.0.0.33:8081/analytics/uves/virtual-networks 2025-09-04 16:24:26,587 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-16734038:ctest-vn4-73204566', 'href': 'http://10.0.0.33:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-16734038:ctest-vn4-73204566?flat'} 2025-09-04 16:24:26,587 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-16734038:ctest-vn4-73204566 is found in opserver 2025-09-04 16:24:26,597 - DEBUG - Do not have enough data to verify VN in agent 2025-09-04 16:24:26,601 - DEBUG - VRF ids for VN ctest-vn4-73204566: {} 2025-09-04 16:24:26,601 - DEBUG - ====Verifying data for ctest-policy1-12976252 in API_Server ====== 2025-09-04 16:24:26,601 - DEBUG - Requesting: http://10.0.0.33:8082/domains 2025-09-04 16:24:26,606 - DEBUG - Requesting: http://10.0.0.33:8082/domain/f175ec21-e8ca-45bc-b5a3-0fc6800d490a 2025-09-04 16:24:26,618 - DEBUG - Requesting: http://10.0.0.33:8082/project/c542f6a1-5b94-4aec-b8fb-fe1d1fc5a708 2025-09-04 16:24:26,691 - DEBUG - Requesting: http://10.0.0.33:8082/network-policy/ff9c4ebe-09da-49aa-b402-4b5a308b591a 2025-09-04 16:24:26,700 - INFO - Verified policy ctest-policy1-12976252 in API Server, Result: True 2025-09-04 16:24:26,700 - INFO - Done with setup and verification, moving onto test .. 2025-09-04 16:24:26,707 - INFO - Deleting VN ctest-vn4-73204566 2025-09-04 16:24:26,819 - DEBUG - Response for deleting network () 2025-09-04 16:24:26,819 - DEBUG - Requesting: http://10.0.0.33:8082/routing-instance/d3dc5bd4-9f82-485e-abf1-9cb6d72b48de 2025-09-04 16:24:26,824 - DEBUG - Response Code: 404 2025-09-04 16:24:26,824 - DEBUG - Requesting: http://10.0.0.33:8082/domains 2025-09-04 16:24:26,829 - DEBUG - Requesting: http://10.0.0.33:8082/domain/f175ec21-e8ca-45bc-b5a3-0fc6800d490a 2025-09-04 16:24:26,880 - DEBUG - Requesting: http://10.0.0.33:8082/project/c542f6a1-5b94-4aec-b8fb-fe1d1fc5a708 2025-09-04 16:24:26,949 - INFO - Validated that VN ctest-vn4-73204566 is not found in API Server 2025-09-04 16:24:26,959 - DEBUG - VN ctest-vn4-73204566 is not present in Agent 10.0.0.33 2025-09-04 16:24:26,959 - INFO - Validated that VN ctest-vn4-73204566 is not in any agent 2025-09-04 16:24:26,972 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-73204566 info 2025-09-04 16:24:27,001 - INFO - Deleted policy ctest-policy1-12976252 2025-09-04 16:24:27,167 - DEBUG - policy ctest-policy1-12976252 is not found in API Server 2025-09-04 16:24:27,420 - DEBUG - No XMPP flaps were noticed during the test 2025-09-04 16:24:27,421 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04] 2025-09-04 16:24:27,421 - INFO - -------------------------------------------------------------------------------- 2025-09-04 16:24:27,709 - DEBUG - No XMPP flaps were noticed during the test 2025-09-04 16:24:27,709 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04] 2025-09-04 16:24:27,709 - INFO - -------------------------------------------------------------------------------- 2025-09-04 16:24:28,410 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-16734038, ID : c542f6a1-5b94-4aec-b8fb-fe1d1fc5a708