2025-10-20 16:37:20,431 - INFO - Reading existing Domain with UUID d63b8345-8de7-4e97-94d5-a56d8ff33dd0 2025-10-20 16:37:20,441 - INFO - Using existing domain ['admin_domain'](d63b8345-8de7-4e97-94d5-a56d8ff33dd0) 2025-10-20 16:37:20,638 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-45060209 not found, creating it 2025-10-20 16:37:21,148 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-45060209, ID : 0d2c5d89-6028-451e-a39a-273f7ce9c587 2025-10-20 16:37:22,816 - INFO - ================================================================================ 2025-10-20 16:37:22,816 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-10-20 16:37:23,208 - DEBUG - Nothing to compare xmpp stats {'10.0.0.22': {'10.0.0.22': '0'}} with 2025-10-20 16:37:23,208 - INFO - Initial checks done. Running the testcase now 2025-10-20 16:37:23,208 - INFO - 2025-10-20 16:37:23,208 - INFO - ================================================================================ 2025-10-20 16:37:23,208 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-10-20 16:37:23,208 - 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-10-20 16:37:23,595 - DEBUG - Nothing to compare xmpp stats {'10.0.0.22': {'10.0.0.22': '0'}} with 2025-10-20 16:37:23,595 - INFO - Initial checks done. Running the testcase now 2025-10-20 16:37:23,595 - INFO - 2025-10-20 16:37:23,971 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = admin_domain:ctest-TestBasicPolicyNegativeIpv4v6-45060209:ctest-vn4-08631101, security_group = None, network_policy = None, subnet_list = []], src_ports = [start_port = -1, end_port = -1], application = [], dst_addresses = [subnet = None, virtual_network = admin_domain:ctest-TestBasicPolicyNegativeIpv4v6-45060209:ctest-vn4-08631101, 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 = admin_domain:ctest-TestBasicPolicyNegativeIpv4v6-45060209:ctest-vn4-08631101, security_group = None, network_policy = None, subnet_list = []], src_ports = [start_port = -1, end_port = -1], application = [], dst_addresses = [subnet = None, virtual_network = admin_domain:ctest-TestBasicPolicyNegativeIpv4v6-45060209:ctest-vn4-08631101, 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-10-20 16:37:24,691 - DEBUG - Response for create_network : {'network': {'id': '16227640-cc1b-41d6-9c9f-82b59945bd5d', 'name': 'ctest-vn4-08631101', 'tenant_id': '0d2c5d896028451ea39a273f7ce9c587', 'project_id': '0d2c5d896028451ea39a273f7ce9c587', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['admin_domain', 'ctest-TestBasicPolicyNegativeIpv4v6-45060209', 'ctest-vn4-08631101'], 'port_security_enabled': True, 'description': '', 'created_at': None, 'updated_at': None}} 2025-10-20 16:37:24,923 - DEBUG - Response for create_subnet : {'subnet': {'id': '50d99eda-ab96-4ca4-867b-5a579977d207', 'name': '', 'tenant_id': '0d2c5d896028451ea39a273f7ce9c587', 'network_id': '16227640-cc1b-41d6-9c9f-82b59945bd5d', 'ip_version': 4, 'cidr': '216.88.37.128/26', 'allocation_pools': [{'start': '216.88.37.130', 'end': '216.88.37.190'}], 'gateway_ip': '216.88.37.129', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'created_at': '2025-10-20T16:37:24.825231', 'updated_at': '2025-10-20T16:37:24.825231', 'dns_server_address': '216.88.37.130', 'tags': [], 'project_id': '0d2c5d896028451ea39a273f7ce9c587'}} 2025-10-20 16:37:25,163 - DEBUG - Response for create_subnet : {'subnet': {'id': '1fb3cbcd-61ba-4e64-ba4c-5e8efe2089c7', 'name': '', 'tenant_id': '0d2c5d896028451ea39a273f7ce9c587', 'network_id': '16227640-cc1b-41d6-9c9f-82b59945bd5d', 'ip_version': 6, 'cidr': '2209:d8ef:58dd:5d59:187b:7f97::/96', 'allocation_pools': [{'start': '2209:d8ef:58dd:5d59:187b:7f97:0:2', 'end': '2209:d8ef:58dd:5d59:187b:7f97:ffff:fffe'}], 'gateway_ip': '2209:d8ef:58dd:5d59:187b:7f97:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'created_at': '2025-10-20T16:37:25.061889', 'updated_at': '2025-10-20T16:37:25.061889', 'dns_server_address': '2209:d8ef:58dd:5d59:187b:7f97:0:2', 'tags': [], 'project_id': '0d2c5d896028451ea39a273f7ce9c587'}} 2025-10-20 16:37:25,233 - INFO - Created VN ctest-vn4-08631101 2025-10-20 16:37:25,290 - DEBUG - VN ctest-vn4-08631101 UUID is 16227640-cc1b-41d6-9c9f-82b59945bd5d 2025-10-20 16:37:25,750 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': '16227640-cc1b-41d6-9c9f-82b59945bd5d', 'name': 'ctest-vn4-08631101', 'tenant_id': '0d2c5d896028451ea39a273f7ce9c587', 'project_id': '0d2c5d896028451ea39a273f7ce9c587', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['50d99eda-ab96-4ca4-867b-5a579977d207', '1fb3cbcd-61ba-4e64-ba4c-5e8efe2089c7'], 'fq_name': ['admin_domain', 'ctest-TestBasicPolicyNegativeIpv4v6-45060209', 'ctest-vn4-08631101'], 'policys': [['admin_domain', 'ctest-TestBasicPolicyNegativeIpv4v6-45060209', 'ctest-policy1-63044085']], 'subnet_ipam': [{'subnet_cidr': '216.88.37.128/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '2209:d8ef:58dd:5d59:187b:7f97::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': '', 'created_at': '2025-10-20T16:37:24.614322', 'updated_at': '2025-10-20T16:37:25.074849'}} 2025-10-20 16:37:25,934 - DEBUG - Requesting: https://10.0.0.22:8082/domains 2025-10-20 16:37:26,277 - DEBUG - Requesting: https://10.0.0.22:8082/domains 2025-10-20 16:37:26,355 - DEBUG - Requesting: https://10.0.0.22:8082/domain/d63b8345-8de7-4e97-94d5-a56d8ff33dd0 2025-10-20 16:37:26,411 - DEBUG - Requesting: https://10.0.0.22:8082/project/0d2c5d89-6028-451e-a39a-273f7ce9c587 2025-10-20 16:37:26,491 - DEBUG - Requesting: https://10.0.0.22:8082/virtual-network/16227640-cc1b-41d6-9c9f-82b59945bd5d 2025-10-20 16:37:26,552 - DEBUG - Requesting: https://10.0.0.22:8082/virtual-network/16227640-cc1b-41d6-9c9f-82b59945bd5d 2025-10-20 16:37:26,612 - DEBUG - Requesting: https://10.0.0.22:8082/routing-instance/732b8c08-f887-4813-937a-255defa24dfa 2025-10-20 16:37:26,671 - DEBUG - Requesting: https://10.0.0.22:8082/routing-instance/732b8c08-f887-4813-937a-255defa24dfa 2025-10-20 16:37:26,723 - DEBUG - Requesting: https://10.0.0.22:8082/route-target/001bc63c-e1a3-45b3-b6b6-cff703418060 2025-10-20 16:37:26,775 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-10-20 16:37:26,775 - DEBUG - Requesting: https://10.0.0.22:8082/virtual-network/16227640-cc1b-41d6-9c9f-82b59945bd5d 2025-10-20 16:37:26,832 - DEBUG - Requesting: https://10.0.0.22:8082/routing-instance/732b8c08-f887-4813-937a-255defa24dfa 2025-10-20 16:37:26,896 - INFO - Verified VN network id 11 for VN 16227640-cc1b-41d6-9c9f-82b59945bd5d 2025-10-20 16:37:26,896 - INFO - Verifications in API Server for VN ctest-vn4-08631101 passed 2025-10-20 16:37:26,896 - DEBUG - Requesting: https://10.0.0.22:8082/virtual-network/16227640-cc1b-41d6-9c9f-82b59945bd5d 2025-10-20 16:37:26,952 - DEBUG - Requesting: https://10.0.0.22:8082/routing-instance/732b8c08-f887-4813-937a-255defa24dfa 2025-10-20 16:37:27,003 - DEBUG - Requesting: https://10.0.0.22:8082/routing-instance/732b8c08-f887-4813-937a-255defa24dfa 2025-10-20 16:37:27,055 - DEBUG - Requesting: https://10.0.0.22:8082/route-target/001bc63c-e1a3-45b3-b6b6-cff703418060 2025-10-20 16:37:27,155 - DEBUG - Control-node 10.0.0.22 : VN object is : {'node_name': 'virtual-network:admin_domain:ctest-TestBasicPolicyNegativeIpv4v6-45060209:ctest-vn4-08631101', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-45060209', 'owner-access': '7', 'group': 'reader', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '1594967238716899798', 'uuid-lslong': '11285882907685928285'}, 'enable': 'true', 'created': '2025-10-20T16:37:24', 'last-modified': '2025-10-20T16:37:25', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:01.439240'} 2025-10-20 16:37:27,205 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-10-20 16:37:27,205 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-08631101 passed 2025-10-20 16:37:27,205 - DEBUG - ====Verifying policy data for ctest-vn4-08631101 in API_Server ====== 2025-10-20 16:37:27,206 - DEBUG - Requesting: https://10.0.0.22:8082/domains 2025-10-20 16:37:27,263 - DEBUG - Requesting: https://10.0.0.22:8082/domain/d63b8345-8de7-4e97-94d5-a56d8ff33dd0 2025-10-20 16:37:27,324 - DEBUG - Requesting: https://10.0.0.22:8082/project/0d2c5d89-6028-451e-a39a-273f7ce9c587 2025-10-20 16:37:27,399 - DEBUG - Requesting: https://10.0.0.22:8082/virtual-network/16227640-cc1b-41d6-9c9f-82b59945bd5d 2025-10-20 16:37:27,454 - DEBUG - ==>Verifying data for policy with id: d8a2c68b-0b5f-41c6-94cd-2d6ab207f8df, fqn: ['admin_domain', 'ctest-TestBasicPolicyNegativeIpv4v6-45060209', 'ctest-policy1-63044085'] 2025-10-20 16:37:27,454 - INFO - VN ctest-vn4-08631101 Policy verification: verify_vn_policy_in_api_server, status: True 2025-10-20 16:37:27,454 - DEBUG - Verifying the vn in opserver 2025-10-20 16:37:27,454 - DEBUG - Verifying the admin_domain:ctest-TestBasicPolicyNegativeIpv4v6-45060209:ctest-vn4-08631101 virtual network link through opserver 10.0.0.22 2025-10-20 16:37:27,454 - DEBUG - Requesting: https://10.0.0.22:8081/analytics/uves/virtual-networks 2025-10-20 16:37:27,793 - DEBUG - Requesting: https://10.0.0.22:8081/analytics/uves/virtual-networks 2025-10-20 16:37:27,911 - DEBUG - vn link and name as {'name': 'admin_domain:ctest-TestBasicPolicyNegativeIpv4v6-45060209:ctest-vn4-08631101', 'href': 'https://10.0.0.22:8081/analytics/uves/virtual-network/admin_domain:ctest-TestBasicPolicyNegativeIpv4v6-45060209:ctest-vn4-08631101?flat'} 2025-10-20 16:37:27,911 - INFO - Validated that VN admin_domain:ctest-TestBasicPolicyNegativeIpv4v6-45060209:ctest-vn4-08631101 is found in opserver 2025-10-20 16:37:28,007 - DEBUG - Do not have enough data to verify VN in agent 2025-10-20 16:37:28,055 - DEBUG - VRF ids for VN ctest-vn4-08631101: {} 2025-10-20 16:37:28,055 - DEBUG - ====Verifying data for ctest-policy1-63044085 in API_Server ====== 2025-10-20 16:37:28,055 - DEBUG - Requesting: https://10.0.0.22:8082/domains 2025-10-20 16:37:28,111 - DEBUG - Requesting: https://10.0.0.22:8082/domain/d63b8345-8de7-4e97-94d5-a56d8ff33dd0 2025-10-20 16:37:28,167 - DEBUG - Requesting: https://10.0.0.22:8082/project/0d2c5d89-6028-451e-a39a-273f7ce9c587 2025-10-20 16:37:28,243 - DEBUG - Requesting: https://10.0.0.22:8082/network-policy/d8a2c68b-0b5f-41c6-94cd-2d6ab207f8df 2025-10-20 16:37:28,301 - INFO - Verified policy ctest-policy1-63044085 in API Server, Result: True 2025-10-20 16:37:28,301 - INFO - Done with setup and verification, moving onto test .. 2025-10-20 16:37:28,311 - INFO - Deleting VN ctest-vn4-08631101 2025-10-20 16:37:28,509 - DEBUG - Response for deleting network () 2025-10-20 16:37:28,509 - DEBUG - Requesting: https://10.0.0.22:8082/routing-instance/732b8c08-f887-4813-937a-255defa24dfa 2025-10-20 16:37:28,562 - DEBUG - Response Code: 404 2025-10-20 16:37:28,562 - DEBUG - Requesting: https://10.0.0.22:8082/domains 2025-10-20 16:37:28,618 - DEBUG - Requesting: https://10.0.0.22:8082/domain/d63b8345-8de7-4e97-94d5-a56d8ff33dd0 2025-10-20 16:37:28,679 - DEBUG - Requesting: https://10.0.0.22:8082/project/0d2c5d89-6028-451e-a39a-273f7ce9c587 2025-10-20 16:37:28,755 - INFO - Validated that VN ctest-vn4-08631101 is not found in API Server 2025-10-20 16:37:28,855 - DEBUG - VN ctest-vn4-08631101 is not present in Agent 10.0.0.22 2025-10-20 16:37:28,855 - INFO - Validated that VN ctest-vn4-08631101 is not in any agent 2025-10-20 16:37:29,007 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-08631101 info 2025-10-20 16:37:29,034 - INFO - Deleted policy ctest-policy1-63044085 2025-10-20 16:37:29,198 - DEBUG - policy ctest-policy1-63044085 is not found in API Server 2025-10-20 16:37:29,592 - DEBUG - No XMPP flaps were noticed during the test 2025-10-20 16:37:29,592 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:06] 2025-10-20 16:37:29,593 - INFO - -------------------------------------------------------------------------------- 2025-10-20 16:37:30,003 - DEBUG - No XMPP flaps were noticed during the test 2025-10-20 16:37:30,003 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:08] 2025-10-20 16:37:30,003 - INFO - -------------------------------------------------------------------------------- 2025-10-20 16:37:30,743 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-45060209, ID : 0d2c5d89-6028-451e-a39a-273f7ce9c587