2025-09-17 14:22:12,206 - INFO - Domain Default found not creating 2025-09-17 14:22:12,397 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-71528770 not found, creating it 2025-09-17 14:22:12,999 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-71528770, ID : 83f2fae2-619d-4d61-b49c-0b3edd269547 2025-09-17 14:22:14,458 - INFO - ================================================================================ 2025-09-17 14:22:14,458 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-09-17 14:22:14,731 - DEBUG - Nothing to compare xmpp stats {'10.0.0.254': {'10.20.0.17': '0'}} with 2025-09-17 14:22:14,731 - INFO - Initial checks done. Running the testcase now 2025-09-17 14:22:14,731 - INFO - 2025-09-17 14:22:14,731 - INFO - ================================================================================ 2025-09-17 14:22:14,731 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-09-17 14:22:14,731 - 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-17 14:22:15,025 - DEBUG - Nothing to compare xmpp stats {'10.0.0.254': {'10.20.0.17': '0'}} with 2025-09-17 14:22:15,025 - INFO - Initial checks done. Running the testcase now 2025-09-17 14:22:15,025 - INFO - 2025-09-17 14:22:15,388 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-71528770:ctest-vn4-69111132, 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-71528770:ctest-vn4-69111132, 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-71528770:ctest-vn4-69111132, 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-71528770:ctest-vn4-69111132, 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-17 14:22:15,917 - DEBUG - Response for create_network : {'network': {'id': '0e71a1b7-dd97-4a6a-a0a7-89f6d37454bf', 'name': 'ctest-vn4-69111132', 'tenant_id': '83f2fae2619d4d61b49c0b3edd269547', 'project_id': '83f2fae2619d4d61b49c0b3edd269547', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-71528770', 'ctest-vn4-69111132'], 'port_security_enabled': True, 'description': ''}} 2025-09-17 14:22:16,089 - DEBUG - Response for create_subnet : {'subnet': {'id': '000c960b-fa91-4a09-998f-f6ba09f77110', 'name': '', 'tenant_id': '83f2fae2619d4d61b49c0b3edd269547', 'network_id': '0e71a1b7-dd97-4a6a-a0a7-89f6d37454bf', 'ip_version': 4, 'cidr': '129.155.15.192/26', 'allocation_pools': [{'start': '129.155.15.194', 'end': '129.155.15.254'}], 'gateway_ip': '129.155.15.193', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '129.155.15.194', 'tags': [], 'project_id': '83f2fae2619d4d61b49c0b3edd269547'}} 2025-09-17 14:22:16,332 - DEBUG - Response for create_subnet : {'subnet': {'id': '5c1d5bb3-1961-4882-84f7-ebc988281e55', 'name': '', 'tenant_id': '83f2fae2619d4d61b49c0b3edd269547', 'network_id': '0e71a1b7-dd97-4a6a-a0a7-89f6d37454bf', 'ip_version': 6, 'cidr': '2fca:11d5:8cef:1cb9:4aa:4a3e::/96', 'allocation_pools': [{'start': '2fca:11d5:8cef:1cb9:4aa:4a3e:0:2', 'end': '2fca:11d5:8cef:1cb9:4aa:4a3e:ffff:fffe'}], 'gateway_ip': '2fca:11d5:8cef:1cb9:4aa:4a3e:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '2fca:11d5:8cef:1cb9:4aa:4a3e:0:2', 'tags': [], 'project_id': '83f2fae2619d4d61b49c0b3edd269547'}} 2025-09-17 14:22:16,352 - INFO - Created VN ctest-vn4-69111132 2025-09-17 14:22:16,404 - DEBUG - VN ctest-vn4-69111132 UUID is 0e71a1b7-dd97-4a6a-a0a7-89f6d37454bf 2025-09-17 14:22:16,611 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': '0e71a1b7-dd97-4a6a-a0a7-89f6d37454bf', 'name': 'ctest-vn4-69111132', 'tenant_id': '83f2fae2619d4d61b49c0b3edd269547', 'project_id': '83f2fae2619d4d61b49c0b3edd269547', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['000c960b-fa91-4a09-998f-f6ba09f77110', '5c1d5bb3-1961-4882-84f7-ebc988281e55'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-71528770', 'ctest-vn4-69111132'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-71528770', 'ctest-policy1-06657373']], 'subnet_ipam': [{'subnet_cidr': '129.155.15.192/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '2fca:11d5:8cef:1cb9:4aa:4a3e::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2025-09-17 14:22:16,772 - DEBUG - Requesting: http://10.0.0.254:8082/domains 2025-09-17 14:22:17,071 - DEBUG - Requesting: http://10.0.0.254:8082/domains 2025-09-17 14:22:17,103 - DEBUG - Requesting: http://10.0.0.254:8082/domain/527a8172-c3f0-4440-8c4b-e91c2764378b 2025-09-17 14:22:17,116 - DEBUG - Requesting: http://10.0.0.254:8082/project/83f2fae2-619d-4d61-b49c-0b3edd269547 2025-09-17 14:22:17,202 - DEBUG - Requesting: http://10.0.0.254:8082/virtual-network/0e71a1b7-dd97-4a6a-a0a7-89f6d37454bf 2025-09-17 14:22:17,215 - DEBUG - Requesting: http://10.0.0.254:8082/virtual-network/0e71a1b7-dd97-4a6a-a0a7-89f6d37454bf 2025-09-17 14:22:17,224 - DEBUG - Requesting: http://10.0.0.254:8082/routing-instance/8479df07-8ba8-4d32-a658-e65211decbf7 2025-09-17 14:22:17,231 - DEBUG - Requesting: http://10.0.0.254:8082/routing-instance/8479df07-8ba8-4d32-a658-e65211decbf7 2025-09-17 14:22:17,241 - DEBUG - Requesting: http://10.0.0.254:8082/route-target/2e0fd269-aa30-48c9-929f-ef5cbad30187 2025-09-17 14:22:17,249 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-09-17 14:22:17,249 - DEBUG - Requesting: http://10.0.0.254:8082/virtual-network/0e71a1b7-dd97-4a6a-a0a7-89f6d37454bf 2025-09-17 14:22:17,262 - DEBUG - Requesting: http://10.0.0.254:8082/routing-instance/8479df07-8ba8-4d32-a658-e65211decbf7 2025-09-17 14:22:17,277 - INFO - Verified VN network id 11 for VN 0e71a1b7-dd97-4a6a-a0a7-89f6d37454bf 2025-09-17 14:22:17,277 - INFO - Verifications in API Server for VN ctest-vn4-69111132 passed 2025-09-17 14:22:17,277 - DEBUG - Requesting: http://10.0.0.254:8082/virtual-network/0e71a1b7-dd97-4a6a-a0a7-89f6d37454bf 2025-09-17 14:22:17,286 - DEBUG - Requesting: http://10.0.0.254:8082/routing-instance/8479df07-8ba8-4d32-a658-e65211decbf7 2025-09-17 14:22:17,295 - DEBUG - Requesting: http://10.0.0.254:8082/routing-instance/8479df07-8ba8-4d32-a658-e65211decbf7 2025-09-17 14:22:17,301 - DEBUG - Requesting: http://10.0.0.254:8082/route-target/2e0fd269-aa30-48c9-929f-ef5cbad30187 2025-09-17 14:22:17,312 - DEBUG - Control-node 10.0.0.254 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-71528770:ctest-vn4-69111132', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-71528770', 'owner-access': '7', 'group': 'reader', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '1040790799968062058', 'uuid-lslong': '11576373060381725887'}, 'enable': 'true', 'created': '2025-09-17T14:22:15', 'last-modified': '2025-09-17T14:22:16', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.731247'} 2025-09-17 14:22:17,319 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-09-17 14:22:17,319 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-69111132 passed 2025-09-17 14:22:17,320 - DEBUG - ====Verifying policy data for ctest-vn4-69111132 in API_Server ====== 2025-09-17 14:22:17,320 - DEBUG - Requesting: http://10.0.0.254:8082/domains 2025-09-17 14:22:17,326 - DEBUG - Requesting: http://10.0.0.254:8082/domain/527a8172-c3f0-4440-8c4b-e91c2764378b 2025-09-17 14:22:17,338 - DEBUG - Requesting: http://10.0.0.254:8082/project/83f2fae2-619d-4d61-b49c-0b3edd269547 2025-09-17 14:22:17,414 - DEBUG - Requesting: http://10.0.0.254:8082/virtual-network/0e71a1b7-dd97-4a6a-a0a7-89f6d37454bf 2025-09-17 14:22:17,424 - DEBUG - ==>Verifying data for policy with id: 3e24aa40-a3b5-4a7f-a7ba-2abe1020b577, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-71528770', 'ctest-policy1-06657373'] 2025-09-17 14:22:17,424 - INFO - VN ctest-vn4-69111132 Policy verification: verify_vn_policy_in_api_server, status: True 2025-09-17 14:22:17,424 - DEBUG - Verifying the vn in opserver 2025-09-17 14:22:17,424 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-71528770:ctest-vn4-69111132 virtual network link through opserver 10.0.0.254 2025-09-17 14:22:17,424 - DEBUG - Requesting: http://10.0.0.254:8081/analytics/uves/virtual-networks 2025-09-17 14:22:17,726 - DEBUG - Requesting: http://10.0.0.254:8081/analytics/uves/virtual-networks 2025-09-17 14:22:18,079 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-71528770:ctest-vn4-69111132', 'href': 'http://10.0.0.254:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-71528770:ctest-vn4-69111132?flat'} 2025-09-17 14:22:18,079 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-71528770:ctest-vn4-69111132 is found in opserver 2025-09-17 14:22:18,087 - DEBUG - Do not have enough data to verify VN in agent 2025-09-17 14:22:18,092 - DEBUG - VRF ids for VN ctest-vn4-69111132: {} 2025-09-17 14:22:18,092 - DEBUG - ====Verifying data for ctest-policy1-06657373 in API_Server ====== 2025-09-17 14:22:18,092 - DEBUG - Requesting: http://10.0.0.254:8082/domains 2025-09-17 14:22:18,098 - DEBUG - Requesting: http://10.0.0.254:8082/domain/527a8172-c3f0-4440-8c4b-e91c2764378b 2025-09-17 14:22:18,108 - DEBUG - Requesting: http://10.0.0.254:8082/project/83f2fae2-619d-4d61-b49c-0b3edd269547 2025-09-17 14:22:18,180 - DEBUG - Requesting: http://10.0.0.254:8082/network-policy/3e24aa40-a3b5-4a7f-a7ba-2abe1020b577 2025-09-17 14:22:18,189 - INFO - Verified policy ctest-policy1-06657373 in API Server, Result: True 2025-09-17 14:22:18,189 - INFO - Done with setup and verification, moving onto test .. 2025-09-17 14:22:18,196 - INFO - Deleting VN ctest-vn4-69111132 2025-09-17 14:22:18,333 - DEBUG - Response for deleting network () 2025-09-17 14:22:18,333 - DEBUG - Requesting: http://10.0.0.254:8082/routing-instance/8479df07-8ba8-4d32-a658-e65211decbf7 2025-09-17 14:22:18,338 - DEBUG - Response Code: 404 2025-09-17 14:22:18,338 - DEBUG - Requesting: http://10.0.0.254:8082/domains 2025-09-17 14:22:18,344 - DEBUG - Requesting: http://10.0.0.254:8082/domain/527a8172-c3f0-4440-8c4b-e91c2764378b 2025-09-17 14:22:18,402 - DEBUG - Requesting: http://10.0.0.254:8082/project/83f2fae2-619d-4d61-b49c-0b3edd269547 2025-09-17 14:22:18,476 - INFO - Validated that VN ctest-vn4-69111132 is not found in API Server 2025-09-17 14:22:18,487 - DEBUG - VN ctest-vn4-69111132 is not present in Agent 10.0.0.254 2025-09-17 14:22:18,487 - INFO - Validated that VN ctest-vn4-69111132 is not in any agent 2025-09-17 14:22:18,502 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-69111132 info 2025-09-17 14:22:18,526 - INFO - Deleted policy ctest-policy1-06657373 2025-09-17 14:22:18,692 - DEBUG - policy ctest-policy1-06657373 is not found in API Server 2025-09-17 14:22:18,950 - DEBUG - No XMPP flaps were noticed during the test 2025-09-17 14:22:18,950 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04] 2025-09-17 14:22:18,950 - INFO - -------------------------------------------------------------------------------- 2025-09-17 14:22:19,245 - DEBUG - No XMPP flaps were noticed during the test 2025-09-17 14:22:19,245 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:05] 2025-09-17 14:22:19,245 - INFO - -------------------------------------------------------------------------------- 2025-09-17 14:22:19,961 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-71528770, ID : 83f2fae2-619d-4d61-b49c-0b3edd269547