2025-09-24 21:54:49,319 - INFO - Domain Default found not creating 2025-09-24 21:54:49,491 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-12309427 not found, creating it 2025-09-24 21:54:49,969 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-12309427, ID : df3f0321-99b9-47e1-9b47-1d2475ed5370 2025-09-24 21:54:51,466 - INFO - ================================================================================ 2025-09-24 21:54:51,466 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-09-24 21:54:51,739 - DEBUG - Nothing to compare xmpp stats {'10.0.0.57': {'10.20.0.17': '0'}} with 2025-09-24 21:54:51,739 - INFO - Initial checks done. Running the testcase now 2025-09-24 21:54:51,739 - INFO - 2025-09-24 21:54:51,739 - INFO - ================================================================================ 2025-09-24 21:54:51,739 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-09-24 21:54:51,739 - 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-24 21:54:52,041 - DEBUG - Nothing to compare xmpp stats {'10.0.0.57': {'10.20.0.17': '0'}} with 2025-09-24 21:54:52,041 - INFO - Initial checks done. Running the testcase now 2025-09-24 21:54:52,041 - INFO - 2025-09-24 21:54:52,449 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-12309427:ctest-vn4-98577217, 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-12309427:ctest-vn4-98577217, 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-12309427:ctest-vn4-98577217, 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-12309427:ctest-vn4-98577217, 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-24 21:54:53,028 - DEBUG - Response for create_network : {'network': {'id': '325da3c2-ae65-4c88-8cd2-e7c49c9429d2', 'name': 'ctest-vn4-98577217', 'tenant_id': 'df3f032199b947e19b471d2475ed5370', 'project_id': 'df3f032199b947e19b471d2475ed5370', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-12309427', 'ctest-vn4-98577217'], 'port_security_enabled': True, 'description': ''}} 2025-09-24 21:54:53,202 - DEBUG - Response for create_subnet : {'subnet': {'id': '9b8c5bde-2f7d-45d9-98f0-ac0bfb808ce9', 'name': '', 'tenant_id': 'df3f032199b947e19b471d2475ed5370', 'network_id': '325da3c2-ae65-4c88-8cd2-e7c49c9429d2', 'ip_version': 4, 'cidr': '181.33.130.64/26', 'allocation_pools': [{'start': '181.33.130.66', 'end': '181.33.130.126'}], 'gateway_ip': '181.33.130.65', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '181.33.130.66', 'tags': [], 'project_id': 'df3f032199b947e19b471d2475ed5370'}} 2025-09-24 21:54:53,422 - DEBUG - Response for create_subnet : {'subnet': {'id': 'f86940ad-16bd-41b7-9153-4cbd8fd3d86b', 'name': '', 'tenant_id': 'df3f032199b947e19b471d2475ed5370', 'network_id': '325da3c2-ae65-4c88-8cd2-e7c49c9429d2', 'ip_version': 6, 'cidr': '38e4:1b06:230c:bb65:ce0b:5920::/96', 'allocation_pools': [{'start': '38e4:1b06:230c:bb65:ce0b:5920:0:2', 'end': '38e4:1b06:230c:bb65:ce0b:5920:ffff:fffe'}], 'gateway_ip': '38e4:1b06:230c:bb65:ce0b:5920:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '38e4:1b06:230c:bb65:ce0b:5920:0:2', 'tags': [], 'project_id': 'df3f032199b947e19b471d2475ed5370'}} 2025-09-24 21:54:53,449 - INFO - Created VN ctest-vn4-98577217 2025-09-24 21:54:53,510 - DEBUG - VN ctest-vn4-98577217 UUID is 325da3c2-ae65-4c88-8cd2-e7c49c9429d2 2025-09-24 21:54:53,732 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': '325da3c2-ae65-4c88-8cd2-e7c49c9429d2', 'name': 'ctest-vn4-98577217', 'tenant_id': 'df3f032199b947e19b471d2475ed5370', 'project_id': 'df3f032199b947e19b471d2475ed5370', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['9b8c5bde-2f7d-45d9-98f0-ac0bfb808ce9', 'f86940ad-16bd-41b7-9153-4cbd8fd3d86b'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-12309427', 'ctest-vn4-98577217'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-12309427', 'ctest-policy1-59185329']], 'subnet_ipam': [{'subnet_cidr': '181.33.130.64/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '38e4:1b06:230c:bb65:ce0b:5920::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2025-09-24 21:54:53,902 - DEBUG - Requesting: http://10.0.0.57:8082/domains 2025-09-24 21:54:54,200 - DEBUG - Requesting: http://10.0.0.57:8082/domains 2025-09-24 21:54:54,229 - DEBUG - Requesting: http://10.0.0.57:8082/domain/3059085e-2a69-4d13-9a6b-ece82704879e 2025-09-24 21:54:54,241 - DEBUG - Requesting: http://10.0.0.57:8082/project/df3f0321-99b9-47e1-9b47-1d2475ed5370 2025-09-24 21:54:54,330 - DEBUG - Requesting: http://10.0.0.57:8082/virtual-network/325da3c2-ae65-4c88-8cd2-e7c49c9429d2 2025-09-24 21:54:54,350 - DEBUG - Requesting: http://10.0.0.57:8082/virtual-network/325da3c2-ae65-4c88-8cd2-e7c49c9429d2 2025-09-24 21:54:54,365 - DEBUG - Requesting: http://10.0.0.57:8082/routing-instance/5936e577-0e59-4a9f-8cec-ea8a1608639f 2025-09-24 21:54:54,382 - DEBUG - Requesting: http://10.0.0.57:8082/routing-instance/5936e577-0e59-4a9f-8cec-ea8a1608639f 2025-09-24 21:54:54,391 - DEBUG - Requesting: http://10.0.0.57:8082/route-target/7d3a7f41-d64e-4b19-8d29-4a841ecb8b4d 2025-09-24 21:54:54,398 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-09-24 21:54:54,398 - DEBUG - Requesting: http://10.0.0.57:8082/virtual-network/325da3c2-ae65-4c88-8cd2-e7c49c9429d2 2025-09-24 21:54:54,409 - DEBUG - Requesting: http://10.0.0.57:8082/routing-instance/5936e577-0e59-4a9f-8cec-ea8a1608639f 2025-09-24 21:54:54,426 - INFO - Verified VN network id 11 for VN 325da3c2-ae65-4c88-8cd2-e7c49c9429d2 2025-09-24 21:54:54,427 - INFO - Verifications in API Server for VN ctest-vn4-98577217 passed 2025-09-24 21:54:54,427 - DEBUG - Requesting: http://10.0.0.57:8082/virtual-network/325da3c2-ae65-4c88-8cd2-e7c49c9429d2 2025-09-24 21:54:54,438 - DEBUG - Requesting: http://10.0.0.57:8082/routing-instance/5936e577-0e59-4a9f-8cec-ea8a1608639f 2025-09-24 21:54:54,447 - DEBUG - Requesting: http://10.0.0.57:8082/routing-instance/5936e577-0e59-4a9f-8cec-ea8a1608639f 2025-09-24 21:54:54,457 - DEBUG - Requesting: http://10.0.0.57:8082/route-target/7d3a7f41-d64e-4b19-8d29-4a841ecb8b4d 2025-09-24 21:54:54,470 - DEBUG - Control-node 10.0.0.57 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-12309427:ctest-vn4-98577217', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-12309427', 'owner-access': '7', 'group': 'reader', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '3629236931275345032', 'uuid-lslong': '10147427742045710802'}, 'enable': 'true', 'created': '2025-09-24T21:54:52', 'last-modified': '2025-09-24T21:54:53', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.762465'} 2025-09-24 21:54:54,477 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-09-24 21:54:54,477 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-98577217 passed 2025-09-24 21:54:54,477 - DEBUG - ====Verifying policy data for ctest-vn4-98577217 in API_Server ====== 2025-09-24 21:54:54,477 - DEBUG - Requesting: http://10.0.0.57:8082/domains 2025-09-24 21:54:54,483 - DEBUG - Requesting: http://10.0.0.57:8082/domain/3059085e-2a69-4d13-9a6b-ece82704879e 2025-09-24 21:54:54,495 - DEBUG - Requesting: http://10.0.0.57:8082/project/df3f0321-99b9-47e1-9b47-1d2475ed5370 2025-09-24 21:54:54,572 - DEBUG - Requesting: http://10.0.0.57:8082/virtual-network/325da3c2-ae65-4c88-8cd2-e7c49c9429d2 2025-09-24 21:54:54,581 - DEBUG - ==>Verifying data for policy with id: 0d04ee81-833a-40b3-8bf2-b0bf18798b3f, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-12309427', 'ctest-policy1-59185329'] 2025-09-24 21:54:54,582 - INFO - VN ctest-vn4-98577217 Policy verification: verify_vn_policy_in_api_server, status: True 2025-09-24 21:54:54,582 - DEBUG - Verifying the vn in opserver 2025-09-24 21:54:54,582 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-12309427:ctest-vn4-98577217 virtual network link through opserver 10.0.0.57 2025-09-24 21:54:54,582 - DEBUG - Requesting: http://10.0.0.57:8081/analytics/uves/virtual-networks 2025-09-24 21:54:54,878 - DEBUG - Requesting: http://10.0.0.57:8081/analytics/uves/virtual-networks 2025-09-24 21:54:54,937 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-12309427:ctest-vn4-98577217', 'href': 'http://10.0.0.57:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-12309427:ctest-vn4-98577217?flat'} 2025-09-24 21:54:54,937 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-12309427:ctest-vn4-98577217 is found in opserver 2025-09-24 21:54:54,946 - DEBUG - Do not have enough data to verify VN in agent 2025-09-24 21:54:54,951 - DEBUG - VRF ids for VN ctest-vn4-98577217: {} 2025-09-24 21:54:54,951 - DEBUG - ====Verifying data for ctest-policy1-59185329 in API_Server ====== 2025-09-24 21:54:54,951 - DEBUG - Requesting: http://10.0.0.57:8082/domains 2025-09-24 21:54:54,958 - DEBUG - Requesting: http://10.0.0.57:8082/domain/3059085e-2a69-4d13-9a6b-ece82704879e 2025-09-24 21:54:54,970 - DEBUG - Requesting: http://10.0.0.57:8082/project/df3f0321-99b9-47e1-9b47-1d2475ed5370 2025-09-24 21:54:55,042 - DEBUG - Requesting: http://10.0.0.57:8082/network-policy/0d04ee81-833a-40b3-8bf2-b0bf18798b3f 2025-09-24 21:54:55,054 - INFO - Verified policy ctest-policy1-59185329 in API Server, Result: True 2025-09-24 21:54:55,054 - INFO - Done with setup and verification, moving onto test .. 2025-09-24 21:54:55,063 - INFO - Deleting VN ctest-vn4-98577217 2025-09-24 21:54:55,212 - DEBUG - Response for deleting network () 2025-09-24 21:54:55,212 - DEBUG - Requesting: http://10.0.0.57:8082/routing-instance/5936e577-0e59-4a9f-8cec-ea8a1608639f 2025-09-24 21:54:55,218 - DEBUG - Response Code: 404 2025-09-24 21:54:55,218 - DEBUG - Requesting: http://10.0.0.57:8082/domains 2025-09-24 21:54:55,225 - DEBUG - Requesting: http://10.0.0.57:8082/domain/3059085e-2a69-4d13-9a6b-ece82704879e 2025-09-24 21:54:55,278 - DEBUG - Requesting: http://10.0.0.57:8082/project/df3f0321-99b9-47e1-9b47-1d2475ed5370 2025-09-24 21:54:55,420 - INFO - Validated that VN ctest-vn4-98577217 is not found in API Server 2025-09-24 21:54:55,431 - DEBUG - VN ctest-vn4-98577217 is not present in Agent 10.0.0.57 2025-09-24 21:54:55,431 - INFO - Validated that VN ctest-vn4-98577217 is not in any agent 2025-09-24 21:54:55,446 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-98577217 info 2025-09-24 21:54:55,471 - INFO - Deleted policy ctest-policy1-59185329 2025-09-24 21:54:55,637 - DEBUG - policy ctest-policy1-59185329 is not found in API Server 2025-09-24 21:54:55,892 - DEBUG - No XMPP flaps were noticed during the test
2025-09-24 21:54:55,892 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04]
2025-09-24 21:54:55,892 - INFO - -------------------------------------------------------------------------------- 2025-09-24 21:54:56,183 - DEBUG - No XMPP flaps were noticed during the test
2025-09-24 21:54:56,183 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:05]
2025-09-24 21:54:56,183 - INFO - -------------------------------------------------------------------------------- 2025-09-24 21:54:56,880 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-12309427, ID : df3f0321-99b9-47e1-9b47-1d2475ed5370