2025-11-20 17:09:26,008 - INFO - Domain Default found not creating 2025-11-20 17:09:26,214 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-66733522 not found, creating it 2025-11-20 17:09:26,653 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-66733522, ID : 0a87897c-ece7-4f18-83df-1e8e8ca153ab 2025-11-20 17:09:28,251 - INFO - ================================================================================ 2025-11-20 17:09:28,251 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-11-20 17:09:28,521 - DEBUG - Nothing to compare xmpp stats {'10.0.0.141': {'10.20.0.5': '0'}} with 2025-11-20 17:09:28,521 - INFO - Initial checks done. Running the testcase now 2025-11-20 17:09:28,521 - INFO - 2025-11-20 17:09:28,522 - INFO - ================================================================================ 2025-11-20 17:09:28,522 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-11-20 17:09:28,522 - 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-11-20 17:09:28,808 - DEBUG - Nothing to compare xmpp stats {'10.0.0.141': {'10.20.0.5': '0'}} with 2025-11-20 17:09:28,809 - INFO - Initial checks done. Running the testcase now 2025-11-20 17:09:28,810 - INFO - 2025-11-20 17:09:29,176 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-66733522:ctest-vn4-94018738, 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-66733522:ctest-vn4-94018738, 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-66733522:ctest-vn4-94018738, 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-66733522:ctest-vn4-94018738, 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-11-20 17:09:29,732 - DEBUG - Response for create_network : {'network': {'id': '1c93c2cc-2d8b-45dd-a5eb-b4a456502223', 'name': 'ctest-vn4-94018738', 'tenant_id': '0a87897cece74f1883df1e8e8ca153ab', 'project_id': '0a87897cece74f1883df1e8e8ca153ab', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-66733522', 'ctest-vn4-94018738'], 'port_security_enabled': True, 'description': ''}} 2025-11-20 17:09:29,902 - DEBUG - Response for create_subnet : {'subnet': {'id': 'cdbc6f37-4ead-462d-bbd6-c1a6d687fea6', 'name': '', 'tenant_id': '0a87897cece74f1883df1e8e8ca153ab', 'network_id': '1c93c2cc-2d8b-45dd-a5eb-b4a456502223', 'ip_version': 4, 'cidr': '14.199.179.128/26', 'allocation_pools': [{'start': '14.199.179.130', 'end': '14.199.179.190'}], 'gateway_ip': '14.199.179.129', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '14.199.179.130', 'tags': [], 'project_id': '0a87897cece74f1883df1e8e8ca153ab'}} 2025-11-20 17:09:30,113 - DEBUG - Response for create_subnet : {'subnet': {'id': '5d661300-f438-4731-9b70-5456c66e08b6', 'name': '', 'tenant_id': '0a87897cece74f1883df1e8e8ca153ab', 'network_id': '1c93c2cc-2d8b-45dd-a5eb-b4a456502223', 'ip_version': 6, 'cidr': '3930:8234:ef6d:d231:175:b645::/96', 'allocation_pools': [{'start': '3930:8234:ef6d:d231:175:b645:0:2', 'end': '3930:8234:ef6d:d231:175:b645:ffff:fffe'}], 'gateway_ip': '3930:8234:ef6d:d231:175:b645:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '3930:8234:ef6d:d231:175:b645:0:2', 'tags': [], 'project_id': '0a87897cece74f1883df1e8e8ca153ab'}} 2025-11-20 17:09:30,135 - INFO - Created VN ctest-vn4-94018738 2025-11-20 17:09:30,191 - DEBUG - VN ctest-vn4-94018738 UUID is 1c93c2cc-2d8b-45dd-a5eb-b4a456502223 2025-11-20 17:09:30,417 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': '1c93c2cc-2d8b-45dd-a5eb-b4a456502223', 'name': 'ctest-vn4-94018738', 'tenant_id': '0a87897cece74f1883df1e8e8ca153ab', 'project_id': '0a87897cece74f1883df1e8e8ca153ab', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['cdbc6f37-4ead-462d-bbd6-c1a6d687fea6', '5d661300-f438-4731-9b70-5456c66e08b6'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-66733522', 'ctest-vn4-94018738'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-66733522', 'ctest-policy1-07855675']], 'subnet_ipam': [{'subnet_cidr': '14.199.179.128/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '3930:8234:ef6d:d231:175:b645::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2025-11-20 17:09:30,579 - DEBUG - Requesting: http://10.0.0.141:8082/domains 2025-11-20 17:09:30,874 - DEBUG - Requesting: http://10.0.0.141:8082/domains 2025-11-20 17:09:30,907 - DEBUG - Requesting: http://10.0.0.141:8082/domain/6cf19a68-2ce4-49c1-9e7a-613d55b318f1 2025-11-20 17:09:30,919 - DEBUG - Requesting: http://10.0.0.141:8082/project/0a87897c-ece7-4f18-83df-1e8e8ca153ab 2025-11-20 17:09:31,080 - DEBUG - Requesting: http://10.0.0.141:8082/virtual-network/1c93c2cc-2d8b-45dd-a5eb-b4a456502223 2025-11-20 17:09:31,093 - DEBUG - Requesting: http://10.0.0.141:8082/virtual-network/1c93c2cc-2d8b-45dd-a5eb-b4a456502223 2025-11-20 17:09:31,104 - DEBUG - Requesting: http://10.0.0.141:8082/routing-instance/98fe97e5-897b-4f17-abb7-f07628a45d6d 2025-11-20 17:09:31,112 - DEBUG - Requesting: http://10.0.0.141:8082/routing-instance/98fe97e5-897b-4f17-abb7-f07628a45d6d 2025-11-20 17:09:31,119 - DEBUG - Requesting: http://10.0.0.141:8082/route-target/b5c78eac-fd5d-4f08-b8ab-9409b1c34ede 2025-11-20 17:09:31,126 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-11-20 17:09:31,126 - DEBUG - Requesting: http://10.0.0.141:8082/virtual-network/1c93c2cc-2d8b-45dd-a5eb-b4a456502223 2025-11-20 17:09:31,139 - DEBUG - Requesting: http://10.0.0.141:8082/routing-instance/98fe97e5-897b-4f17-abb7-f07628a45d6d 2025-11-20 17:09:31,157 - INFO - Verified VN network id 11 for VN 1c93c2cc-2d8b-45dd-a5eb-b4a456502223 2025-11-20 17:09:31,157 - INFO - Verifications in API Server for VN ctest-vn4-94018738 passed 2025-11-20 17:09:31,157 - DEBUG - Requesting: http://10.0.0.141:8082/virtual-network/1c93c2cc-2d8b-45dd-a5eb-b4a456502223 2025-11-20 17:09:31,169 - DEBUG - Requesting: http://10.0.0.141:8082/routing-instance/98fe97e5-897b-4f17-abb7-f07628a45d6d 2025-11-20 17:09:31,177 - DEBUG - Requesting: http://10.0.0.141:8082/routing-instance/98fe97e5-897b-4f17-abb7-f07628a45d6d 2025-11-20 17:09:31,185 - DEBUG - Requesting: http://10.0.0.141:8082/route-target/b5c78eac-fd5d-4f08-b8ab-9409b1c34ede 2025-11-20 17:09:31,198 - DEBUG - Control-node 10.0.0.141 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-66733522:ctest-vn4-94018738', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-66733522', 'owner-access': '7', 'group': 'reader', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '2059203636831667677', 'uuid-lslong': '11955848253700842019'}, 'enable': 'true', 'created': '2025-11-20T17:09:29', 'last-modified': '2025-11-20T17:09:30', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.816264'} 2025-11-20 17:09:31,204 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-11-20 17:09:31,204 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-94018738 passed 2025-11-20 17:09:31,204 - DEBUG - ====Verifying policy data for ctest-vn4-94018738 in API_Server ====== 2025-11-20 17:09:31,204 - DEBUG - Requesting: http://10.0.0.141:8082/domains 2025-11-20 17:09:31,211 - DEBUG - Requesting: http://10.0.0.141:8082/domain/6cf19a68-2ce4-49c1-9e7a-613d55b318f1 2025-11-20 17:09:31,224 - DEBUG - Requesting: http://10.0.0.141:8082/project/0a87897c-ece7-4f18-83df-1e8e8ca153ab 2025-11-20 17:09:31,300 - DEBUG - Requesting: http://10.0.0.141:8082/virtual-network/1c93c2cc-2d8b-45dd-a5eb-b4a456502223 2025-11-20 17:09:31,310 - DEBUG - ==>Verifying data for policy with id: 1ecc6fbc-3dab-4a3c-a57d-7a663f8f15d8, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-66733522', 'ctest-policy1-07855675'] 2025-11-20 17:09:31,310 - INFO - VN ctest-vn4-94018738 Policy verification: verify_vn_policy_in_api_server, status: True 2025-11-20 17:09:31,310 - DEBUG - Verifying the vn in opserver 2025-11-20 17:09:31,310 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-66733522:ctest-vn4-94018738 virtual network link through opserver 10.0.0.141 2025-11-20 17:09:31,310 - DEBUG - Requesting: http://10.0.0.141:8081/analytics/uves/virtual-networks 2025-11-20 17:09:31,608 - DEBUG - Requesting: http://10.0.0.141:8081/analytics/uves/virtual-networks 2025-11-20 17:09:31,692 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-66733522:ctest-vn4-94018738', 'href': 'http://10.0.0.141:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-66733522:ctest-vn4-94018738?flat'} 2025-11-20 17:09:31,692 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-66733522:ctest-vn4-94018738 is found in opserver 2025-11-20 17:09:31,702 - DEBUG - Do not have enough data to verify VN in agent 2025-11-20 17:09:31,707 - DEBUG - VRF ids for VN ctest-vn4-94018738: {} 2025-11-20 17:09:31,707 - DEBUG - ====Verifying data for ctest-policy1-07855675 in API_Server ====== 2025-11-20 17:09:31,707 - DEBUG - Requesting: http://10.0.0.141:8082/domains 2025-11-20 17:09:31,713 - DEBUG - Requesting: http://10.0.0.141:8082/domain/6cf19a68-2ce4-49c1-9e7a-613d55b318f1 2025-11-20 17:09:31,724 - DEBUG - Requesting: http://10.0.0.141:8082/project/0a87897c-ece7-4f18-83df-1e8e8ca153ab 2025-11-20 17:09:31,797 - DEBUG - Requesting: http://10.0.0.141:8082/network-policy/1ecc6fbc-3dab-4a3c-a57d-7a663f8f15d8 2025-11-20 17:09:31,808 - INFO - Verified policy ctest-policy1-07855675 in API Server, Result: True 2025-11-20 17:09:31,808 - INFO - Done with setup and verification, moving onto test .. 2025-11-20 17:09:31,819 - INFO - Deleting VN ctest-vn4-94018738 2025-11-20 17:09:31,948 - DEBUG - Response for deleting network () 2025-11-20 17:09:31,948 - DEBUG - Requesting: http://10.0.0.141:8082/routing-instance/98fe97e5-897b-4f17-abb7-f07628a45d6d 2025-11-20 17:09:31,954 - DEBUG - Response Code: 404 2025-11-20 17:09:31,954 - DEBUG - Requesting: http://10.0.0.141:8082/domains 2025-11-20 17:09:31,960 - DEBUG - Requesting: http://10.0.0.141:8082/domain/6cf19a68-2ce4-49c1-9e7a-613d55b318f1 2025-11-20 17:09:32,012 - DEBUG - Requesting: http://10.0.0.141:8082/project/0a87897c-ece7-4f18-83df-1e8e8ca153ab 2025-11-20 17:09:32,086 - INFO - Validated that VN ctest-vn4-94018738 is not found in API Server 2025-11-20 17:09:32,096 - DEBUG - VN ctest-vn4-94018738 is not present in Agent 10.0.0.141 2025-11-20 17:09:32,096 - INFO - Validated that VN ctest-vn4-94018738 is not in any agent 2025-11-20 17:09:32,110 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-94018738 info 2025-11-20 17:09:32,134 - INFO - Deleted policy ctest-policy1-07855675 2025-11-20 17:09:32,299 - DEBUG - policy ctest-policy1-07855675 is not found in API Server 2025-11-20 17:09:32,557 - DEBUG - No XMPP flaps were noticed during the test
2025-11-20 17:09:32,557 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04]
2025-11-20 17:09:32,557 - INFO - -------------------------------------------------------------------------------- 2025-11-20 17:09:32,863 - DEBUG - No XMPP flaps were noticed during the test
2025-11-20 17:09:32,863 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04]
2025-11-20 17:09:32,864 - INFO - -------------------------------------------------------------------------------- 2025-11-20 17:09:33,609 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-66733522, ID : 0a87897c-ece7-4f18-83df-1e8e8ca153ab