2025-11-20 16:58:40,266 - INFO - Domain Default found not creating 2025-11-20 16:58:40,405 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-18089959 not found, creating it 2025-11-20 16:58:40,825 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-18089959, ID : 746d390d-c142-4067-bbcf-1004340876b9 2025-11-20 16:58:42,206 - INFO - ================================================================================ 2025-11-20 16:58:42,206 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-11-20 16:58:42,453 - DEBUG - Nothing to compare xmpp stats {'10.0.0.154': {'10.20.0.252': '0'}} with 2025-11-20 16:58:42,453 - INFO - Initial checks done. Running the testcase now 2025-11-20 16:58:42,453 - INFO - 2025-11-20 16:58:42,453 - INFO - ================================================================================ 2025-11-20 16:58:42,453 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-11-20 16:58:42,453 - 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-20 16:58:42,741 - DEBUG - Nothing to compare xmpp stats {'10.0.0.154': {'10.20.0.252': '0'}} with 2025-11-20 16:58:42,741 - INFO - Initial checks done. Running the testcase now 2025-11-20 16:58:42,741 - INFO - 2025-11-20 16:58:43,081 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-18089959:ctest-vn4-71674270, 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-18089959:ctest-vn4-71674270, 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-18089959:ctest-vn4-71674270, 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-18089959:ctest-vn4-71674270, 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-20 16:58:43,562 - DEBUG - Response for create_network : {'network': {'id': 'd82610fd-a8c4-4338-a86c-8842f6c994d4', 'name': 'ctest-vn4-71674270', 'tenant_id': '746d390dc1424067bbcf1004340876b9', 'project_id': '746d390dc1424067bbcf1004340876b9', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-18089959', 'ctest-vn4-71674270'], 'port_security_enabled': True, 'description': ''}} 2025-11-20 16:58:43,774 - DEBUG - Response for create_subnet : {'subnet': {'id': 'eb9081b4-e133-48b8-ba01-5e1cc02e17d4', 'name': '', 'tenant_id': '746d390dc1424067bbcf1004340876b9', 'network_id': 'd82610fd-a8c4-4338-a86c-8842f6c994d4', 'ip_version': 4, 'cidr': '18.165.220.192/26', 'allocation_pools': [{'start': '18.165.220.194', 'end': '18.165.220.254'}], 'gateway_ip': '18.165.220.193', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '18.165.220.194', 'tags': [], 'project_id': '746d390dc1424067bbcf1004340876b9'}} 2025-11-20 16:58:43,929 - DEBUG - Response for create_subnet : {'subnet': {'id': 'b44b9ec1-88f4-452f-ad5b-432d5c5e981c', 'name': '', 'tenant_id': '746d390dc1424067bbcf1004340876b9', 'network_id': 'd82610fd-a8c4-4338-a86c-8842f6c994d4', 'ip_version': 6, 'cidr': '33ad:560f:c2f2:fc5a:899b:573b::/96', 'allocation_pools': [{'start': '33ad:560f:c2f2:fc5a:899b:573b:0:2', 'end': '33ad:560f:c2f2:fc5a:899b:573b:ffff:fffe'}], 'gateway_ip': '33ad:560f:c2f2:fc5a:899b:573b:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '33ad:560f:c2f2:fc5a:899b:573b:0:2', 'tags': [], 'project_id': '746d390dc1424067bbcf1004340876b9'}} 2025-11-20 16:58:43,945 - INFO - Created VN ctest-vn4-71674270 2025-11-20 16:58:43,993 - DEBUG - VN ctest-vn4-71674270 UUID is d82610fd-a8c4-4338-a86c-8842f6c994d4 2025-11-20 16:58:44,171 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': 'd82610fd-a8c4-4338-a86c-8842f6c994d4', 'name': 'ctest-vn4-71674270', 'tenant_id': '746d390dc1424067bbcf1004340876b9', 'project_id': '746d390dc1424067bbcf1004340876b9', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['eb9081b4-e133-48b8-ba01-5e1cc02e17d4', 'b44b9ec1-88f4-452f-ad5b-432d5c5e981c'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-18089959', 'ctest-vn4-71674270'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-18089959', 'ctest-policy1-55605281']], 'subnet_ipam': [{'subnet_cidr': '18.165.220.192/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '33ad:560f:c2f2:fc5a:899b:573b::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2025-11-20 16:58:44,325 - DEBUG - Requesting: http://10.0.0.154:8082/domains 2025-11-20 16:58:44,614 - DEBUG - Requesting: http://10.0.0.154:8082/domains 2025-11-20 16:58:44,641 - DEBUG - Requesting: http://10.0.0.154:8082/domain/53488b3d-1c95-41aa-8d92-27cb3d77be14 2025-11-20 16:58:44,651 - DEBUG - Requesting: http://10.0.0.154:8082/project/746d390d-c142-4067-bbcf-1004340876b9 2025-11-20 16:58:44,716 - DEBUG - Requesting: http://10.0.0.154:8082/virtual-network/d82610fd-a8c4-4338-a86c-8842f6c994d4 2025-11-20 16:58:44,727 - DEBUG - Requesting: http://10.0.0.154:8082/virtual-network/d82610fd-a8c4-4338-a86c-8842f6c994d4 2025-11-20 16:58:44,735 - DEBUG - Requesting: http://10.0.0.154:8082/routing-instance/03e31f17-7028-4c14-ba9f-8d271d12d4df 2025-11-20 16:58:44,741 - DEBUG - Requesting: http://10.0.0.154:8082/routing-instance/03e31f17-7028-4c14-ba9f-8d271d12d4df 2025-11-20 16:58:44,746 - DEBUG - Requesting: http://10.0.0.154:8082/route-target/fd0f05ae-4be1-4118-9c47-f84d03772040 2025-11-20 16:58:44,751 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-11-20 16:58:44,751 - DEBUG - Requesting: http://10.0.0.154:8082/virtual-network/d82610fd-a8c4-4338-a86c-8842f6c994d4 2025-11-20 16:58:44,758 - DEBUG - Requesting: http://10.0.0.154:8082/routing-instance/03e31f17-7028-4c14-ba9f-8d271d12d4df 2025-11-20 16:58:44,769 - INFO - Verified VN network id 12 for VN d82610fd-a8c4-4338-a86c-8842f6c994d4 2025-11-20 16:58:44,769 - INFO - Verifications in API Server for VN ctest-vn4-71674270 passed 2025-11-20 16:58:44,769 - DEBUG - Requesting: http://10.0.0.154:8082/virtual-network/d82610fd-a8c4-4338-a86c-8842f6c994d4 2025-11-20 16:58:44,777 - DEBUG - Requesting: http://10.0.0.154:8082/routing-instance/03e31f17-7028-4c14-ba9f-8d271d12d4df 2025-11-20 16:58:44,782 - DEBUG - Requesting: http://10.0.0.154:8082/routing-instance/03e31f17-7028-4c14-ba9f-8d271d12d4df 2025-11-20 16:58:44,788 - DEBUG - Requesting: http://10.0.0.154:8082/route-target/fd0f05ae-4be1-4118-9c47-f84d03772040 2025-11-20 16:58:44,797 - DEBUG - Control-node 10.0.0.154 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-18089959:ctest-vn4-71674270', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-18089959', 'owner-access': '7', 'group': 'reader', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '15575155042951643960', 'uuid-lslong': '12136224917046269140'}, 'enable': 'true', 'created': '2025-11-20T16:58:43', 'last-modified': '2025-11-20T16:58:44', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.649275'} 2025-11-20 16:58:44,802 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-11-20 16:58:44,802 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-71674270 passed 2025-11-20 16:58:44,802 - DEBUG - ====Verifying policy data for ctest-vn4-71674270 in API_Server ====== 2025-11-20 16:58:44,803 - DEBUG - Requesting: http://10.0.0.154:8082/domains 2025-11-20 16:58:44,806 - DEBUG - Requesting: http://10.0.0.154:8082/domain/53488b3d-1c95-41aa-8d92-27cb3d77be14 2025-11-20 16:58:44,815 - DEBUG - Requesting: http://10.0.0.154:8082/project/746d390d-c142-4067-bbcf-1004340876b9 2025-11-20 16:58:44,881 - DEBUG - Requesting: http://10.0.0.154:8082/virtual-network/d82610fd-a8c4-4338-a86c-8842f6c994d4 2025-11-20 16:58:44,889 - DEBUG - ==>Verifying data for policy with id: 5f3aa579-1e61-45d5-b77f-1852ef463cd7, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-18089959', 'ctest-policy1-55605281'] 2025-11-20 16:58:44,889 - INFO - VN ctest-vn4-71674270 Policy verification: verify_vn_policy_in_api_server, status: True 2025-11-20 16:58:44,889 - DEBUG - Verifying the vn in opserver 2025-11-20 16:58:44,889 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-18089959:ctest-vn4-71674270 virtual network link through opserver 10.0.0.154 2025-11-20 16:58:44,889 - DEBUG - Requesting: http://10.0.0.154:8081/analytics/uves/virtual-networks 2025-11-20 16:58:45,178 - DEBUG - Requesting: http://10.0.0.154:8081/analytics/uves/virtual-networks 2025-11-20 16:58:45,233 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-18089959:ctest-vn4-71674270', 'href': 'http://10.0.0.154:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-18089959:ctest-vn4-71674270?flat'} 2025-11-20 16:58:45,233 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-18089959:ctest-vn4-71674270 is found in opserver 2025-11-20 16:58:45,242 - DEBUG - Do not have enough data to verify VN in agent 2025-11-20 16:58:45,246 - DEBUG - VRF ids for VN ctest-vn4-71674270: {} 2025-11-20 16:58:45,246 - DEBUG - ====Verifying data for ctest-policy1-55605281 in API_Server ====== 2025-11-20 16:58:45,247 - DEBUG - Requesting: http://10.0.0.154:8082/domains 2025-11-20 16:58:45,251 - DEBUG - Requesting: http://10.0.0.154:8082/domain/53488b3d-1c95-41aa-8d92-27cb3d77be14 2025-11-20 16:58:45,261 - DEBUG - Requesting: http://10.0.0.154:8082/project/746d390d-c142-4067-bbcf-1004340876b9 2025-11-20 16:58:45,329 - DEBUG - Requesting: http://10.0.0.154:8082/network-policy/5f3aa579-1e61-45d5-b77f-1852ef463cd7 2025-11-20 16:58:45,338 - INFO - Verified policy ctest-policy1-55605281 in API Server, Result: True 2025-11-20 16:58:45,338 - INFO - Done with setup and verification, moving onto test .. 2025-11-20 16:58:45,345 - INFO - Deleting VN ctest-vn4-71674270 2025-11-20 16:58:45,440 - DEBUG - Response for deleting network () 2025-11-20 16:58:45,440 - DEBUG - Requesting: http://10.0.0.154:8082/routing-instance/03e31f17-7028-4c14-ba9f-8d271d12d4df 2025-11-20 16:58:45,444 - DEBUG - Response Code: 404 2025-11-20 16:58:45,444 - DEBUG - Requesting: http://10.0.0.154:8082/domains 2025-11-20 16:58:45,449 - DEBUG - Requesting: http://10.0.0.154:8082/domain/53488b3d-1c95-41aa-8d92-27cb3d77be14 2025-11-20 16:58:45,502 - DEBUG - Requesting: http://10.0.0.154:8082/project/746d390d-c142-4067-bbcf-1004340876b9 2025-11-20 16:58:45,570 - INFO - Validated that VN ctest-vn4-71674270 is not found in API Server 2025-11-20 16:58:45,579 - DEBUG - VN ctest-vn4-71674270 is not present in Agent 10.0.0.154 2025-11-20 16:58:45,579 - INFO - Validated that VN ctest-vn4-71674270 is not in any agent 2025-11-20 16:58:45,592 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-71674270 info 2025-11-20 16:58:45,615 - INFO - Deleted policy ctest-policy1-55605281 2025-11-20 16:58:45,785 - DEBUG - policy ctest-policy1-55605281 is not found in API Server 2025-11-20 16:58:46,041 - DEBUG - No XMPP flaps were noticed during the test 2025-11-20 16:58:46,042 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04] 2025-11-20 16:58:46,042 - INFO - -------------------------------------------------------------------------------- 2025-11-20 16:58:46,329 - DEBUG - No XMPP flaps were noticed during the test 2025-11-20 16:58:46,329 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04] 2025-11-20 16:58:46,330 - INFO - -------------------------------------------------------------------------------- 2025-11-20 16:58:46,970 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-18089959, ID : 746d390d-c142-4067-bbcf-1004340876b9