2025-11-04 18:01:51,988 - INFO - Domain Default found not creating 2025-11-04 18:01:52,170 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-24738458 not found, creating it 2025-11-04 18:01:52,634 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-24738458, ID : 61af0b52-3b71-45ff-8361-de737f9165cf 2025-11-04 18:01:54,168 - INFO - ================================================================================ 2025-11-04 18:01:54,169 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-11-04 18:01:54,435 - DEBUG - Nothing to compare xmpp stats {'10.0.0.50': {'10.20.0.17': '0'}} with 2025-11-04 18:01:54,435 - INFO - Initial checks done. Running the testcase now 2025-11-04 18:01:54,435 - INFO - 2025-11-04 18:01:54,435 - INFO - ================================================================================ 2025-11-04 18:01:54,435 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-11-04 18:01:54,435 - 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-04 18:01:54,737 - DEBUG - Nothing to compare xmpp stats {'10.0.0.50': {'10.20.0.17': '0'}} with 2025-11-04 18:01:54,737 - INFO - Initial checks done. Running the testcase now 2025-11-04 18:01:54,737 - INFO - 2025-11-04 18:01:55,104 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-24738458:ctest-vn4-60081831, 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-24738458:ctest-vn4-60081831, 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-24738458:ctest-vn4-60081831, 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-24738458:ctest-vn4-60081831, 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-04 18:01:55,633 - DEBUG - Response for create_network : {'network': {'id': '4581eab5-0599-4030-bc40-ccd93d1b0f29', 'name': 'ctest-vn4-60081831', 'tenant_id': '61af0b523b7145ff8361de737f9165cf', 'project_id': '61af0b523b7145ff8361de737f9165cf', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-24738458', 'ctest-vn4-60081831'], 'port_security_enabled': True, 'description': ''}} 2025-11-04 18:01:55,820 - DEBUG - Response for create_subnet : {'subnet': {'id': '633708cf-8cb7-4170-9078-60aae3b9a8b0', 'name': '', 'tenant_id': '61af0b523b7145ff8361de737f9165cf', 'network_id': '4581eab5-0599-4030-bc40-ccd93d1b0f29', 'ip_version': 4, 'cidr': '92.81.211.192/26', 'allocation_pools': [{'start': '92.81.211.194', 'end': '92.81.211.254'}], 'gateway_ip': '92.81.211.193', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '92.81.211.194', 'tags': [], 'project_id': '61af0b523b7145ff8361de737f9165cf'}} 2025-11-04 18:01:56,049 - DEBUG - Response for create_subnet : {'subnet': {'id': 'bd6c60f4-ebc3-424f-87b8-ae8164516760', 'name': '', 'tenant_id': '61af0b523b7145ff8361de737f9165cf', 'network_id': '4581eab5-0599-4030-bc40-ccd93d1b0f29', 'ip_version': 6, 'cidr': '3a09:cc5c:e82e:b634:502c:89ec::/96', 'allocation_pools': [{'start': '3a09:cc5c:e82e:b634:502c:89ec:0:2', 'end': '3a09:cc5c:e82e:b634:502c:89ec:ffff:fffe'}], 'gateway_ip': '3a09:cc5c:e82e:b634:502c:89ec:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '3a09:cc5c:e82e:b634:502c:89ec:0:2', 'tags': [], 'project_id': '61af0b523b7145ff8361de737f9165cf'}} 2025-11-04 18:01:56,072 - INFO - Created VN ctest-vn4-60081831 2025-11-04 18:01:56,126 - DEBUG - VN ctest-vn4-60081831 UUID is 4581eab5-0599-4030-bc40-ccd93d1b0f29 2025-11-04 18:01:56,351 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': '4581eab5-0599-4030-bc40-ccd93d1b0f29', 'name': 'ctest-vn4-60081831', 'tenant_id': '61af0b523b7145ff8361de737f9165cf', 'project_id': '61af0b523b7145ff8361de737f9165cf', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['633708cf-8cb7-4170-9078-60aae3b9a8b0', 'bd6c60f4-ebc3-424f-87b8-ae8164516760'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-24738458', 'ctest-vn4-60081831'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-24738458', 'ctest-policy1-87788044']], 'subnet_ipam': [{'subnet_cidr': '92.81.211.192/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '3a09:cc5c:e82e:b634:502c:89ec::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2025-11-04 18:01:56,522 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2025-11-04 18:01:56,843 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2025-11-04 18:01:56,876 - DEBUG - Requesting: http://10.0.0.50:8082/domain/5f74418c-e2a6-4590-82b6-90aafafe446b 2025-11-04 18:01:56,891 - DEBUG - Requesting: http://10.0.0.50:8082/project/61af0b52-3b71-45ff-8361-de737f9165cf 2025-11-04 18:01:56,976 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/4581eab5-0599-4030-bc40-ccd93d1b0f29 2025-11-04 18:01:56,990 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/4581eab5-0599-4030-bc40-ccd93d1b0f29 2025-11-04 18:01:57,000 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/af28567a-cb27-4175-ac06-88901aecf2cc 2025-11-04 18:01:57,009 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/af28567a-cb27-4175-ac06-88901aecf2cc 2025-11-04 18:01:57,016 - DEBUG - Requesting: http://10.0.0.50:8082/route-target/80e1519a-250f-4ada-82f5-82f44979be6c 2025-11-04 18:01:57,023 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-11-04 18:01:57,023 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/4581eab5-0599-4030-bc40-ccd93d1b0f29 2025-11-04 18:01:57,034 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/af28567a-cb27-4175-ac06-88901aecf2cc 2025-11-04 18:01:57,052 - INFO - Verified VN network id 11 for VN 4581eab5-0599-4030-bc40-ccd93d1b0f29 2025-11-04 18:01:57,052 - INFO - Verifications in API Server for VN ctest-vn4-60081831 passed 2025-11-04 18:01:57,052 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/4581eab5-0599-4030-bc40-ccd93d1b0f29 2025-11-04 18:01:57,062 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/af28567a-cb27-4175-ac06-88901aecf2cc 2025-11-04 18:01:57,070 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/af28567a-cb27-4175-ac06-88901aecf2cc 2025-11-04 18:01:57,077 - DEBUG - Requesting: http://10.0.0.50:8082/route-target/80e1519a-250f-4ada-82f5-82f44979be6c 2025-11-04 18:01:57,091 - DEBUG - Control-node 10.0.0.50 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-24738458:ctest-vn4-60081831', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-24738458', 'owner-access': '7', 'group': 'reader', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '5008542323816611888', 'uuid-lslong': '13565067311045087017'}, 'enable': 'true', 'created': '2025-11-04T18:01:55', 'last-modified': '2025-11-04T18:01:56', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.767987'} 2025-11-04 18:01:57,096 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-11-04 18:01:57,097 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-60081831 passed 2025-11-04 18:01:57,097 - DEBUG - ====Verifying policy data for ctest-vn4-60081831 in API_Server ====== 2025-11-04 18:01:57,097 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2025-11-04 18:01:57,103 - DEBUG - Requesting: http://10.0.0.50:8082/domain/5f74418c-e2a6-4590-82b6-90aafafe446b 2025-11-04 18:01:57,116 - DEBUG - Requesting: http://10.0.0.50:8082/project/61af0b52-3b71-45ff-8361-de737f9165cf 2025-11-04 18:01:57,188 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/4581eab5-0599-4030-bc40-ccd93d1b0f29 2025-11-04 18:01:57,198 - DEBUG - ==>Verifying data for policy with id: f416ceb0-6f7d-48c0-b77d-45d02022e27b, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-24738458', 'ctest-policy1-87788044'] 2025-11-04 18:01:57,199 - INFO - VN ctest-vn4-60081831 Policy verification: verify_vn_policy_in_api_server, status: True 2025-11-04 18:01:57,199 - DEBUG - Verifying the vn in opserver 2025-11-04 18:01:57,199 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-24738458:ctest-vn4-60081831 virtual network link through opserver 10.0.0.50 2025-11-04 18:01:57,199 - DEBUG - Requesting: http://10.0.0.50:8081/analytics/uves/virtual-networks 2025-11-04 18:01:57,492 - DEBUG - Requesting: http://10.0.0.50:8081/analytics/uves/virtual-networks 2025-11-04 18:01:57,563 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-24738458:ctest-vn4-60081831', 'href': 'http://10.0.0.50:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-24738458:ctest-vn4-60081831?flat'} 2025-11-04 18:01:57,563 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-24738458:ctest-vn4-60081831 is found in opserver 2025-11-04 18:01:57,575 - DEBUG - Do not have enough data to verify VN in agent 2025-11-04 18:01:57,580 - DEBUG - VRF ids for VN ctest-vn4-60081831: {} 2025-11-04 18:01:57,581 - DEBUG - ====Verifying data for ctest-policy1-87788044 in API_Server ====== 2025-11-04 18:01:57,581 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2025-11-04 18:01:57,587 - DEBUG - Requesting: http://10.0.0.50:8082/domain/5f74418c-e2a6-4590-82b6-90aafafe446b 2025-11-04 18:01:57,602 - DEBUG - Requesting: http://10.0.0.50:8082/project/61af0b52-3b71-45ff-8361-de737f9165cf 2025-11-04 18:01:57,676 - DEBUG - Requesting: http://10.0.0.50:8082/network-policy/f416ceb0-6f7d-48c0-b77d-45d02022e27b 2025-11-04 18:01:57,686 - INFO - Verified policy ctest-policy1-87788044 in API Server, Result: True 2025-11-04 18:01:57,686 - INFO - Done with setup and verification, moving onto test .. 2025-11-04 18:01:57,694 - INFO - Deleting VN ctest-vn4-60081831 2025-11-04 18:01:57,813 - DEBUG - Response for deleting network () 2025-11-04 18:01:57,813 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/af28567a-cb27-4175-ac06-88901aecf2cc 2025-11-04 18:01:57,819 - DEBUG - Response Code: 404 2025-11-04 18:01:57,820 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2025-11-04 18:01:57,827 - DEBUG - Requesting: http://10.0.0.50:8082/domain/5f74418c-e2a6-4590-82b6-90aafafe446b 2025-11-04 18:01:57,880 - DEBUG - Requesting: http://10.0.0.50:8082/project/61af0b52-3b71-45ff-8361-de737f9165cf 2025-11-04 18:01:57,955 - INFO - Validated that VN ctest-vn4-60081831 is not found in API Server 2025-11-04 18:01:57,964 - DEBUG - VN ctest-vn4-60081831 is not present in Agent 10.0.0.50 2025-11-04 18:01:57,964 - INFO - Validated that VN ctest-vn4-60081831 is not in any agent 2025-11-04 18:01:57,978 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-60081831 info 2025-11-04 18:01:58,005 - INFO - Deleted policy ctest-policy1-87788044 2025-11-04 18:01:58,170 - DEBUG - policy ctest-policy1-87788044 is not found in API Server 2025-11-04 18:01:58,428 - DEBUG - No XMPP flaps were noticed during the test 2025-11-04 18:01:58,428 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04] 2025-11-04 18:01:58,428 - INFO - -------------------------------------------------------------------------------- 2025-11-04 18:01:58,726 - DEBUG - No XMPP flaps were noticed during the test 2025-11-04 18:01:58,726 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04] 2025-11-04 18:01:58,727 - INFO - -------------------------------------------------------------------------------- 2025-11-04 18:01:59,447 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-24738458, ID : 61af0b52-3b71-45ff-8361-de737f9165cf