2025-10-07 15:48:58,703 - INFO - Domain Default found not creating 2025-10-07 15:48:58,858 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-69993102 not found, creating it 2025-10-07 15:48:59,329 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-69993102, ID : 8a64558b-e5fe-484c-ab0a-4b3bcff4de6f 2025-10-07 15:49:00,914 - INFO - ================================================================================ 2025-10-07 15:49:00,914 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-10-07 15:49:01,179 - DEBUG - Nothing to compare xmpp stats {'10.0.0.254': {'10.20.0.17': '0'}} with 2025-10-07 15:49:01,179 - INFO - Initial checks done. Running the testcase now 2025-10-07 15:49:01,180 - INFO - 2025-10-07 15:49:01,180 - INFO - ================================================================================ 2025-10-07 15:49:01,180 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-10-07 15:49:01,180 - 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-07 15:49:01,471 - DEBUG - Nothing to compare xmpp stats {'10.0.0.254': {'10.20.0.17': '0'}} with 2025-10-07 15:49:01,471 - INFO - Initial checks done. Running the testcase now 2025-10-07 15:49:01,471 - INFO - 2025-10-07 15:49:01,873 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-69993102:ctest-vn4-76412618, 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-69993102:ctest-vn4-76412618, 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-69993102:ctest-vn4-76412618, 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-69993102:ctest-vn4-76412618, 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-07 15:49:02,397 - DEBUG - Response for create_network : {'network': {'id': 'bc10dafd-2b4d-448a-80ab-244f9e68f1eb', 'name': 'ctest-vn4-76412618', 'tenant_id': '8a64558be5fe484cab0a4b3bcff4de6f', 'project_id': '8a64558be5fe484cab0a4b3bcff4de6f', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-69993102', 'ctest-vn4-76412618'], 'port_security_enabled': True, 'description': ''}} 2025-10-07 15:49:02,640 - DEBUG - Response for create_subnet : {'subnet': {'id': 'f55768eb-1934-4c57-894e-e8c30e3c4a6e', 'name': '', 'tenant_id': '8a64558be5fe484cab0a4b3bcff4de6f', 'network_id': 'bc10dafd-2b4d-448a-80ab-244f9e68f1eb', 'ip_version': 4, 'cidr': '1.118.186.192/26', 'allocation_pools': [{'start': '1.118.186.194', 'end': '1.118.186.254'}], 'gateway_ip': '1.118.186.193', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '1.118.186.194', 'tags': [], 'project_id': '8a64558be5fe484cab0a4b3bcff4de6f'}} 2025-10-07 15:49:02,853 - DEBUG - Response for create_subnet : {'subnet': {'id': '67695da3-7cd3-4357-8072-9d05dd1f6ce6', 'name': '', 'tenant_id': '8a64558be5fe484cab0a4b3bcff4de6f', 'network_id': 'bc10dafd-2b4d-448a-80ab-244f9e68f1eb', 'ip_version': 6, 'cidr': '33c1:2635:44eb:3f2d:957e:f866::/96', 'allocation_pools': [{'start': '33c1:2635:44eb:3f2d:957e:f866:0:2', 'end': '33c1:2635:44eb:3f2d:957e:f866:ffff:fffe'}], 'gateway_ip': '33c1:2635:44eb:3f2d:957e:f866:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '33c1:2635:44eb:3f2d:957e:f866:0:2', 'tags': [], 'project_id': '8a64558be5fe484cab0a4b3bcff4de6f'}} 2025-10-07 15:49:02,872 - INFO - Created VN ctest-vn4-76412618 2025-10-07 15:49:02,925 - DEBUG - VN ctest-vn4-76412618 UUID is bc10dafd-2b4d-448a-80ab-244f9e68f1eb 2025-10-07 15:49:03,131 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': 'bc10dafd-2b4d-448a-80ab-244f9e68f1eb', 'name': 'ctest-vn4-76412618', 'tenant_id': '8a64558be5fe484cab0a4b3bcff4de6f', 'project_id': '8a64558be5fe484cab0a4b3bcff4de6f', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['f55768eb-1934-4c57-894e-e8c30e3c4a6e', '67695da3-7cd3-4357-8072-9d05dd1f6ce6'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-69993102', 'ctest-vn4-76412618'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-69993102', 'ctest-policy1-56014449']], 'subnet_ipam': [{'subnet_cidr': '1.118.186.192/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '33c1:2635:44eb:3f2d:957e:f866::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2025-10-07 15:49:03,297 - DEBUG - Requesting: http://10.0.0.254:8082/domains 2025-10-07 15:49:03,630 - DEBUG - Requesting: http://10.0.0.254:8082/domains 2025-10-07 15:49:03,659 - DEBUG - Requesting: http://10.0.0.254:8082/domain/dfa7a7b9-40e0-4046-a557-36da65b9b4a0 2025-10-07 15:49:03,672 - DEBUG - Requesting: http://10.0.0.254:8082/project/8a64558b-e5fe-484c-ab0a-4b3bcff4de6f 2025-10-07 15:49:03,754 - DEBUG - Requesting: http://10.0.0.254:8082/virtual-network/bc10dafd-2b4d-448a-80ab-244f9e68f1eb 2025-10-07 15:49:03,767 - DEBUG - Requesting: http://10.0.0.254:8082/virtual-network/bc10dafd-2b4d-448a-80ab-244f9e68f1eb 2025-10-07 15:49:03,776 - DEBUG - Requesting: http://10.0.0.254:8082/routing-instance/3270ef1c-663d-40a0-974a-6a08857641f2 2025-10-07 15:49:03,783 - DEBUG - Requesting: http://10.0.0.254:8082/routing-instance/3270ef1c-663d-40a0-974a-6a08857641f2 2025-10-07 15:49:03,789 - DEBUG - Requesting: http://10.0.0.254:8082/route-target/824b4150-6da6-435f-ad14-f641473cd51f 2025-10-07 15:49:03,795 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-10-07 15:49:03,795 - DEBUG - Requesting: http://10.0.0.254:8082/virtual-network/bc10dafd-2b4d-448a-80ab-244f9e68f1eb 2025-10-07 15:49:03,804 - DEBUG - Requesting: http://10.0.0.254:8082/routing-instance/3270ef1c-663d-40a0-974a-6a08857641f2 2025-10-07 15:49:03,821 - INFO - Verified VN network id 11 for VN bc10dafd-2b4d-448a-80ab-244f9e68f1eb 2025-10-07 15:49:03,821 - INFO - Verifications in API Server for VN ctest-vn4-76412618 passed 2025-10-07 15:49:03,821 - DEBUG - Requesting: http://10.0.0.254:8082/virtual-network/bc10dafd-2b4d-448a-80ab-244f9e68f1eb 2025-10-07 15:49:03,831 - DEBUG - Requesting: http://10.0.0.254:8082/routing-instance/3270ef1c-663d-40a0-974a-6a08857641f2 2025-10-07 15:49:03,837 - DEBUG - Requesting: http://10.0.0.254:8082/routing-instance/3270ef1c-663d-40a0-974a-6a08857641f2 2025-10-07 15:49:03,844 - DEBUG - Requesting: http://10.0.0.254:8082/route-target/824b4150-6da6-435f-ad14-f641473cd51f 2025-10-07 15:49:03,858 - DEBUG - Control-node 10.0.0.254 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-69993102:ctest-vn4-76412618', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-69993102', 'owner-access': '7', 'group': 'admin', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '13551572059645887626', 'uuid-lslong': '9271544182250992107'}, 'enable': 'true', 'created': '2025-10-07T15:49:02', 'last-modified': '2025-10-07T15:49:03', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.755363'} 2025-10-07 15:49:03,864 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-10-07 15:49:03,864 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-76412618 passed 2025-10-07 15:49:03,864 - DEBUG - ====Verifying policy data for ctest-vn4-76412618 in API_Server ====== 2025-10-07 15:49:03,864 - DEBUG - Requesting: http://10.0.0.254:8082/domains 2025-10-07 15:49:03,870 - DEBUG - Requesting: http://10.0.0.254:8082/domain/dfa7a7b9-40e0-4046-a557-36da65b9b4a0 2025-10-07 15:49:03,880 - DEBUG - Requesting: http://10.0.0.254:8082/project/8a64558b-e5fe-484c-ab0a-4b3bcff4de6f 2025-10-07 15:49:03,954 - DEBUG - Requesting: http://10.0.0.254:8082/virtual-network/bc10dafd-2b4d-448a-80ab-244f9e68f1eb 2025-10-07 15:49:03,971 - DEBUG - ==>Verifying data for policy with id: fc0fe4ed-4c91-41c5-a670-5a2f0c223751, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-69993102', 'ctest-policy1-56014449'] 2025-10-07 15:49:03,971 - INFO - VN ctest-vn4-76412618 Policy verification: verify_vn_policy_in_api_server, status: True 2025-10-07 15:49:03,971 - DEBUG - Verifying the vn in opserver 2025-10-07 15:49:03,971 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-69993102:ctest-vn4-76412618 virtual network link through opserver 10.0.0.254 2025-10-07 15:49:03,971 - DEBUG - Requesting: http://10.0.0.254:8081/analytics/uves/virtual-networks 2025-10-07 15:49:04,311 - DEBUG - Requesting: http://10.0.0.254:8081/analytics/uves/virtual-networks 2025-10-07 15:49:04,389 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-69993102:ctest-vn4-76412618', 'href': 'http://10.0.0.254:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-69993102:ctest-vn4-76412618?flat'} 2025-10-07 15:49:04,389 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-69993102:ctest-vn4-76412618 is found in opserver 2025-10-07 15:49:04,400 - DEBUG - Do not have enough data to verify VN in agent 2025-10-07 15:49:04,405 - DEBUG - VRF ids for VN ctest-vn4-76412618: {} 2025-10-07 15:49:04,405 - DEBUG - ====Verifying data for ctest-policy1-56014449 in API_Server ====== 2025-10-07 15:49:04,405 - DEBUG - Requesting: http://10.0.0.254:8082/domains 2025-10-07 15:49:04,411 - DEBUG - Requesting: http://10.0.0.254:8082/domain/dfa7a7b9-40e0-4046-a557-36da65b9b4a0 2025-10-07 15:49:04,423 - DEBUG - Requesting: http://10.0.0.254:8082/project/8a64558b-e5fe-484c-ab0a-4b3bcff4de6f 2025-10-07 15:49:04,501 - DEBUG - Requesting: http://10.0.0.254:8082/network-policy/fc0fe4ed-4c91-41c5-a670-5a2f0c223751 2025-10-07 15:49:04,512 - INFO - Verified policy ctest-policy1-56014449 in API Server, Result: True 2025-10-07 15:49:04,512 - INFO - Done with setup and verification, moving onto test .. 2025-10-07 15:49:04,520 - INFO - Deleting VN ctest-vn4-76412618 2025-10-07 15:49:04,645 - DEBUG - Response for deleting network () 2025-10-07 15:49:04,645 - DEBUG - Requesting: http://10.0.0.254:8082/routing-instance/3270ef1c-663d-40a0-974a-6a08857641f2 2025-10-07 15:49:04,650 - DEBUG - Response Code: 404 2025-10-07 15:49:04,650 - DEBUG - Requesting: http://10.0.0.254:8082/domains 2025-10-07 15:49:04,719 - DEBUG - Requesting: http://10.0.0.254:8082/domain/dfa7a7b9-40e0-4046-a557-36da65b9b4a0 2025-10-07 15:49:04,736 - DEBUG - Requesting: http://10.0.0.254:8082/project/8a64558b-e5fe-484c-ab0a-4b3bcff4de6f 2025-10-07 15:49:04,814 - INFO - Validated that VN ctest-vn4-76412618 is not found in API Server 2025-10-07 15:49:04,826 - DEBUG - VN ctest-vn4-76412618 is not present in Agent 10.0.0.254 2025-10-07 15:49:04,826 - INFO - Validated that VN ctest-vn4-76412618 is not in any agent 2025-10-07 15:49:04,844 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-76412618 info 2025-10-07 15:49:04,868 - INFO - Deleted policy ctest-policy1-56014449 2025-10-07 15:49:05,033 - DEBUG - policy ctest-policy1-56014449 is not found in API Server 2025-10-07 15:49:05,290 - DEBUG - No XMPP flaps were noticed during the test 2025-10-07 15:49:05,290 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04] 2025-10-07 15:49:05,290 - INFO - -------------------------------------------------------------------------------- 2025-10-07 15:49:05,586 - DEBUG - No XMPP flaps were noticed during the test 2025-10-07 15:49:05,586 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:05] 2025-10-07 15:49:05,586 - INFO - -------------------------------------------------------------------------------- 2025-10-07 15:49:06,308 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-69993102, ID : 8a64558b-e5fe-484c-ab0a-4b3bcff4de6f