2025-11-12 18:16:43,167 - INFO - Domain Default found not creating 2025-11-12 18:16:43,319 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-94018762 not found, creating it 2025-11-12 18:16:43,741 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-94018762, ID : 32f020c5-ba90-40d9-8c43-f23805f75035 2025-11-12 18:16:45,125 - INFO - ================================================================================ 2025-11-12 18:16:45,126 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-11-12 18:16:45,380 - DEBUG - Nothing to compare xmpp stats {'10.0.0.22': {'10.20.0.14': '0'}} with 2025-11-12 18:16:45,380 - INFO - Initial checks done. Running the testcase now 2025-11-12 18:16:45,380 - INFO - 2025-11-12 18:16:45,380 - INFO - ================================================================================ 2025-11-12 18:16:45,380 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-11-12 18:16:45,381 - 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-12 18:16:45,668 - DEBUG - Nothing to compare xmpp stats {'10.0.0.22': {'10.20.0.14': '0'}} with 2025-11-12 18:16:45,668 - INFO - Initial checks done. Running the testcase now 2025-11-12 18:16:45,669 - INFO - 2025-11-12 18:16:46,016 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-94018762:ctest-vn4-75764319, 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-94018762:ctest-vn4-75764319, 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-94018762:ctest-vn4-75764319, 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-94018762:ctest-vn4-75764319, 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-12 18:16:46,498 - DEBUG - Response for create_network : {'network': {'id': '9eb2cfd1-0e91-47c7-ae48-8cd2ba6d7b16', 'name': 'ctest-vn4-75764319', 'tenant_id': '32f020c5ba9040d98c43f23805f75035', 'project_id': '32f020c5ba9040d98c43f23805f75035', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-94018762', 'ctest-vn4-75764319'], 'port_security_enabled': True, 'description': ''}} 2025-11-12 18:16:46,718 - DEBUG - Response for create_subnet : {'subnet': {'id': 'f970a1b0-b765-4554-a730-be6aeabe4e5b', 'name': '', 'tenant_id': '32f020c5ba9040d98c43f23805f75035', 'network_id': '9eb2cfd1-0e91-47c7-ae48-8cd2ba6d7b16', 'ip_version': 4, 'cidr': '5.9.114.64/26', 'allocation_pools': [{'start': '5.9.114.66', 'end': '5.9.114.126'}], 'gateway_ip': '5.9.114.65', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '5.9.114.66', 'tags': [], 'project_id': '32f020c5ba9040d98c43f23805f75035'}} 2025-11-12 18:16:46,916 - DEBUG - Response for create_subnet : {'subnet': {'id': 'd95b9df0-787c-4edb-b65a-3b211be71eac', 'name': '', 'tenant_id': '32f020c5ba9040d98c43f23805f75035', 'network_id': '9eb2cfd1-0e91-47c7-ae48-8cd2ba6d7b16', 'ip_version': 6, 'cidr': '2130:926f:cc87:8bc7:ec2f:ae67::/96', 'allocation_pools': [{'start': '2130:926f:cc87:8bc7:ec2f:ae67:0:2', 'end': '2130:926f:cc87:8bc7:ec2f:ae67:ffff:fffe'}], 'gateway_ip': '2130:926f:cc87:8bc7:ec2f:ae67:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '2130:926f:cc87:8bc7:ec2f:ae67:0:2', 'tags': [], 'project_id': '32f020c5ba9040d98c43f23805f75035'}} 2025-11-12 18:16:46,935 - INFO - Created VN ctest-vn4-75764319 2025-11-12 18:16:46,984 - DEBUG - VN ctest-vn4-75764319 UUID is 9eb2cfd1-0e91-47c7-ae48-8cd2ba6d7b16 2025-11-12 18:16:47,166 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': '9eb2cfd1-0e91-47c7-ae48-8cd2ba6d7b16', 'name': 'ctest-vn4-75764319', 'tenant_id': '32f020c5ba9040d98c43f23805f75035', 'project_id': '32f020c5ba9040d98c43f23805f75035', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['f970a1b0-b765-4554-a730-be6aeabe4e5b', 'd95b9df0-787c-4edb-b65a-3b211be71eac'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-94018762', 'ctest-vn4-75764319'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-94018762', 'ctest-policy1-63886410']], 'subnet_ipam': [{'subnet_cidr': '5.9.114.64/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '2130:926f:cc87:8bc7:ec2f:ae67::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2025-11-12 18:16:47,328 - DEBUG - Requesting: http://10.0.0.22:8082/domains 2025-11-12 18:16:47,619 - DEBUG - Requesting: http://10.0.0.22:8082/domains 2025-11-12 18:16:47,646 - DEBUG - Requesting: http://10.0.0.22:8082/domain/3935e5ee-c7fa-4be7-8ba4-4cb6f24aacfa 2025-11-12 18:16:47,656 - DEBUG - Requesting: http://10.0.0.22:8082/project/32f020c5-ba90-40d9-8c43-f23805f75035 2025-11-12 18:16:47,724 - DEBUG - Requesting: http://10.0.0.22:8082/virtual-network/9eb2cfd1-0e91-47c7-ae48-8cd2ba6d7b16 2025-11-12 18:16:47,735 - DEBUG - Requesting: http://10.0.0.22:8082/virtual-network/9eb2cfd1-0e91-47c7-ae48-8cd2ba6d7b16 2025-11-12 18:16:47,743 - DEBUG - Requesting: http://10.0.0.22:8082/routing-instance/d332f2b8-d76b-4f7b-a0af-4eeee1eb1b13 2025-11-12 18:16:47,748 - DEBUG - Requesting: http://10.0.0.22:8082/routing-instance/d332f2b8-d76b-4f7b-a0af-4eeee1eb1b13 2025-11-12 18:16:47,753 - DEBUG - Requesting: http://10.0.0.22:8082/route-target/3fbda506-ef46-46c7-8b5a-94f42527fdd2 2025-11-12 18:16:47,757 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-11-12 18:16:47,757 - DEBUG - Requesting: http://10.0.0.22:8082/virtual-network/9eb2cfd1-0e91-47c7-ae48-8cd2ba6d7b16 2025-11-12 18:16:47,764 - DEBUG - Requesting: http://10.0.0.22:8082/routing-instance/d332f2b8-d76b-4f7b-a0af-4eeee1eb1b13 2025-11-12 18:16:47,775 - INFO - Verified VN network id 11 for VN 9eb2cfd1-0e91-47c7-ae48-8cd2ba6d7b16 2025-11-12 18:16:47,775 - INFO - Verifications in API Server for VN ctest-vn4-75764319 passed 2025-11-12 18:16:47,775 - DEBUG - Requesting: http://10.0.0.22:8082/virtual-network/9eb2cfd1-0e91-47c7-ae48-8cd2ba6d7b16 2025-11-12 18:16:47,782 - DEBUG - Requesting: http://10.0.0.22:8082/routing-instance/d332f2b8-d76b-4f7b-a0af-4eeee1eb1b13 2025-11-12 18:16:47,787 - DEBUG - Requesting: http://10.0.0.22:8082/routing-instance/d332f2b8-d76b-4f7b-a0af-4eeee1eb1b13 2025-11-12 18:16:47,792 - DEBUG - Requesting: http://10.0.0.22:8082/route-target/3fbda506-ef46-46c7-8b5a-94f42527fdd2 2025-11-12 18:16:47,803 - DEBUG - Control-node 10.0.0.22 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-94018762:ctest-vn4-75764319', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-94018762', 'owner-access': '7', 'group': 'reader', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '11435430900646627271', 'uuid-lslong': '12558442397621386006'}, 'enable': 'true', 'created': '2025-11-12T18:16:46', 'last-modified': '2025-11-12T18:16:47', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.660065'} 2025-11-12 18:16:47,808 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-11-12 18:16:47,808 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-75764319 passed 2025-11-12 18:16:47,809 - DEBUG - ====Verifying policy data for ctest-vn4-75764319 in API_Server ====== 2025-11-12 18:16:47,809 - DEBUG - Requesting: http://10.0.0.22:8082/domains 2025-11-12 18:16:47,813 - DEBUG - Requesting: http://10.0.0.22:8082/domain/3935e5ee-c7fa-4be7-8ba4-4cb6f24aacfa 2025-11-12 18:16:47,822 - DEBUG - Requesting: http://10.0.0.22:8082/project/32f020c5-ba90-40d9-8c43-f23805f75035 2025-11-12 18:16:47,885 - DEBUG - Requesting: http://10.0.0.22:8082/virtual-network/9eb2cfd1-0e91-47c7-ae48-8cd2ba6d7b16 2025-11-12 18:16:47,894 - DEBUG - ==>Verifying data for policy with id: b54712b6-076d-47a6-9d98-4f2d64b6d5a8, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-94018762', 'ctest-policy1-63886410'] 2025-11-12 18:16:47,894 - INFO - VN ctest-vn4-75764319 Policy verification: verify_vn_policy_in_api_server, status: True 2025-11-12 18:16:47,895 - DEBUG - Verifying the vn in opserver 2025-11-12 18:16:47,895 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-94018762:ctest-vn4-75764319 virtual network link through opserver 10.0.0.22 2025-11-12 18:16:47,895 - DEBUG - Requesting: http://10.0.0.22:8081/analytics/uves/virtual-networks 2025-11-12 18:16:48,190 - DEBUG - Requesting: http://10.0.0.22:8081/analytics/uves/virtual-networks 2025-11-12 18:16:48,247 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-94018762:ctest-vn4-75764319', 'href': 'http://10.0.0.22:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-94018762:ctest-vn4-75764319?flat'} 2025-11-12 18:16:48,247 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-94018762:ctest-vn4-75764319 is found in opserver 2025-11-12 18:16:48,255 - DEBUG - Do not have enough data to verify VN in agent 2025-11-12 18:16:48,259 - DEBUG - VRF ids for VN ctest-vn4-75764319: {} 2025-11-12 18:16:48,260 - DEBUG - ====Verifying data for ctest-policy1-63886410 in API_Server ====== 2025-11-12 18:16:48,260 - DEBUG - Requesting: http://10.0.0.22:8082/domains 2025-11-12 18:16:48,264 - DEBUG - Requesting: http://10.0.0.22:8082/domain/3935e5ee-c7fa-4be7-8ba4-4cb6f24aacfa 2025-11-12 18:16:48,273 - DEBUG - Requesting: http://10.0.0.22:8082/project/32f020c5-ba90-40d9-8c43-f23805f75035 2025-11-12 18:16:48,341 - DEBUG - Requesting: http://10.0.0.22:8082/network-policy/b54712b6-076d-47a6-9d98-4f2d64b6d5a8 2025-11-12 18:16:48,350 - INFO - Verified policy ctest-policy1-63886410 in API Server, Result: True 2025-11-12 18:16:48,350 - INFO - Done with setup and verification, moving onto test .. 2025-11-12 18:16:48,357 - INFO - Deleting VN ctest-vn4-75764319 2025-11-12 18:16:48,469 - DEBUG - Response for deleting network () 2025-11-12 18:16:48,469 - DEBUG - Requesting: http://10.0.0.22:8082/routing-instance/d332f2b8-d76b-4f7b-a0af-4eeee1eb1b13 2025-11-12 18:16:48,474 - DEBUG - Response Code: 404 2025-11-12 18:16:48,474 - DEBUG - Requesting: http://10.0.0.22:8082/domains 2025-11-12 18:16:48,480 - DEBUG - Requesting: http://10.0.0.22:8082/domain/3935e5ee-c7fa-4be7-8ba4-4cb6f24aacfa 2025-11-12 18:16:48,532 - DEBUG - Requesting: http://10.0.0.22:8082/project/32f020c5-ba90-40d9-8c43-f23805f75035 2025-11-12 18:16:48,599 - INFO - Validated that VN ctest-vn4-75764319 is not found in API Server 2025-11-12 18:16:48,608 - DEBUG - VN ctest-vn4-75764319 is not present in Agent 10.0.0.22 2025-11-12 18:16:48,608 - INFO - Validated that VN ctest-vn4-75764319 is not in any agent 2025-11-12 18:16:48,619 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-75764319 info 2025-11-12 18:16:48,639 - INFO - Deleted policy ctest-policy1-63886410 2025-11-12 18:16:48,808 - DEBUG - policy ctest-policy1-63886410 is not found in API Server 2025-11-12 18:16:49,064 - DEBUG - No XMPP flaps were noticed during the test
2025-11-12 18:16:49,064 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04]
2025-11-12 18:16:49,064 - INFO - -------------------------------------------------------------------------------- 2025-11-12 18:16:49,352 - DEBUG - No XMPP flaps were noticed during the test
2025-11-12 18:16:49,352 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04]
2025-11-12 18:16:49,352 - INFO - -------------------------------------------------------------------------------- 2025-11-12 18:16:49,992 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-94018762, ID : 32f020c5-ba90-40d9-8c43-f23805f75035