2026-04-20 16:33:36,854 - INFO - Domain Default found not creating 2026-04-20 16:33:37,046 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-42733687 not found, creating it 2026-04-20 16:33:37,528 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-42733687, ID : 736897b6-0e63-4197-8650-f2902f65842c 2026-04-20 16:33:39,075 - INFO - ================================================================================ 2026-04-20 16:33:39,075 - INFO - STARTING TEST : test_remove_policy_with_ref 2026-04-20 16:33:39,329 - DEBUG - Nothing to compare xmpp stats {'10.0.0.27': {'10.20.0.14': '0'}} with 2026-04-20 16:33:39,329 - INFO - Initial checks done. Running the testcase now 2026-04-20 16:33:39,330 - INFO - 2026-04-20 16:33:39,330 - INFO - ================================================================================ 2026-04-20 16:33:39,330 - INFO - STARTING TEST : test_remove_policy_with_ref 2026-04-20 16:33:39,330 - 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. 2026-04-20 16:33:39,624 - DEBUG - Nothing to compare xmpp stats {'10.0.0.27': {'10.20.0.14': '0'}} with 2026-04-20 16:33:39,624 - INFO - Initial checks done. Running the testcase now 2026-04-20 16:33:39,624 - INFO - 2026-04-20 16:33:39,989 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-42733687:ctest-vn4-96411032, 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-42733687:ctest-vn4-96411032, 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-42733687:ctest-vn4-96411032, 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-42733687:ctest-vn4-96411032, 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] 2026-04-20 16:33:40,517 - DEBUG - Response for create_network : {'network': {'id': '0221cb50-d9ae-47ad-a711-c50259332b74', 'name': 'ctest-vn4-96411032', 'tenant_id': '736897b60e6341978650f2902f65842c', 'project_id': '736897b60e6341978650f2902f65842c', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-42733687', 'ctest-vn4-96411032'], 'port_security_enabled': True, 'description': ''}} 2026-04-20 16:33:40,742 - DEBUG - Response for create_subnet : {'subnet': {'id': '4133627e-23bb-4f56-adc9-0b6fdf33cb37', 'name': '', 'tenant_id': '736897b60e6341978650f2902f65842c', 'network_id': '0221cb50-d9ae-47ad-a711-c50259332b74', 'ip_version': 4, 'cidr': '52.46.111.192/26', 'allocation_pools': [{'start': '52.46.111.194', 'end': '52.46.111.254'}], 'gateway_ip': '52.46.111.193', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '52.46.111.194', 'tags': [], 'project_id': '736897b60e6341978650f2902f65842c'}} 2026-04-20 16:33:40,896 - DEBUG - Response for create_subnet : {'subnet': {'id': 'f8b8fb0f-b234-43bd-b85c-a7f95d477b60', 'name': '', 'tenant_id': '736897b60e6341978650f2902f65842c', 'network_id': '0221cb50-d9ae-47ad-a711-c50259332b74', 'ip_version': 6, 'cidr': '3c8c:60f3:794e:fb00:2105:38f1::/96', 'allocation_pools': [{'start': '3c8c:60f3:794e:fb00:2105:38f1:0:2', 'end': '3c8c:60f3:794e:fb00:2105:38f1:ffff:fffe'}], 'gateway_ip': '3c8c:60f3:794e:fb00:2105:38f1:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '3c8c:60f3:794e:fb00:2105:38f1:0:2', 'tags': [], 'project_id': '736897b60e6341978650f2902f65842c'}} 2026-04-20 16:33:40,919 - INFO - Created VN ctest-vn4-96411032 2026-04-20 16:33:40,971 - DEBUG - VN ctest-vn4-96411032 UUID is 0221cb50-d9ae-47ad-a711-c50259332b74 2026-04-20 16:33:41,202 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': '0221cb50-d9ae-47ad-a711-c50259332b74', 'name': 'ctest-vn4-96411032', 'tenant_id': '736897b60e6341978650f2902f65842c', 'project_id': '736897b60e6341978650f2902f65842c', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['4133627e-23bb-4f56-adc9-0b6fdf33cb37', 'f8b8fb0f-b234-43bd-b85c-a7f95d477b60'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-42733687', 'ctest-vn4-96411032'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-42733687', 'ctest-policy1-55137259']], 'subnet_ipam': [{'subnet_cidr': '52.46.111.192/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '3c8c:60f3:794e:fb00:2105:38f1::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2026-04-20 16:33:41,371 - DEBUG - Requesting: http://10.0.0.27:8082/domains 2026-04-20 16:33:41,667 - DEBUG - Requesting: http://10.0.0.27:8082/domains 2026-04-20 16:33:41,703 - DEBUG - Requesting: http://10.0.0.27:8082/domain/2e599472-dfbb-44ed-b398-bd02b3b02a68 2026-04-20 16:33:41,716 - DEBUG - Requesting: http://10.0.0.27:8082/project/736897b6-0e63-4197-8650-f2902f65842c 2026-04-20 16:33:41,786 - DEBUG - Requesting: http://10.0.0.27:8082/virtual-network/0221cb50-d9ae-47ad-a711-c50259332b74 2026-04-20 16:33:41,799 - DEBUG - Requesting: http://10.0.0.27:8082/virtual-network/0221cb50-d9ae-47ad-a711-c50259332b74 2026-04-20 16:33:41,810 - DEBUG - Requesting: http://10.0.0.27:8082/routing-instance/e549286f-cc3e-401b-9ec0-3d796a7b1e7a 2026-04-20 16:33:41,818 - DEBUG - Requesting: http://10.0.0.27:8082/routing-instance/e549286f-cc3e-401b-9ec0-3d796a7b1e7a 2026-04-20 16:33:41,826 - DEBUG - Requesting: http://10.0.0.27:8082/route-target/45414a18-d2ab-4368-b1b8-72e81effb2b1 2026-04-20 16:33:41,833 - DEBUG - Route Targets: ['target:64512:8000004'] 2026-04-20 16:33:41,833 - DEBUG - Requesting: http://10.0.0.27:8082/virtual-network/0221cb50-d9ae-47ad-a711-c50259332b74 2026-04-20 16:33:41,846 - DEBUG - Requesting: http://10.0.0.27:8082/routing-instance/e549286f-cc3e-401b-9ec0-3d796a7b1e7a 2026-04-20 16:33:41,863 - INFO - Verified VN network id 11 for VN 0221cb50-d9ae-47ad-a711-c50259332b74 2026-04-20 16:33:41,863 - INFO - Verifications in API Server for VN ctest-vn4-96411032 passed 2026-04-20 16:33:41,863 - DEBUG - Requesting: http://10.0.0.27:8082/virtual-network/0221cb50-d9ae-47ad-a711-c50259332b74 2026-04-20 16:33:41,875 - DEBUG - Requesting: http://10.0.0.27:8082/routing-instance/e549286f-cc3e-401b-9ec0-3d796a7b1e7a 2026-04-20 16:33:41,882 - DEBUG - Requesting: http://10.0.0.27:8082/routing-instance/e549286f-cc3e-401b-9ec0-3d796a7b1e7a 2026-04-20 16:33:41,890 - DEBUG - Requesting: http://10.0.0.27:8082/route-target/45414a18-d2ab-4368-b1b8-72e81effb2b1 2026-04-20 16:33:41,903 - DEBUG - Control-node 10.0.0.27 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-42733687:ctest-vn4-96411032', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-42733687', 'owner-access': '7', 'group': 'member', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '153627410417207213', 'uuid-lslong': '12038619892815178612'}, 'enable': 'true', 'created': '2026-04-20T16:33:40', 'last-modified': '2026-04-20T16:33:41', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.735289'} 2026-04-20 16:33:41,910 - DEBUG - Route Targets: ['target:64512:8000004'] 2026-04-20 16:33:41,910 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-96411032 passed 2026-04-20 16:33:41,910 - DEBUG - ====Verifying policy data for ctest-vn4-96411032 in API_Server ====== 2026-04-20 16:33:41,910 - DEBUG - Requesting: http://10.0.0.27:8082/domains 2026-04-20 16:33:41,919 - DEBUG - Requesting: http://10.0.0.27:8082/domain/2e599472-dfbb-44ed-b398-bd02b3b02a68 2026-04-20 16:33:41,930 - DEBUG - Requesting: http://10.0.0.27:8082/project/736897b6-0e63-4197-8650-f2902f65842c 2026-04-20 16:33:42,006 - DEBUG - Requesting: http://10.0.0.27:8082/virtual-network/0221cb50-d9ae-47ad-a711-c50259332b74 2026-04-20 16:33:42,017 - DEBUG - ==>Verifying data for policy with id: dd481a00-ad40-44f5-93ee-ebee79b45f61, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-42733687', 'ctest-policy1-55137259'] 2026-04-20 16:33:42,017 - INFO - VN ctest-vn4-96411032 Policy verification: verify_vn_policy_in_api_server, status: True 2026-04-20 16:33:42,017 - DEBUG - Verifying the vn in opserver 2026-04-20 16:33:42,017 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-42733687:ctest-vn4-96411032 virtual network link through opserver 10.0.0.27 2026-04-20 16:33:42,018 - DEBUG - Requesting: http://10.0.0.27:8081/analytics/uves/virtual-networks 2026-04-20 16:33:42,318 - DEBUG - Requesting: http://10.0.0.27:8081/analytics/uves/virtual-networks 2026-04-20 16:33:42,390 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-42733687:ctest-vn4-96411032', 'href': 'http://10.0.0.27:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-42733687:ctest-vn4-96411032?flat'} 2026-04-20 16:33:42,390 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-42733687:ctest-vn4-96411032 is found in opserver 2026-04-20 16:33:42,401 - DEBUG - Do not have enough data to verify VN in agent 2026-04-20 16:33:42,406 - DEBUG - VRF ids for VN ctest-vn4-96411032: {} 2026-04-20 16:33:42,407 - DEBUG - ====Verifying data for ctest-policy1-55137259 in API_Server ====== 2026-04-20 16:33:42,407 - DEBUG - Requesting: http://10.0.0.27:8082/domains 2026-04-20 16:33:42,413 - DEBUG - Requesting: http://10.0.0.27:8082/domain/2e599472-dfbb-44ed-b398-bd02b3b02a68 2026-04-20 16:33:42,425 - DEBUG - Requesting: http://10.0.0.27:8082/project/736897b6-0e63-4197-8650-f2902f65842c 2026-04-20 16:33:42,496 - DEBUG - Requesting: http://10.0.0.27:8082/network-policy/dd481a00-ad40-44f5-93ee-ebee79b45f61 2026-04-20 16:33:42,506 - INFO - Verified policy ctest-policy1-55137259 in API Server, Result: True 2026-04-20 16:33:42,507 - INFO - Done with setup and verification, moving onto test .. 2026-04-20 16:33:42,515 - INFO - Deleting VN ctest-vn4-96411032 2026-04-20 16:33:42,639 - DEBUG - Response for deleting network () 2026-04-20 16:33:42,639 - DEBUG - Requesting: http://10.0.0.27:8082/routing-instance/e549286f-cc3e-401b-9ec0-3d796a7b1e7a 2026-04-20 16:33:42,645 - DEBUG - Response Code: 404 2026-04-20 16:33:42,646 - DEBUG - Requesting: http://10.0.0.27:8082/domains 2026-04-20 16:33:42,651 - DEBUG - Requesting: http://10.0.0.27:8082/domain/2e599472-dfbb-44ed-b398-bd02b3b02a68 2026-04-20 16:33:42,704 - DEBUG - Requesting: http://10.0.0.27:8082/project/736897b6-0e63-4197-8650-f2902f65842c 2026-04-20 16:33:42,779 - INFO - Validated that VN ctest-vn4-96411032 is not found in API Server 2026-04-20 16:33:42,792 - DEBUG - VN ctest-vn4-96411032 is not present in Agent 10.0.0.27 2026-04-20 16:33:42,792 - INFO - Validated that VN ctest-vn4-96411032 is not in any agent 2026-04-20 16:33:42,808 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-96411032 info 2026-04-20 16:33:42,836 - INFO - Deleted policy ctest-policy1-55137259 2026-04-20 16:33:43,003 - DEBUG - policy ctest-policy1-55137259 is not found in API Server 2026-04-20 16:33:43,257 - DEBUG - No XMPP flaps were noticed during the test
2026-04-20 16:33:43,257 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04]
2026-04-20 16:33:43,257 - INFO - -------------------------------------------------------------------------------- 2026-04-20 16:33:43,548 - DEBUG - No XMPP flaps were noticed during the test
2026-04-20 16:33:43,548 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04]
2026-04-20 16:33:43,548 - INFO - -------------------------------------------------------------------------------- 2026-04-20 16:33:44,266 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-42733687, ID : 736897b6-0e63-4197-8650-f2902f65842c