2025-10-09 17:54:51,653 - INFO - Domain Default found not creating 2025-10-09 17:54:51,817 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-51333319 not found, creating it 2025-10-09 17:54:52,318 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-51333319, ID : cfb8d649-14ee-4dfe-91d7-0682137d2308 2025-10-09 17:54:53,823 - INFO - ================================================================================ 2025-10-09 17:54:53,823 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-10-09 17:54:54,077 - DEBUG - Nothing to compare xmpp stats {'10.0.0.131': {'10.20.0.17': '0'}} with 2025-10-09 17:54:54,077 - INFO - Initial checks done. Running the testcase now 2025-10-09 17:54:54,077 - INFO - 2025-10-09 17:54:54,077 - INFO - ================================================================================ 2025-10-09 17:54:54,077 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-10-09 17:54:54,077 - 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-09 17:54:54,365 - DEBUG - Nothing to compare xmpp stats {'10.0.0.131': {'10.20.0.17': '0'}} with 2025-10-09 17:54:54,365 - INFO - Initial checks done. Running the testcase now 2025-10-09 17:54:54,365 - INFO - 2025-10-09 17:54:54,720 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-51333319:ctest-vn4-63659162, 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-51333319:ctest-vn4-63659162, 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-51333319:ctest-vn4-63659162, 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-51333319:ctest-vn4-63659162, 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-09 17:54:55,238 - DEBUG - Response for create_network : {'network': {'id': '946e12ee-2a8c-4f42-a87a-4d4776677503', 'name': 'ctest-vn4-63659162', 'tenant_id': 'cfb8d64914ee4dfe91d70682137d2308', 'project_id': 'cfb8d64914ee4dfe91d70682137d2308', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-51333319', 'ctest-vn4-63659162'], 'port_security_enabled': True, 'description': ''}} 2025-10-09 17:54:55,471 - DEBUG - Response for create_subnet : {'subnet': {'id': '3636b263-a155-4ec5-9370-a84aa49321ef', 'name': '', 'tenant_id': 'cfb8d64914ee4dfe91d70682137d2308', 'network_id': '946e12ee-2a8c-4f42-a87a-4d4776677503', 'ip_version': 4, 'cidr': '211.143.130.64/26', 'allocation_pools': [{'start': '211.143.130.66', 'end': '211.143.130.126'}], 'gateway_ip': '211.143.130.65', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '211.143.130.66', 'tags': [], 'project_id': 'cfb8d64914ee4dfe91d70682137d2308'}} 2025-10-09 17:54:55,653 - DEBUG - Response for create_subnet : {'subnet': {'id': 'b87146d2-6f40-4d98-98ac-986fbce8c791', 'name': '', 'tenant_id': 'cfb8d64914ee4dfe91d70682137d2308', 'network_id': '946e12ee-2a8c-4f42-a87a-4d4776677503', 'ip_version': 6, 'cidr': '3364:8a5f:6553:5d0:6440:6125::/96', 'allocation_pools': [{'start': '3364:8a5f:6553:5d0:6440:6125:0:2', 'end': '3364:8a5f:6553:5d0:6440:6125:ffff:fffe'}], 'gateway_ip': '3364:8a5f:6553:5d0:6440:6125:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '3364:8a5f:6553:5d0:6440:6125:0:2', 'tags': [], 'project_id': 'cfb8d64914ee4dfe91d70682137d2308'}} 2025-10-09 17:54:55,671 - INFO - Created VN ctest-vn4-63659162 2025-10-09 17:54:55,724 - DEBUG - VN ctest-vn4-63659162 UUID is 946e12ee-2a8c-4f42-a87a-4d4776677503 2025-10-09 17:54:55,923 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': '946e12ee-2a8c-4f42-a87a-4d4776677503', 'name': 'ctest-vn4-63659162', 'tenant_id': 'cfb8d64914ee4dfe91d70682137d2308', 'project_id': 'cfb8d64914ee4dfe91d70682137d2308', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['3636b263-a155-4ec5-9370-a84aa49321ef', 'b87146d2-6f40-4d98-98ac-986fbce8c791'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-51333319', 'ctest-vn4-63659162'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-51333319', 'ctest-policy1-14991468']], 'subnet_ipam': [{'subnet_cidr': '211.143.130.64/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '3364:8a5f:6553:5d0:6440:6125::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2025-10-09 17:54:56,084 - DEBUG - Requesting: http://10.0.0.131:8082/domains 2025-10-09 17:54:56,507 - DEBUG - Requesting: http://10.0.0.131:8082/domains 2025-10-09 17:54:56,542 - DEBUG - Requesting: http://10.0.0.131:8082/domain/8aaa9f34-8ac1-43f6-a406-a0f87f9d8130 2025-10-09 17:54:56,553 - DEBUG - Requesting: http://10.0.0.131:8082/project/cfb8d649-14ee-4dfe-91d7-0682137d2308 2025-10-09 17:54:56,623 - DEBUG - Requesting: http://10.0.0.131:8082/virtual-network/946e12ee-2a8c-4f42-a87a-4d4776677503 2025-10-09 17:54:56,635 - DEBUG - Requesting: http://10.0.0.131:8082/virtual-network/946e12ee-2a8c-4f42-a87a-4d4776677503 2025-10-09 17:54:56,646 - DEBUG - Requesting: http://10.0.0.131:8082/routing-instance/47a3aa1d-939b-49c9-a053-d266024c44e9 2025-10-09 17:54:56,653 - DEBUG - Requesting: http://10.0.0.131:8082/routing-instance/47a3aa1d-939b-49c9-a053-d266024c44e9 2025-10-09 17:54:56,659 - DEBUG - Requesting: http://10.0.0.131:8082/route-target/0d49c8ef-4c02-4be7-a23b-e837b4ef5c3c 2025-10-09 17:54:56,666 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-10-09 17:54:56,666 - DEBUG - Requesting: http://10.0.0.131:8082/virtual-network/946e12ee-2a8c-4f42-a87a-4d4776677503 2025-10-09 17:54:56,679 - DEBUG - Requesting: http://10.0.0.131:8082/routing-instance/47a3aa1d-939b-49c9-a053-d266024c44e9 2025-10-09 17:54:56,696 - INFO - Verified VN network id 11 for VN 946e12ee-2a8c-4f42-a87a-4d4776677503 2025-10-09 17:54:56,696 - INFO - Verifications in API Server for VN ctest-vn4-63659162 passed 2025-10-09 17:54:56,696 - DEBUG - Requesting: http://10.0.0.131:8082/virtual-network/946e12ee-2a8c-4f42-a87a-4d4776677503 2025-10-09 17:54:56,707 - DEBUG - Requesting: http://10.0.0.131:8082/routing-instance/47a3aa1d-939b-49c9-a053-d266024c44e9 2025-10-09 17:54:56,714 - DEBUG - Requesting: http://10.0.0.131:8082/routing-instance/47a3aa1d-939b-49c9-a053-d266024c44e9 2025-10-09 17:54:56,722 - DEBUG - Requesting: http://10.0.0.131:8082/route-target/0d49c8ef-4c02-4be7-a23b-e837b4ef5c3c 2025-10-09 17:54:56,732 - DEBUG - Control-node 10.0.0.131 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-51333319:ctest-vn4-63659162', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-51333319', 'owner-access': '7', 'group': 'reader', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '10695506979176861506', 'uuid-lslong': '12140100714855101699'}, 'enable': 'true', 'created': '2025-10-09T17:54:55', 'last-modified': '2025-10-09T17:54:55', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.838795'} 2025-10-09 17:54:56,737 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-10-09 17:54:56,737 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-63659162 passed 2025-10-09 17:54:56,738 - DEBUG - ====Verifying policy data for ctest-vn4-63659162 in API_Server ====== 2025-10-09 17:54:56,738 - DEBUG - Requesting: http://10.0.0.131:8082/domains 2025-10-09 17:54:56,742 - DEBUG - Requesting: http://10.0.0.131:8082/domain/8aaa9f34-8ac1-43f6-a406-a0f87f9d8130 2025-10-09 17:54:56,752 - DEBUG - Requesting: http://10.0.0.131:8082/project/cfb8d649-14ee-4dfe-91d7-0682137d2308 2025-10-09 17:54:56,822 - DEBUG - Requesting: http://10.0.0.131:8082/virtual-network/946e12ee-2a8c-4f42-a87a-4d4776677503 2025-10-09 17:54:56,830 - DEBUG - ==>Verifying data for policy with id: 292dac6f-8871-4617-bc50-d5381f5fd08c, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-51333319', 'ctest-policy1-14991468'] 2025-10-09 17:54:56,830 - INFO - VN ctest-vn4-63659162 Policy verification: verify_vn_policy_in_api_server, status: True 2025-10-09 17:54:56,830 - DEBUG - Verifying the vn in opserver 2025-10-09 17:54:56,830 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-51333319:ctest-vn4-63659162 virtual network link through opserver 10.0.0.131 2025-10-09 17:54:56,830 - DEBUG - Requesting: http://10.0.0.131:8081/analytics/uves/virtual-networks 2025-10-09 17:54:57,136 - DEBUG - Requesting: http://10.0.0.131:8081/analytics/uves/virtual-networks 2025-10-09 17:54:57,203 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-51333319:ctest-vn4-63659162', 'href': 'http://10.0.0.131:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-51333319:ctest-vn4-63659162?flat'} 2025-10-09 17:54:57,203 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-51333319:ctest-vn4-63659162 is found in opserver 2025-10-09 17:54:57,213 - DEBUG - Do not have enough data to verify VN in agent 2025-10-09 17:54:57,217 - DEBUG - VRF ids for VN ctest-vn4-63659162: {} 2025-10-09 17:54:57,217 - DEBUG - ====Verifying data for ctest-policy1-14991468 in API_Server ====== 2025-10-09 17:54:57,217 - DEBUG - Requesting: http://10.0.0.131:8082/domains 2025-10-09 17:54:57,222 - DEBUG - Requesting: http://10.0.0.131:8082/domain/8aaa9f34-8ac1-43f6-a406-a0f87f9d8130 2025-10-09 17:54:57,232 - DEBUG - Requesting: http://10.0.0.131:8082/project/cfb8d649-14ee-4dfe-91d7-0682137d2308 2025-10-09 17:54:57,303 - DEBUG - Requesting: http://10.0.0.131:8082/network-policy/292dac6f-8871-4617-bc50-d5381f5fd08c 2025-10-09 17:54:57,311 - INFO - Verified policy ctest-policy1-14991468 in API Server, Result: True 2025-10-09 17:54:57,311 - INFO - Done with setup and verification, moving onto test .. 2025-10-09 17:54:57,319 - INFO - Deleting VN ctest-vn4-63659162 2025-10-09 17:54:57,442 - DEBUG - Response for deleting network () 2025-10-09 17:54:57,442 - DEBUG - Requesting: http://10.0.0.131:8082/routing-instance/47a3aa1d-939b-49c9-a053-d266024c44e9 2025-10-09 17:54:57,448 - DEBUG - Response Code: 404 2025-10-09 17:54:57,448 - DEBUG - Requesting: http://10.0.0.131:8082/domains 2025-10-09 17:54:57,453 - DEBUG - Requesting: http://10.0.0.131:8082/domain/8aaa9f34-8ac1-43f6-a406-a0f87f9d8130 2025-10-09 17:54:57,509 - DEBUG - Requesting: http://10.0.0.131:8082/project/cfb8d649-14ee-4dfe-91d7-0682137d2308 2025-10-09 17:54:57,579 - INFO - Validated that VN ctest-vn4-63659162 is not found in API Server 2025-10-09 17:54:57,588 - DEBUG - VN ctest-vn4-63659162 is not present in Agent 10.0.0.131 2025-10-09 17:54:57,588 - INFO - Validated that VN ctest-vn4-63659162 is not in any agent 2025-10-09 17:54:57,604 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-63659162 info 2025-10-09 17:54:57,628 - INFO - Deleted policy ctest-policy1-14991468 2025-10-09 17:54:57,792 - DEBUG - policy ctest-policy1-14991468 is not found in API Server 2025-10-09 17:54:58,046 - DEBUG - No XMPP flaps were noticed during the test
2025-10-09 17:54:58,046 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04]
2025-10-09 17:54:58,046 - INFO - -------------------------------------------------------------------------------- 2025-10-09 17:54:58,341 - DEBUG - No XMPP flaps were noticed during the test
2025-10-09 17:54:58,341 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:05]
2025-10-09 17:54:58,341 - INFO - -------------------------------------------------------------------------------- 2025-10-09 17:54:59,004 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-51333319, ID : cfb8d649-14ee-4dfe-91d7-0682137d2308