2025-08-15 17:28:21,863 - INFO - Domain Default found not creating 2025-08-15 17:28:21,975 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-05817886 not found, creating it 2025-08-15 17:28:22,392 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-05817886, ID : 963a6fd8-c536-4b23-8f61-231ccc069391 2025-08-15 17:28:23,661 - INFO - ================================================================================ 2025-08-15 17:28:23,661 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-08-15 17:28:23,918 - DEBUG - Nothing to compare xmpp stats {'10.0.0.50': {'10.20.0.17': '0'}} with 2025-08-15 17:28:23,918 - INFO - Initial checks done. Running the testcase now 2025-08-15 17:28:23,918 - INFO - 2025-08-15 17:28:23,918 - INFO - ================================================================================ 2025-08-15 17:28:23,918 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-08-15 17:28:23,918 - 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-08-15 17:28:24,210 - DEBUG - Nothing to compare xmpp stats {'10.0.0.50': {'10.20.0.17': '0'}} with 2025-08-15 17:28:24,210 - INFO - Initial checks done. Running the testcase now 2025-08-15 17:28:24,210 - INFO - 2025-08-15 17:28:24,545 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-05817886:ctest-vn4-26427547, 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-05817886:ctest-vn4-26427547, 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-05817886:ctest-vn4-26427547, 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-05817886:ctest-vn4-26427547, 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-08-15 17:28:25,030 - DEBUG - Response for create_network : {'network': {'id': 'cd239b24-f616-454a-95b3-55b61bd46b8c', 'name': 'ctest-vn4-26427547', 'tenant_id': '963a6fd8c5364b238f61231ccc069391', 'project_id': '963a6fd8c5364b238f61231ccc069391', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-05817886', 'ctest-vn4-26427547'], 'port_security_enabled': True, 'description': ''}} 2025-08-15 17:28:25,225 - DEBUG - Response for create_subnet : {'subnet': {'id': '668acdb1-90ba-49c3-86d1-102f1b68f160', 'name': '', 'tenant_id': '963a6fd8c5364b238f61231ccc069391', 'network_id': 'cd239b24-f616-454a-95b3-55b61bd46b8c', 'ip_version': 4, 'cidr': '121.220.19.192/26', 'allocation_pools': [{'start': '121.220.19.194', 'end': '121.220.19.254'}], 'gateway_ip': '121.220.19.193', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '121.220.19.194', 'tags': [], 'project_id': '963a6fd8c5364b238f61231ccc069391'}} 2025-08-15 17:28:25,414 - DEBUG - Response for create_subnet : {'subnet': {'id': 'df39b352-b82c-446d-82fe-dbd90b216ea0', 'name': '', 'tenant_id': '963a6fd8c5364b238f61231ccc069391', 'network_id': 'cd239b24-f616-454a-95b3-55b61bd46b8c', 'ip_version': 6, 'cidr': '38f7:fd8a:ebcd:a0fc:c6b5:4dd5::/96', 'allocation_pools': [{'start': '38f7:fd8a:ebcd:a0fc:c6b5:4dd5:0:2', 'end': '38f7:fd8a:ebcd:a0fc:c6b5:4dd5:ffff:fffe'}], 'gateway_ip': '38f7:fd8a:ebcd:a0fc:c6b5:4dd5:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '38f7:fd8a:ebcd:a0fc:c6b5:4dd5:0:2', 'tags': [], 'project_id': '963a6fd8c5364b238f61231ccc069391'}} 2025-08-15 17:28:25,432 - INFO - Created VN ctest-vn4-26427547 2025-08-15 17:28:25,481 - DEBUG - VN ctest-vn4-26427547 UUID is cd239b24-f616-454a-95b3-55b61bd46b8c 2025-08-15 17:28:25,644 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': 'cd239b24-f616-454a-95b3-55b61bd46b8c', 'name': 'ctest-vn4-26427547', 'tenant_id': '963a6fd8c5364b238f61231ccc069391', 'project_id': '963a6fd8c5364b238f61231ccc069391', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['668acdb1-90ba-49c3-86d1-102f1b68f160', 'df39b352-b82c-446d-82fe-dbd90b216ea0'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-05817886', 'ctest-vn4-26427547'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-05817886', 'ctest-policy1-53817779']], 'subnet_ipam': [{'subnet_cidr': '121.220.19.192/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '38f7:fd8a:ebcd:a0fc:c6b5:4dd5::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2025-08-15 17:28:25,817 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2025-08-15 17:28:26,103 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2025-08-15 17:28:26,127 - DEBUG - Requesting: http://10.0.0.50:8082/domain/4238f661-f832-4543-b519-0bccafd6fd9a 2025-08-15 17:28:26,137 - DEBUG - Requesting: http://10.0.0.50:8082/project/963a6fd8-c536-4b23-8f61-231ccc069391 2025-08-15 17:28:26,205 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/cd239b24-f616-454a-95b3-55b61bd46b8c 2025-08-15 17:28:26,215 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/cd239b24-f616-454a-95b3-55b61bd46b8c 2025-08-15 17:28:26,223 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/e367d877-4cea-45c5-8595-5611c27a9f65 2025-08-15 17:28:26,228 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/e367d877-4cea-45c5-8595-5611c27a9f65 2025-08-15 17:28:26,233 - DEBUG - Requesting: http://10.0.0.50:8082/route-target/35a620d8-07c0-412a-a8b5-e858766a88e2 2025-08-15 17:28:26,238 - DEBUG - Route Targets: ['target:64512:8000005'] 2025-08-15 17:28:26,238 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/cd239b24-f616-454a-95b3-55b61bd46b8c 2025-08-15 17:28:26,246 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/e367d877-4cea-45c5-8595-5611c27a9f65 2025-08-15 17:28:26,256 - INFO - Verified VN network id 12 for VN cd239b24-f616-454a-95b3-55b61bd46b8c 2025-08-15 17:28:26,256 - INFO - Verifications in API Server for VN ctest-vn4-26427547 passed 2025-08-15 17:28:26,256 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/cd239b24-f616-454a-95b3-55b61bd46b8c 2025-08-15 17:28:26,265 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/e367d877-4cea-45c5-8595-5611c27a9f65 2025-08-15 17:28:26,270 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/e367d877-4cea-45c5-8595-5611c27a9f65 2025-08-15 17:28:26,275 - DEBUG - Requesting: http://10.0.0.50:8082/route-target/35a620d8-07c0-412a-a8b5-e858766a88e2 2025-08-15 17:28:26,284 - DEBUG - Control-node 10.0.0.50 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-05817886:ctest-vn4-26427547', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-05817886', 'owner-access': '7', 'group': 'reader', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '14781828985009882442', 'uuid-lslong': '10787059773121784716'}, 'enable': 'true', 'created': '2025-08-15T17:28:24', 'last-modified': '2025-08-15T17:28:25', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.664084'} 2025-08-15 17:28:26,289 - DEBUG - Route Targets: ['target:64512:8000005'] 2025-08-15 17:28:26,289 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-26427547 passed 2025-08-15 17:28:26,289 - DEBUG - ====Verifying policy data for ctest-vn4-26427547 in API_Server ====== 2025-08-15 17:28:26,289 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2025-08-15 17:28:26,293 - DEBUG - Requesting: http://10.0.0.50:8082/domain/4238f661-f832-4543-b519-0bccafd6fd9a 2025-08-15 17:28:26,302 - DEBUG - Requesting: http://10.0.0.50:8082/project/963a6fd8-c536-4b23-8f61-231ccc069391 2025-08-15 17:28:26,367 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/cd239b24-f616-454a-95b3-55b61bd46b8c 2025-08-15 17:28:26,375 - DEBUG - ==>Verifying data for policy with id: 0831d1df-dffe-4803-bb75-cf3dabe0aceb, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-05817886', 'ctest-policy1-53817779'] 2025-08-15 17:28:26,376 - INFO - VN ctest-vn4-26427547 Policy verification: verify_vn_policy_in_api_server, status: True 2025-08-15 17:28:26,376 - DEBUG - Verifying the vn in opserver 2025-08-15 17:28:26,376 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-05817886:ctest-vn4-26427547 virtual network link through opserver 10.0.0.50 2025-08-15 17:28:26,376 - DEBUG - Requesting: http://10.0.0.50:8081/analytics/uves/virtual-networks 2025-08-15 17:28:26,662 - DEBUG - Requesting: http://10.0.0.50:8081/analytics/uves/virtual-networks 2025-08-15 17:28:26,712 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-05817886:ctest-vn4-26427547', 'href': 'http://10.0.0.50:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-05817886:ctest-vn4-26427547?flat'} 2025-08-15 17:28:26,712 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-05817886:ctest-vn4-26427547 is found in opserver 2025-08-15 17:28:26,721 - DEBUG - Do not have enough data to verify VN in agent 2025-08-15 17:28:26,725 - DEBUG - VRF ids for VN ctest-vn4-26427547: {} 2025-08-15 17:28:26,725 - DEBUG - ====Verifying data for ctest-policy1-53817779 in API_Server ====== 2025-08-15 17:28:26,725 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2025-08-15 17:28:26,730 - DEBUG - Requesting: http://10.0.0.50:8082/domain/4238f661-f832-4543-b519-0bccafd6fd9a 2025-08-15 17:28:26,739 - DEBUG - Requesting: http://10.0.0.50:8082/project/963a6fd8-c536-4b23-8f61-231ccc069391 2025-08-15 17:28:26,806 - DEBUG - Requesting: http://10.0.0.50:8082/network-policy/0831d1df-dffe-4803-bb75-cf3dabe0aceb 2025-08-15 17:28:26,813 - INFO - Verified policy ctest-policy1-53817779 in API Server, Result: True 2025-08-15 17:28:26,813 - INFO - Done with setup and verification, moving onto test .. 2025-08-15 17:28:26,819 - INFO - Deleting VN ctest-vn4-26427547 2025-08-15 17:28:26,914 - DEBUG - Response for deleting network () 2025-08-15 17:28:26,914 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/e367d877-4cea-45c5-8595-5611c27a9f65 2025-08-15 17:28:26,918 - DEBUG - Response Code: 404 2025-08-15 17:28:26,918 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2025-08-15 17:28:26,922 - DEBUG - Requesting: http://10.0.0.50:8082/domain/4238f661-f832-4543-b519-0bccafd6fd9a 2025-08-15 17:28:26,973 - DEBUG - Requesting: http://10.0.0.50:8082/project/963a6fd8-c536-4b23-8f61-231ccc069391 2025-08-15 17:28:27,039 - INFO - Validated that VN ctest-vn4-26427547 is not found in API Server 2025-08-15 17:28:27,048 - DEBUG - VN ctest-vn4-26427547 is not present in Agent 10.0.0.50 2025-08-15 17:28:27,048 - INFO - Validated that VN ctest-vn4-26427547 is not in any agent 2025-08-15 17:28:27,060 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-26427547 info 2025-08-15 17:28:27,078 - INFO - Deleted policy ctest-policy1-53817779 2025-08-15 17:28:27,237 - DEBUG - policy ctest-policy1-53817779 is not found in API Server 2025-08-15 17:28:27,486 - DEBUG - No XMPP flaps were noticed during the test 2025-08-15 17:28:27,486 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04] 2025-08-15 17:28:27,486 - INFO - -------------------------------------------------------------------------------- 2025-08-15 17:28:27,774 - DEBUG - No XMPP flaps were noticed during the test 2025-08-15 17:28:27,774 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04] 2025-08-15 17:28:27,774 - INFO - -------------------------------------------------------------------------------- 2025-08-15 17:28:28,404 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-05817886, ID : 963a6fd8-c536-4b23-8f61-231ccc069391