2025-09-18 21:38:33,006 - INFO - Domain Default found not creating 2025-09-18 21:38:33,129 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-38244506 not found, creating it 2025-09-18 21:38:33,595 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-38244506, ID : 3ac8e974-6576-47ec-8091-168c2975b7d2 2025-09-18 21:38:34,957 - INFO - ================================================================================ 2025-09-18 21:38:34,957 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-09-18 21:38:35,214 - DEBUG - Nothing to compare xmpp stats {'10.0.0.49': {'10.20.0.17': '0'}} with 2025-09-18 21:38:35,214 - INFO - Initial checks done. Running the testcase now 2025-09-18 21:38:35,214 - INFO - 2025-09-18 21:38:35,214 - INFO - ================================================================================ 2025-09-18 21:38:35,214 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-09-18 21:38:35,214 - 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-18 21:38:35,502 - DEBUG - Nothing to compare xmpp stats {'10.0.0.49': {'10.20.0.17': '0'}} with 2025-09-18 21:38:35,502 - INFO - Initial checks done. Running the testcase now 2025-09-18 21:38:35,502 - INFO - 2025-09-18 21:38:35,850 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-38244506:ctest-vn4-50194143, 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-38244506:ctest-vn4-50194143, 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-38244506:ctest-vn4-50194143, 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-38244506:ctest-vn4-50194143, 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-18 21:38:36,344 - DEBUG - Response for create_network : {'network': {'id': 'f03e945e-cf38-4390-ac64-9f9d65adfe67', 'name': 'ctest-vn4-50194143', 'tenant_id': '3ac8e974657647ec8091168c2975b7d2', 'project_id': '3ac8e974657647ec8091168c2975b7d2', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-38244506', 'ctest-vn4-50194143'], 'port_security_enabled': True, 'description': ''}} 2025-09-18 21:38:36,555 - DEBUG - Response for create_subnet : {'subnet': {'id': '1a431348-f9ae-405b-bce8-974be51f25ae', 'name': '', 'tenant_id': '3ac8e974657647ec8091168c2975b7d2', 'network_id': 'f03e945e-cf38-4390-ac64-9f9d65adfe67', 'ip_version': 4, 'cidr': '45.113.145.0/26', 'allocation_pools': [{'start': '45.113.145.2', 'end': '45.113.145.62'}], 'gateway_ip': '45.113.145.1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '45.113.145.2', 'tags': [], 'project_id': '3ac8e974657647ec8091168c2975b7d2'}} 2025-09-18 21:38:36,748 - DEBUG - Response for create_subnet : {'subnet': {'id': 'ca4c5fca-859a-4d14-a768-7253414a9404', 'name': '', 'tenant_id': '3ac8e974657647ec8091168c2975b7d2', 'network_id': 'f03e945e-cf38-4390-ac64-9f9d65adfe67', 'ip_version': 6, 'cidr': '294c:fca5:83e4:5f80:c7e7:858f::/96', 'allocation_pools': [{'start': '294c:fca5:83e4:5f80:c7e7:858f:0:2', 'end': '294c:fca5:83e4:5f80:c7e7:858f:ffff:fffe'}], 'gateway_ip': '294c:fca5:83e4:5f80:c7e7:858f:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '294c:fca5:83e4:5f80:c7e7:858f:0:2', 'tags': [], 'project_id': '3ac8e974657647ec8091168c2975b7d2'}} 2025-09-18 21:38:36,766 - INFO - Created VN ctest-vn4-50194143 2025-09-18 21:38:36,818 - DEBUG - VN ctest-vn4-50194143 UUID is f03e945e-cf38-4390-ac64-9f9d65adfe67 2025-09-18 21:38:37,004 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': 'f03e945e-cf38-4390-ac64-9f9d65adfe67', 'name': 'ctest-vn4-50194143', 'tenant_id': '3ac8e974657647ec8091168c2975b7d2', 'project_id': '3ac8e974657647ec8091168c2975b7d2', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['1a431348-f9ae-405b-bce8-974be51f25ae', 'ca4c5fca-859a-4d14-a768-7253414a9404'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-38244506', 'ctest-vn4-50194143'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-38244506', 'ctest-policy1-47996435']], 'subnet_ipam': [{'subnet_cidr': '45.113.145.0/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '294c:fca5:83e4:5f80:c7e7:858f::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2025-09-18 21:38:37,174 - DEBUG - Requesting: http://10.0.0.49:8082/domains 2025-09-18 21:38:37,461 - DEBUG - Requesting: http://10.0.0.49:8082/domains 2025-09-18 21:38:37,486 - DEBUG - Requesting: http://10.0.0.49:8082/domain/8a5afa5b-e0f4-4905-99bd-d6ded1e686d2 2025-09-18 21:38:37,498 - DEBUG - Requesting: http://10.0.0.49:8082/project/3ac8e974-6576-47ec-8091-168c2975b7d2 2025-09-18 21:38:37,571 - DEBUG - Requesting: http://10.0.0.49:8082/virtual-network/f03e945e-cf38-4390-ac64-9f9d65adfe67 2025-09-18 21:38:37,582 - DEBUG - Requesting: http://10.0.0.49:8082/virtual-network/f03e945e-cf38-4390-ac64-9f9d65adfe67 2025-09-18 21:38:37,589 - DEBUG - Requesting: http://10.0.0.49:8082/routing-instance/dcd5a551-d04f-40d2-bcc4-5257064ee35b 2025-09-18 21:38:37,595 - DEBUG - Requesting: http://10.0.0.49:8082/routing-instance/dcd5a551-d04f-40d2-bcc4-5257064ee35b 2025-09-18 21:38:37,600 - DEBUG - Requesting: http://10.0.0.49:8082/route-target/a55411ee-e161-47ad-ab65-95d5b4820807 2025-09-18 21:38:37,604 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-09-18 21:38:37,604 - DEBUG - Requesting: http://10.0.0.49:8082/virtual-network/f03e945e-cf38-4390-ac64-9f9d65adfe67 2025-09-18 21:38:37,611 - DEBUG - Requesting: http://10.0.0.49:8082/routing-instance/dcd5a551-d04f-40d2-bcc4-5257064ee35b 2025-09-18 21:38:37,622 - INFO - Verified VN network id 12 for VN f03e945e-cf38-4390-ac64-9f9d65adfe67 2025-09-18 21:38:37,622 - INFO - Verifications in API Server for VN ctest-vn4-50194143 passed 2025-09-18 21:38:37,622 - DEBUG - Requesting: http://10.0.0.49:8082/virtual-network/f03e945e-cf38-4390-ac64-9f9d65adfe67 2025-09-18 21:38:37,629 - DEBUG - Requesting: http://10.0.0.49:8082/routing-instance/dcd5a551-d04f-40d2-bcc4-5257064ee35b 2025-09-18 21:38:37,634 - DEBUG - Requesting: http://10.0.0.49:8082/routing-instance/dcd5a551-d04f-40d2-bcc4-5257064ee35b 2025-09-18 21:38:37,639 - DEBUG - Requesting: http://10.0.0.49:8082/route-target/a55411ee-e161-47ad-ab65-95d5b4820807 2025-09-18 21:38:37,648 - DEBUG - Control-node 10.0.0.49 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-38244506:ctest-vn4-50194143', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-38244506', 'owner-access': '7', 'group': 'reader', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '17311437152583173008', 'uuid-lslong': '12422229170559254119'}, 'enable': 'true', 'created': '2025-09-18T21:38:36', 'last-modified': '2025-09-18T21:38:36', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.670642'} 2025-09-18 21:38:37,654 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-09-18 21:38:37,654 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-50194143 passed 2025-09-18 21:38:37,655 - DEBUG - ====Verifying policy data for ctest-vn4-50194143 in API_Server ====== 2025-09-18 21:38:37,655 - DEBUG - Requesting: http://10.0.0.49:8082/domains 2025-09-18 21:38:37,659 - DEBUG - Requesting: http://10.0.0.49:8082/domain/8a5afa5b-e0f4-4905-99bd-d6ded1e686d2 2025-09-18 21:38:37,668 - DEBUG - Requesting: http://10.0.0.49:8082/project/3ac8e974-6576-47ec-8091-168c2975b7d2 2025-09-18 21:38:37,740 - DEBUG - Requesting: http://10.0.0.49:8082/virtual-network/f03e945e-cf38-4390-ac64-9f9d65adfe67 2025-09-18 21:38:37,748 - DEBUG - ==>Verifying data for policy with id: b79aee03-d8bc-410a-933e-148404586392, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-38244506', 'ctest-policy1-47996435'] 2025-09-18 21:38:37,748 - INFO - VN ctest-vn4-50194143 Policy verification: verify_vn_policy_in_api_server, status: True 2025-09-18 21:38:37,748 - DEBUG - Verifying the vn in opserver 2025-09-18 21:38:37,748 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-38244506:ctest-vn4-50194143 virtual network link through opserver 10.0.0.49 2025-09-18 21:38:37,748 - DEBUG - Requesting: http://10.0.0.49:8081/analytics/uves/virtual-networks 2025-09-18 21:38:38,037 - DEBUG - Requesting: http://10.0.0.49:8081/analytics/uves/virtual-networks 2025-09-18 21:38:38,091 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-38244506:ctest-vn4-50194143', 'href': 'http://10.0.0.49:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-38244506:ctest-vn4-50194143?flat'} 2025-09-18 21:38:38,091 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-38244506:ctest-vn4-50194143 is found in opserver 2025-09-18 21:38:38,101 - DEBUG - Do not have enough data to verify VN in agent 2025-09-18 21:38:38,107 - DEBUG - VRF ids for VN ctest-vn4-50194143: {} 2025-09-18 21:38:38,107 - DEBUG - ====Verifying data for ctest-policy1-47996435 in API_Server ====== 2025-09-18 21:38:38,107 - DEBUG - Requesting: http://10.0.0.49:8082/domains 2025-09-18 21:38:38,112 - DEBUG - Requesting: http://10.0.0.49:8082/domain/8a5afa5b-e0f4-4905-99bd-d6ded1e686d2 2025-09-18 21:38:38,121 - DEBUG - Requesting: http://10.0.0.49:8082/project/3ac8e974-6576-47ec-8091-168c2975b7d2 2025-09-18 21:38:38,191 - DEBUG - Requesting: http://10.0.0.49:8082/network-policy/b79aee03-d8bc-410a-933e-148404586392 2025-09-18 21:38:38,199 - INFO - Verified policy ctest-policy1-47996435 in API Server, Result: True 2025-09-18 21:38:38,199 - INFO - Done with setup and verification, moving onto test .. 2025-09-18 21:38:38,206 - INFO - Deleting VN ctest-vn4-50194143 2025-09-18 21:38:38,312 - DEBUG - Response for deleting network () 2025-09-18 21:38:38,312 - DEBUG - Requesting: http://10.0.0.49:8082/routing-instance/dcd5a551-d04f-40d2-bcc4-5257064ee35b 2025-09-18 21:38:38,316 - DEBUG - Response Code: 404 2025-09-18 21:38:38,316 - DEBUG - Requesting: http://10.0.0.49:8082/domains 2025-09-18 21:38:38,320 - DEBUG - Requesting: http://10.0.0.49:8082/domain/8a5afa5b-e0f4-4905-99bd-d6ded1e686d2 2025-09-18 21:38:38,374 - DEBUG - Requesting: http://10.0.0.49:8082/project/3ac8e974-6576-47ec-8091-168c2975b7d2 2025-09-18 21:38:38,440 - INFO - Validated that VN ctest-vn4-50194143 is not found in API Server 2025-09-18 21:38:38,448 - DEBUG - VN ctest-vn4-50194143 is not present in Agent 10.0.0.49 2025-09-18 21:38:38,448 - INFO - Validated that VN ctest-vn4-50194143 is not in any agent 2025-09-18 21:38:38,459 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-50194143 info 2025-09-18 21:38:38,483 - INFO - Deleted policy ctest-policy1-47996435 2025-09-18 21:38:38,645 - DEBUG - policy ctest-policy1-47996435 is not found in API Server 2025-09-18 21:38:38,902 - DEBUG - No XMPP flaps were noticed during the test
2025-09-18 21:38:38,902 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:03]
2025-09-18 21:38:38,902 - INFO - -------------------------------------------------------------------------------- 2025-09-18 21:38:39,200 - DEBUG - No XMPP flaps were noticed during the test
2025-09-18 21:38:39,200 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:05]
2025-09-18 21:38:39,200 - INFO - -------------------------------------------------------------------------------- 2025-09-18 21:38:39,837 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-38244506, ID : 3ac8e974-6576-47ec-8091-168c2975b7d2