2025-08-18 19:43:10,218 - INFO - Domain Default found not creating 2025-08-18 19:43:10,367 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-34468575 not found, creating it 2025-08-18 19:43:10,825 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-34468575, ID : c993cdf3-cf91-4e2c-befe-5005fcc1165f 2025-08-18 19:43:12,159 - INFO - ================================================================================ 2025-08-18 19:43:12,159 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-08-18 19:43:12,407 - DEBUG - Nothing to compare xmpp stats {'10.0.0.38': {'10.20.0.17': '0'}} with 2025-08-18 19:43:12,407 - INFO - Initial checks done. Running the testcase now 2025-08-18 19:43:12,408 - INFO - 2025-08-18 19:43:12,408 - INFO - ================================================================================ 2025-08-18 19:43:12,408 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-08-18 19:43:12,408 - 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-08-18 19:43:12,695 - DEBUG - Nothing to compare xmpp stats {'10.0.0.38': {'10.20.0.17': '0'}} with 2025-08-18 19:43:12,695 - INFO - Initial checks done. Running the testcase now 2025-08-18 19:43:12,695 - INFO - 2025-08-18 19:43:13,037 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-34468575:ctest-vn4-28287849, 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-34468575:ctest-vn4-28287849, 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-34468575:ctest-vn4-28287849, 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-34468575:ctest-vn4-28287849, 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-08-18 19:43:13,559 - DEBUG - Response for create_network : {'network': {'id': 'aec09537-3b2a-473c-ad5a-1fde689a0f7d', 'name': 'ctest-vn4-28287849', 'tenant_id': 'c993cdf3cf914e2cbefe5005fcc1165f', 'project_id': 'c993cdf3cf914e2cbefe5005fcc1165f', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-34468575', 'ctest-vn4-28287849'], 'port_security_enabled': True, 'description': ''}} 2025-08-18 19:43:13,720 - DEBUG - Response for create_subnet : {'subnet': {'id': '4e8963a2-c409-4cd7-847a-cd04a9b65608', 'name': '', 'tenant_id': 'c993cdf3cf914e2cbefe5005fcc1165f', 'network_id': 'aec09537-3b2a-473c-ad5a-1fde689a0f7d', 'ip_version': 4, 'cidr': '204.238.194.192/26', 'allocation_pools': [{'start': '204.238.194.194', 'end': '204.238.194.254'}], 'gateway_ip': '204.238.194.193', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '204.238.194.194', 'tags': [], 'project_id': 'c993cdf3cf914e2cbefe5005fcc1165f'}} 2025-08-18 19:43:13,911 - DEBUG - Response for create_subnet : {'subnet': {'id': '24e104cf-c62b-4ae5-8860-be910e98f7c9', 'name': '', 'tenant_id': 'c993cdf3cf914e2cbefe5005fcc1165f', 'network_id': 'aec09537-3b2a-473c-ad5a-1fde689a0f7d', 'ip_version': 6, 'cidr': '287e:30f:5f83:7390:8564:4403::/96', 'allocation_pools': [{'start': '287e:30f:5f83:7390:8564:4403:0:2', 'end': '287e:30f:5f83:7390:8564:4403:ffff:fffe'}], 'gateway_ip': '287e:30f:5f83:7390:8564:4403:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '287e:30f:5f83:7390:8564:4403:0:2', 'tags': [], 'project_id': 'c993cdf3cf914e2cbefe5005fcc1165f'}} 2025-08-18 19:43:13,928 - INFO - Created VN ctest-vn4-28287849 2025-08-18 19:43:13,978 - DEBUG - VN ctest-vn4-28287849 UUID is aec09537-3b2a-473c-ad5a-1fde689a0f7d 2025-08-18 19:43:14,175 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': 'aec09537-3b2a-473c-ad5a-1fde689a0f7d', 'name': 'ctest-vn4-28287849', 'tenant_id': 'c993cdf3cf914e2cbefe5005fcc1165f', 'project_id': 'c993cdf3cf914e2cbefe5005fcc1165f', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['4e8963a2-c409-4cd7-847a-cd04a9b65608', '24e104cf-c62b-4ae5-8860-be910e98f7c9'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-34468575', 'ctest-vn4-28287849'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-34468575', 'ctest-policy1-41371183']], 'subnet_ipam': [{'subnet_cidr': '204.238.194.192/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '287e:30f:5f83:7390:8564:4403::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2025-08-18 19:43:14,342 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2025-08-18 19:43:14,633 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2025-08-18 19:43:14,661 - DEBUG - Requesting: http://10.0.0.38:8082/domain/18d96444-b3da-4cfc-9bdb-15b76434c786 2025-08-18 19:43:14,677 - DEBUG - Requesting: http://10.0.0.38:8082/project/c993cdf3-cf91-4e2c-befe-5005fcc1165f 2025-08-18 19:43:14,759 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/aec09537-3b2a-473c-ad5a-1fde689a0f7d 2025-08-18 19:43:14,772 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/aec09537-3b2a-473c-ad5a-1fde689a0f7d 2025-08-18 19:43:14,784 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/e5c1cf2f-a1f0-48e3-a8c1-c87c0949e413 2025-08-18 19:43:14,791 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/e5c1cf2f-a1f0-48e3-a8c1-c87c0949e413 2025-08-18 19:43:14,798 - DEBUG - Requesting: http://10.0.0.38:8082/route-target/7e61af58-af67-430c-a009-ce2711f8aa66 2025-08-18 19:43:14,805 - DEBUG - Route Targets: ['target:64512:8000005'] 2025-08-18 19:43:14,805 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/aec09537-3b2a-473c-ad5a-1fde689a0f7d 2025-08-18 19:43:14,814 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/e5c1cf2f-a1f0-48e3-a8c1-c87c0949e413 2025-08-18 19:43:14,827 - INFO - Verified VN network id 10 for VN aec09537-3b2a-473c-ad5a-1fde689a0f7d 2025-08-18 19:43:14,827 - INFO - Verifications in API Server for VN ctest-vn4-28287849 passed 2025-08-18 19:43:14,827 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/aec09537-3b2a-473c-ad5a-1fde689a0f7d 2025-08-18 19:43:14,836 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/e5c1cf2f-a1f0-48e3-a8c1-c87c0949e413 2025-08-18 19:43:14,842 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/e5c1cf2f-a1f0-48e3-a8c1-c87c0949e413 2025-08-18 19:43:14,849 - DEBUG - Requesting: http://10.0.0.38:8082/route-target/7e61af58-af67-430c-a009-ce2711f8aa66 2025-08-18 19:43:14,861 - DEBUG - Control-node 10.0.0.38 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-34468575:ctest-vn4-28287849', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-34468575', 'owner-access': '7', 'group': 'reader', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '12592228622576273212', 'uuid-lslong': '12491331556563619709'}, 'enable': 'true', 'created': '2025-08-18T19:43:13', 'last-modified': '2025-08-18T19:43:14', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.715056'} 2025-08-18 19:43:14,867 - DEBUG - Route Targets: ['target:64512:8000005'] 2025-08-18 19:43:14,867 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-28287849 passed 2025-08-18 19:43:14,867 - DEBUG - ====Verifying policy data for ctest-vn4-28287849 in API_Server ====== 2025-08-18 19:43:14,867 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2025-08-18 19:43:14,872 - DEBUG - Requesting: http://10.0.0.38:8082/domain/18d96444-b3da-4cfc-9bdb-15b76434c786 2025-08-18 19:43:14,882 - DEBUG - Requesting: http://10.0.0.38:8082/project/c993cdf3-cf91-4e2c-befe-5005fcc1165f 2025-08-18 19:43:14,954 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/aec09537-3b2a-473c-ad5a-1fde689a0f7d 2025-08-18 19:43:14,965 - DEBUG - ==>Verifying data for policy with id: e3a629d9-0cfd-49a5-a357-b61ef9c6487c, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-34468575', 'ctest-policy1-41371183'] 2025-08-18 19:43:14,965 - INFO - VN ctest-vn4-28287849 Policy verification: verify_vn_policy_in_api_server, status: True 2025-08-18 19:43:14,965 - DEBUG - Verifying the vn in opserver 2025-08-18 19:43:14,965 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-34468575:ctest-vn4-28287849 virtual network link through opserver 10.0.0.38 2025-08-18 19:43:14,965 - DEBUG - Requesting: http://10.0.0.38:8081/analytics/uves/virtual-networks 2025-08-18 19:43:15,272 - DEBUG - Requesting: http://10.0.0.38:8081/analytics/uves/virtual-networks 2025-08-18 19:43:15,331 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-34468575:ctest-vn4-28287849', 'href': 'http://10.0.0.38:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-34468575:ctest-vn4-28287849?flat'} 2025-08-18 19:43:15,331 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-34468575:ctest-vn4-28287849 is found in opserver 2025-08-18 19:43:15,341 - DEBUG - Do not have enough data to verify VN in agent 2025-08-18 19:43:15,345 - DEBUG - VRF ids for VN ctest-vn4-28287849: {} 2025-08-18 19:43:15,345 - DEBUG - ====Verifying data for ctest-policy1-41371183 in API_Server ====== 2025-08-18 19:43:15,346 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2025-08-18 19:43:15,351 - DEBUG - Requesting: http://10.0.0.38:8082/domain/18d96444-b3da-4cfc-9bdb-15b76434c786 2025-08-18 19:43:15,361 - DEBUG - Requesting: http://10.0.0.38:8082/project/c993cdf3-cf91-4e2c-befe-5005fcc1165f 2025-08-18 19:43:15,431 - DEBUG - Requesting: http://10.0.0.38:8082/network-policy/e3a629d9-0cfd-49a5-a357-b61ef9c6487c 2025-08-18 19:43:15,440 - INFO - Verified policy ctest-policy1-41371183 in API Server, Result: True 2025-08-18 19:43:15,440 - INFO - Done with setup and verification, moving onto test .. 2025-08-18 19:43:15,447 - INFO - Deleting VN ctest-vn4-28287849 2025-08-18 19:43:15,561 - DEBUG - Response for deleting network () 2025-08-18 19:43:15,561 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/e5c1cf2f-a1f0-48e3-a8c1-c87c0949e413 2025-08-18 19:43:15,566 - DEBUG - Response Code: 404 2025-08-18 19:43:15,566 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2025-08-18 19:43:15,570 - DEBUG - Requesting: http://10.0.0.38:8082/domain/18d96444-b3da-4cfc-9bdb-15b76434c786 2025-08-18 19:43:15,627 - DEBUG - Requesting: http://10.0.0.38:8082/project/c993cdf3-cf91-4e2c-befe-5005fcc1165f 2025-08-18 19:43:15,697 - INFO - Validated that VN ctest-vn4-28287849 is not found in API Server 2025-08-18 19:43:15,708 - DEBUG - VN ctest-vn4-28287849 is not present in Agent 10.0.0.38 2025-08-18 19:43:15,708 - INFO - Validated that VN ctest-vn4-28287849 is not in any agent 2025-08-18 19:43:15,723 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-28287849 info 2025-08-18 19:43:15,755 - INFO - Deleted policy ctest-policy1-41371183 2025-08-18 19:43:15,926 - DEBUG - policy ctest-policy1-41371183 is not found in API Server 2025-08-18 19:43:16,182 - DEBUG - No XMPP flaps were noticed during the test 2025-08-18 19:43:16,182 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04] 2025-08-18 19:43:16,182 - INFO - -------------------------------------------------------------------------------- 2025-08-18 19:43:16,467 - DEBUG - No XMPP flaps were noticed during the test 2025-08-18 19:43:16,467 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04] 2025-08-18 19:43:16,467 - INFO - -------------------------------------------------------------------------------- 2025-08-18 19:43:17,136 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-34468575, ID : c993cdf3-cf91-4e2c-befe-5005fcc1165f