2025-10-17 08:37:35,956 - INFO - Domain Default found not creating 2025-10-17 08:37:36,093 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-40938353 not found, creating it 2025-10-17 08:37:36,536 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-40938353, ID : 2c8cb88b-d2e6-46d9-b79e-209dc0cb827f 2025-10-17 08:37:37,939 - INFO - ================================================================================ 2025-10-17 08:37:37,939 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-10-17 08:37:38,194 - DEBUG - Nothing to compare xmpp stats {'10.0.0.38': {'10.20.0.17': '0'}} with 2025-10-17 08:37:38,195 - INFO - Initial checks done. Running the testcase now 2025-10-17 08:37:38,195 - INFO - 2025-10-17 08:37:38,195 - INFO - ================================================================================ 2025-10-17 08:37:38,195 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-10-17 08:37:38,195 - 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-17 08:37:38,484 - DEBUG - Nothing to compare xmpp stats {'10.0.0.38': {'10.20.0.17': '0'}} with 2025-10-17 08:37:38,484 - INFO - Initial checks done. Running the testcase now 2025-10-17 08:37:38,484 - INFO - 2025-10-17 08:37:38,821 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-40938353:ctest-vn4-03952481, 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-40938353:ctest-vn4-03952481, 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-40938353:ctest-vn4-03952481, 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-40938353:ctest-vn4-03952481, 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-17 08:37:39,313 - DEBUG - Response for create_network : {'network': {'id': '7e5f76f1-66e6-4953-946f-403dff4592b4', 'name': 'ctest-vn4-03952481', 'tenant_id': '2c8cb88bd2e646d9b79e209dc0cb827f', 'project_id': '2c8cb88bd2e646d9b79e209dc0cb827f', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-40938353', 'ctest-vn4-03952481'], 'port_security_enabled': True, 'description': ''}} 2025-10-17 08:37:39,516 - DEBUG - Response for create_subnet : {'subnet': {'id': 'f9d0605f-9bb0-45f9-a850-df31bffd1c0d', 'name': '', 'tenant_id': '2c8cb88bd2e646d9b79e209dc0cb827f', 'network_id': '7e5f76f1-66e6-4953-946f-403dff4592b4', 'ip_version': 4, 'cidr': '37.9.199.192/26', 'allocation_pools': [{'start': '37.9.199.194', 'end': '37.9.199.254'}], 'gateway_ip': '37.9.199.193', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '37.9.199.194', 'tags': [], 'project_id': '2c8cb88bd2e646d9b79e209dc0cb827f'}} 2025-10-17 08:37:39,652 - DEBUG - Response for create_subnet : {'subnet': {'id': '547d4348-4792-425b-a641-a06661403277', 'name': '', 'tenant_id': '2c8cb88bd2e646d9b79e209dc0cb827f', 'network_id': '7e5f76f1-66e6-4953-946f-403dff4592b4', 'ip_version': 6, 'cidr': '358f:2d24:e2f9:787b:1b18:6848::/96', 'allocation_pools': [{'start': '358f:2d24:e2f9:787b:1b18:6848:0:2', 'end': '358f:2d24:e2f9:787b:1b18:6848:ffff:fffe'}], 'gateway_ip': '358f:2d24:e2f9:787b:1b18:6848:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '358f:2d24:e2f9:787b:1b18:6848:0:2', 'tags': [], 'project_id': '2c8cb88bd2e646d9b79e209dc0cb827f'}} 2025-10-17 08:37:39,673 - INFO - Created VN ctest-vn4-03952481 2025-10-17 08:37:39,726 - DEBUG - VN ctest-vn4-03952481 UUID is 7e5f76f1-66e6-4953-946f-403dff4592b4 2025-10-17 08:37:39,912 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': '7e5f76f1-66e6-4953-946f-403dff4592b4', 'name': 'ctest-vn4-03952481', 'tenant_id': '2c8cb88bd2e646d9b79e209dc0cb827f', 'project_id': '2c8cb88bd2e646d9b79e209dc0cb827f', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['f9d0605f-9bb0-45f9-a850-df31bffd1c0d', '547d4348-4792-425b-a641-a06661403277'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-40938353', 'ctest-vn4-03952481'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-40938353', 'ctest-policy1-20586955']], 'subnet_ipam': [{'subnet_cidr': '37.9.199.192/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '358f:2d24:e2f9:787b:1b18:6848::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2025-10-17 08:37:40,142 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2025-10-17 08:37:40,429 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2025-10-17 08:37:40,454 - DEBUG - Requesting: http://10.0.0.38:8082/domain/fb4f9b30-d70f-4a95-aa17-c59d60681efe 2025-10-17 08:37:40,464 - DEBUG - Requesting: http://10.0.0.38:8082/project/2c8cb88b-d2e6-46d9-b79e-209dc0cb827f 2025-10-17 08:37:40,534 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/7e5f76f1-66e6-4953-946f-403dff4592b4 2025-10-17 08:37:40,544 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/7e5f76f1-66e6-4953-946f-403dff4592b4 2025-10-17 08:37:40,554 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/acd2ea9b-f027-4613-a138-9afa6152dad8 2025-10-17 08:37:40,560 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/acd2ea9b-f027-4613-a138-9afa6152dad8 2025-10-17 08:37:40,566 - DEBUG - Requesting: http://10.0.0.38:8082/route-target/0f75bbd2-fb78-4e42-9657-d8eefbc8a9c4 2025-10-17 08:37:40,571 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-10-17 08:37:40,571 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/7e5f76f1-66e6-4953-946f-403dff4592b4 2025-10-17 08:37:40,581 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/acd2ea9b-f027-4613-a138-9afa6152dad8 2025-10-17 08:37:40,592 - INFO - Verified VN network id 12 for VN 7e5f76f1-66e6-4953-946f-403dff4592b4 2025-10-17 08:37:40,592 - INFO - Verifications in API Server for VN ctest-vn4-03952481 passed 2025-10-17 08:37:40,592 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/7e5f76f1-66e6-4953-946f-403dff4592b4 2025-10-17 08:37:40,600 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/acd2ea9b-f027-4613-a138-9afa6152dad8 2025-10-17 08:37:40,605 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/acd2ea9b-f027-4613-a138-9afa6152dad8 2025-10-17 08:37:40,610 - DEBUG - Requesting: http://10.0.0.38:8082/route-target/0f75bbd2-fb78-4e42-9657-d8eefbc8a9c4 2025-10-17 08:37:40,619 - DEBUG - Control-node 10.0.0.38 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-40938353:ctest-vn4-03952481', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-40938353', 'owner-access': '7', 'group': 'member', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '9106127750751996243', 'uuid-lslong': '10695838275048149684'}, 'enable': 'true', 'created': '2025-10-17T08:37:39', 'last-modified': '2025-10-17T08:37:39', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.732572'} 2025-10-17 08:37:40,625 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-10-17 08:37:40,625 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-03952481 passed 2025-10-17 08:37:40,625 - DEBUG - ====Verifying policy data for ctest-vn4-03952481 in API_Server ====== 2025-10-17 08:37:40,625 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2025-10-17 08:37:40,632 - DEBUG - Requesting: http://10.0.0.38:8082/domain/fb4f9b30-d70f-4a95-aa17-c59d60681efe 2025-10-17 08:37:40,641 - DEBUG - Requesting: http://10.0.0.38:8082/project/2c8cb88b-d2e6-46d9-b79e-209dc0cb827f 2025-10-17 08:37:40,708 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/7e5f76f1-66e6-4953-946f-403dff4592b4 2025-10-17 08:37:40,716 - DEBUG - ==>Verifying data for policy with id: 520fd756-dd8d-4209-9788-0da322288321, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-40938353', 'ctest-policy1-20586955'] 2025-10-17 08:37:40,716 - INFO - VN ctest-vn4-03952481 Policy verification: verify_vn_policy_in_api_server, status: True 2025-10-17 08:37:40,716 - DEBUG - Verifying the vn in opserver 2025-10-17 08:37:40,716 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-40938353:ctest-vn4-03952481 virtual network link through opserver 10.0.0.38 2025-10-17 08:37:40,716 - DEBUG - Requesting: http://10.0.0.38:8081/analytics/uves/virtual-networks 2025-10-17 08:37:41,013 - DEBUG - Requesting: http://10.0.0.38:8081/analytics/uves/virtual-networks 2025-10-17 08:37:41,070 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-40938353:ctest-vn4-03952481', 'href': 'http://10.0.0.38:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-40938353:ctest-vn4-03952481?flat'} 2025-10-17 08:37:41,070 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-40938353:ctest-vn4-03952481 is found in opserver 2025-10-17 08:37:41,079 - DEBUG - Do not have enough data to verify VN in agent 2025-10-17 08:37:41,083 - DEBUG - VRF ids for VN ctest-vn4-03952481: {} 2025-10-17 08:37:41,084 - DEBUG - ====Verifying data for ctest-policy1-20586955 in API_Server ====== 2025-10-17 08:37:41,084 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2025-10-17 08:37:41,090 - DEBUG - Requesting: http://10.0.0.38:8082/domain/fb4f9b30-d70f-4a95-aa17-c59d60681efe 2025-10-17 08:37:41,101 - DEBUG - Requesting: http://10.0.0.38:8082/project/2c8cb88b-d2e6-46d9-b79e-209dc0cb827f 2025-10-17 08:37:41,168 - DEBUG - Requesting: http://10.0.0.38:8082/network-policy/520fd756-dd8d-4209-9788-0da322288321 2025-10-17 08:37:41,177 - INFO - Verified policy ctest-policy1-20586955 in API Server, Result: True 2025-10-17 08:37:41,178 - INFO - Done with setup and verification, moving onto test .. 2025-10-17 08:37:41,185 - INFO - Deleting VN ctest-vn4-03952481 2025-10-17 08:37:41,300 - DEBUG - Response for deleting network () 2025-10-17 08:37:41,300 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/acd2ea9b-f027-4613-a138-9afa6152dad8 2025-10-17 08:37:41,305 - DEBUG - Response Code: 404 2025-10-17 08:37:41,305 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2025-10-17 08:37:41,311 - DEBUG - Requesting: http://10.0.0.38:8082/domain/fb4f9b30-d70f-4a95-aa17-c59d60681efe 2025-10-17 08:37:41,364 - DEBUG - Requesting: http://10.0.0.38:8082/project/2c8cb88b-d2e6-46d9-b79e-209dc0cb827f 2025-10-17 08:37:41,435 - INFO - Validated that VN ctest-vn4-03952481 is not found in API Server 2025-10-17 08:37:41,445 - DEBUG - VN ctest-vn4-03952481 is not present in Agent 10.0.0.38 2025-10-17 08:37:41,445 - INFO - Validated that VN ctest-vn4-03952481 is not in any agent 2025-10-17 08:37:41,457 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-03952481 info 2025-10-17 08:37:41,483 - INFO - Deleted policy ctest-policy1-20586955 2025-10-17 08:37:41,649 - DEBUG - policy ctest-policy1-20586955 is not found in API Server 2025-10-17 08:37:41,906 - DEBUG - No XMPP flaps were noticed during the test 2025-10-17 08:37:41,906 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:03] 2025-10-17 08:37:41,907 - INFO - -------------------------------------------------------------------------------- 2025-10-17 08:37:42,199 - DEBUG - No XMPP flaps were noticed during the test 2025-10-17 08:37:42,199 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:05] 2025-10-17 08:37:42,199 - INFO - -------------------------------------------------------------------------------- 2025-10-17 08:37:42,856 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-40938353, ID : 2c8cb88b-d2e6-46d9-b79e-209dc0cb827f