2025-10-17 14:51:46,586 - INFO - Domain Default found not creating 2025-10-17 14:51:46,780 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-19396779 not found, creating it 2025-10-17 14:51:47,297 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-19396779, ID : 7edb05f5-5119-4e8d-9360-e6200932362d 2025-10-17 14:51:48,882 - INFO - ================================================================================ 2025-10-17 14:51:48,882 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-10-17 14:51:49,156 - DEBUG - Nothing to compare xmpp stats {'10.0.0.27': {'10.20.0.17': '0'}} with 2025-10-17 14:51:49,156 - INFO - Initial checks done. Running the testcase now 2025-10-17 14:51:49,156 - INFO - 2025-10-17 14:51:49,156 - INFO - ================================================================================ 2025-10-17 14:51:49,156 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-10-17 14:51:49,156 - 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-17 14:51:49,458 - DEBUG - Nothing to compare xmpp stats {'10.0.0.27': {'10.20.0.17': '0'}} with 2025-10-17 14:51:49,458 - INFO - Initial checks done. Running the testcase now 2025-10-17 14:51:49,458 - INFO - 2025-10-17 14:51:49,897 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-19396779:ctest-vn4-60838488, 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-19396779:ctest-vn4-60838488, 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-19396779:ctest-vn4-60838488, 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-19396779:ctest-vn4-60838488, 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-17 14:51:50,487 - DEBUG - Response for create_network : {'network': {'id': '9a60e296-b54a-4acc-ad83-aab2d95a61b8', 'name': 'ctest-vn4-60838488', 'tenant_id': '7edb05f551194e8d9360e6200932362d', 'project_id': '7edb05f551194e8d9360e6200932362d', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-19396779', 'ctest-vn4-60838488'], 'port_security_enabled': True, 'description': ''}} 2025-10-17 14:51:50,716 - DEBUG - Response for create_subnet : {'subnet': {'id': '9e585cfd-5904-4fb3-9088-3d009eb82c78', 'name': '', 'tenant_id': '7edb05f551194e8d9360e6200932362d', 'network_id': '9a60e296-b54a-4acc-ad83-aab2d95a61b8', 'ip_version': 4, 'cidr': '31.7.164.0/26', 'allocation_pools': [{'start': '31.7.164.2', 'end': '31.7.164.62'}], 'gateway_ip': '31.7.164.1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '31.7.164.2', 'tags': [], 'project_id': '7edb05f551194e8d9360e6200932362d'}} 2025-10-17 14:51:50,950 - DEBUG - Response for create_subnet : {'subnet': {'id': '8bfe9cef-861b-4658-af65-8728dfd87cdd', 'name': '', 'tenant_id': '7edb05f551194e8d9360e6200932362d', 'network_id': '9a60e296-b54a-4acc-ad83-aab2d95a61b8', 'ip_version': 6, 'cidr': '320b:fa3f:2876:df4a:c456:c916::/96', 'allocation_pools': [{'start': '320b:fa3f:2876:df4a:c456:c916:0:2', 'end': '320b:fa3f:2876:df4a:c456:c916:ffff:fffe'}], 'gateway_ip': '320b:fa3f:2876:df4a:c456:c916:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '320b:fa3f:2876:df4a:c456:c916:0:2', 'tags': [], 'project_id': '7edb05f551194e8d9360e6200932362d'}} 2025-10-17 14:51:50,973 - INFO - Created VN ctest-vn4-60838488 2025-10-17 14:51:51,029 - DEBUG - VN ctest-vn4-60838488 UUID is 9a60e296-b54a-4acc-ad83-aab2d95a61b8 2025-10-17 14:51:51,274 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': '9a60e296-b54a-4acc-ad83-aab2d95a61b8', 'name': 'ctest-vn4-60838488', 'tenant_id': '7edb05f551194e8d9360e6200932362d', 'project_id': '7edb05f551194e8d9360e6200932362d', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['9e585cfd-5904-4fb3-9088-3d009eb82c78', '8bfe9cef-861b-4658-af65-8728dfd87cdd'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-19396779', 'ctest-vn4-60838488'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-19396779', 'ctest-policy1-51475214']], 'subnet_ipam': [{'subnet_cidr': '31.7.164.0/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '320b:fa3f:2876:df4a:c456:c916::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2025-10-17 14:51:51,441 - DEBUG - Requesting: http://10.0.0.27:8082/domains 2025-10-17 14:51:51,743 - DEBUG - Requesting: http://10.0.0.27:8082/domains 2025-10-17 14:51:51,774 - DEBUG - Requesting: http://10.0.0.27:8082/domain/da97a087-a5fb-4a5d-9986-422ab5ef3221 2025-10-17 14:51:51,788 - DEBUG - Requesting: http://10.0.0.27:8082/project/7edb05f5-5119-4e8d-9360-e6200932362d 2025-10-17 14:51:51,862 - DEBUG - Requesting: http://10.0.0.27:8082/virtual-network/9a60e296-b54a-4acc-ad83-aab2d95a61b8 2025-10-17 14:51:51,875 - DEBUG - Requesting: http://10.0.0.27:8082/virtual-network/9a60e296-b54a-4acc-ad83-aab2d95a61b8 2025-10-17 14:51:51,887 - DEBUG - Requesting: http://10.0.0.27:8082/routing-instance/fec51129-1d12-45b7-938c-47071e9618bf 2025-10-17 14:51:51,895 - DEBUG - Requesting: http://10.0.0.27:8082/routing-instance/fec51129-1d12-45b7-938c-47071e9618bf 2025-10-17 14:51:51,903 - DEBUG - Requesting: http://10.0.0.27:8082/route-target/d8a0c504-18ef-4a0a-9ecd-03d187766190 2025-10-17 14:51:51,910 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-10-17 14:51:51,910 - DEBUG - Requesting: http://10.0.0.27:8082/virtual-network/9a60e296-b54a-4acc-ad83-aab2d95a61b8 2025-10-17 14:51:51,920 - DEBUG - Requesting: http://10.0.0.27:8082/routing-instance/fec51129-1d12-45b7-938c-47071e9618bf 2025-10-17 14:51:51,937 - INFO - Verified VN network id 11 for VN 9a60e296-b54a-4acc-ad83-aab2d95a61b8 2025-10-17 14:51:51,938 - INFO - Verifications in API Server for VN ctest-vn4-60838488 passed 2025-10-17 14:51:51,938 - DEBUG - Requesting: http://10.0.0.27:8082/virtual-network/9a60e296-b54a-4acc-ad83-aab2d95a61b8 2025-10-17 14:51:51,948 - DEBUG - Requesting: http://10.0.0.27:8082/routing-instance/fec51129-1d12-45b7-938c-47071e9618bf 2025-10-17 14:51:51,956 - DEBUG - Requesting: http://10.0.0.27:8082/routing-instance/fec51129-1d12-45b7-938c-47071e9618bf 2025-10-17 14:51:51,964 - DEBUG - Requesting: http://10.0.0.27:8082/route-target/d8a0c504-18ef-4a0a-9ecd-03d187766190 2025-10-17 14:51:51,979 - DEBUG - Control-node 10.0.0.27 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-19396779:ctest-vn4-60838488', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-19396779', 'owner-access': '7', 'group': 'member', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '11124140216519641804', 'uuid-lslong': '12503024675638108600'}, 'enable': 'true', 'created': '2025-10-17T14:51:50', 'last-modified': '2025-10-17T14:51:51', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.738109'} 2025-10-17 14:51:51,986 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-10-17 14:51:51,986 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-60838488 passed 2025-10-17 14:51:51,986 - DEBUG - ====Verifying policy data for ctest-vn4-60838488 in API_Server ====== 2025-10-17 14:51:51,986 - DEBUG - Requesting: http://10.0.0.27:8082/domains 2025-10-17 14:51:51,992 - DEBUG - Requesting: http://10.0.0.27:8082/domain/da97a087-a5fb-4a5d-9986-422ab5ef3221 2025-10-17 14:51:52,007 - DEBUG - Requesting: http://10.0.0.27:8082/project/7edb05f5-5119-4e8d-9360-e6200932362d 2025-10-17 14:51:52,089 - DEBUG - Requesting: http://10.0.0.27:8082/virtual-network/9a60e296-b54a-4acc-ad83-aab2d95a61b8 2025-10-17 14:51:52,100 - DEBUG - ==>Verifying data for policy with id: 6177e795-4d2a-47aa-9edb-030a9c8b4cac, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-19396779', 'ctest-policy1-51475214'] 2025-10-17 14:51:52,100 - INFO - VN ctest-vn4-60838488 Policy verification: verify_vn_policy_in_api_server, status: True 2025-10-17 14:51:52,100 - DEBUG - Verifying the vn in opserver 2025-10-17 14:51:52,100 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-19396779:ctest-vn4-60838488 virtual network link through opserver 10.0.0.27 2025-10-17 14:51:52,101 - DEBUG - Requesting: http://10.0.0.27:8081/analytics/uves/virtual-networks 2025-10-17 14:51:52,400 - DEBUG - Requesting: http://10.0.0.27:8081/analytics/uves/virtual-networks 2025-10-17 14:51:52,476 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-19396779:ctest-vn4-60838488', 'href': 'http://10.0.0.27:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-19396779:ctest-vn4-60838488?flat'} 2025-10-17 14:51:52,476 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-19396779:ctest-vn4-60838488 is found in opserver 2025-10-17 14:51:52,488 - DEBUG - Do not have enough data to verify VN in agent 2025-10-17 14:51:52,493 - DEBUG - VRF ids for VN ctest-vn4-60838488: {} 2025-10-17 14:51:52,493 - DEBUG - ====Verifying data for ctest-policy1-51475214 in API_Server ====== 2025-10-17 14:51:52,493 - DEBUG - Requesting: http://10.0.0.27:8082/domains 2025-10-17 14:51:52,500 - DEBUG - Requesting: http://10.0.0.27:8082/domain/da97a087-a5fb-4a5d-9986-422ab5ef3221 2025-10-17 14:51:52,512 - DEBUG - Requesting: http://10.0.0.27:8082/project/7edb05f5-5119-4e8d-9360-e6200932362d 2025-10-17 14:51:52,589 - DEBUG - Requesting: http://10.0.0.27:8082/network-policy/6177e795-4d2a-47aa-9edb-030a9c8b4cac 2025-10-17 14:51:52,601 - INFO - Verified policy ctest-policy1-51475214 in API Server, Result: True 2025-10-17 14:51:52,601 - INFO - Done with setup and verification, moving onto test .. 2025-10-17 14:51:52,612 - INFO - Deleting VN ctest-vn4-60838488 2025-10-17 14:51:52,767 - DEBUG - Response for deleting network () 2025-10-17 14:51:52,767 - DEBUG - Requesting: http://10.0.0.27:8082/routing-instance/fec51129-1d12-45b7-938c-47071e9618bf 2025-10-17 14:51:52,774 - DEBUG - Response Code: 404 2025-10-17 14:51:52,774 - DEBUG - Requesting: http://10.0.0.27:8082/domains 2025-10-17 14:51:52,785 - DEBUG - Requesting: http://10.0.0.27:8082/domain/da97a087-a5fb-4a5d-9986-422ab5ef3221 2025-10-17 14:51:52,845 - DEBUG - Requesting: http://10.0.0.27:8082/project/7edb05f5-5119-4e8d-9360-e6200932362d 2025-10-17 14:51:52,921 - INFO - Validated that VN ctest-vn4-60838488 is not found in API Server 2025-10-17 14:51:52,931 - DEBUG - VN ctest-vn4-60838488 is not present in Agent 10.0.0.27 2025-10-17 14:51:52,931 - INFO - Validated that VN ctest-vn4-60838488 is not in any agent 2025-10-17 14:51:52,947 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-60838488 info 2025-10-17 14:51:52,979 - INFO - Deleted policy ctest-policy1-51475214 2025-10-17 14:51:53,158 - DEBUG - policy ctest-policy1-51475214 is not found in API Server 2025-10-17 14:51:53,424 - DEBUG - No XMPP flaps were noticed during the test 2025-10-17 14:51:53,424 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04] 2025-10-17 14:51:53,424 - INFO - -------------------------------------------------------------------------------- 2025-10-17 14:51:53,723 - DEBUG - No XMPP flaps were noticed during the test 2025-10-17 14:51:53,723 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:05] 2025-10-17 14:51:53,723 - INFO - -------------------------------------------------------------------------------- 2025-10-17 14:51:54,425 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-19396779, ID : 7edb05f5-5119-4e8d-9360-e6200932362d