2025-08-22 13:55:21,536 - INFO - Domain Default found not creating 2025-08-22 13:55:21,694 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-32717089 not found, creating it 2025-08-22 13:55:22,149 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-32717089, ID : 83131f33-4243-4131-8910-6377c090f4a1 2025-08-22 13:55:23,524 - INFO - ================================================================================ 2025-08-22 13:55:23,524 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-08-22 13:55:23,783 - DEBUG - Nothing to compare xmpp stats {'10.0.0.38': {'10.20.0.17': '0'}} with 2025-08-22 13:55:23,783 - INFO - Initial checks done. Running the testcase now 2025-08-22 13:55:23,783 - INFO - 2025-08-22 13:55:23,783 - INFO - ================================================================================ 2025-08-22 13:55:23,783 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-08-22 13:55:23,783 - 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-08-22 13:55:24,078 - DEBUG - Nothing to compare xmpp stats {'10.0.0.38': {'10.20.0.17': '0'}} with 2025-08-22 13:55:24,078 - INFO - Initial checks done. Running the testcase now 2025-08-22 13:55:24,078 - INFO - 2025-08-22 13:55:24,421 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-32717089:ctest-vn4-11653825, 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-32717089:ctest-vn4-11653825, 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-32717089:ctest-vn4-11653825, 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-32717089:ctest-vn4-11653825, 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-08-22 13:55:24,943 - DEBUG - Response for create_network : {'network': {'id': 'da267c96-729e-4db4-aad1-65fad7238fcf', 'name': 'ctest-vn4-11653825', 'tenant_id': '83131f334243413189106377c090f4a1', 'project_id': '83131f334243413189106377c090f4a1', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-32717089', 'ctest-vn4-11653825'], 'port_security_enabled': True, 'description': ''}} 2025-08-22 13:55:25,110 - DEBUG - Response for create_subnet : {'subnet': {'id': '14a1b092-818a-4938-95e7-f581155bd03a', 'name': '', 'tenant_id': '83131f334243413189106377c090f4a1', 'network_id': 'da267c96-729e-4db4-aad1-65fad7238fcf', 'ip_version': 4, 'cidr': '216.253.228.0/26', 'allocation_pools': [{'start': '216.253.228.2', 'end': '216.253.228.62'}], 'gateway_ip': '216.253.228.1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '216.253.228.2', 'tags': [], 'project_id': '83131f334243413189106377c090f4a1'}} 2025-08-22 13:55:25,281 - DEBUG - Response for create_subnet : {'subnet': {'id': '4d7d4ef1-2c38-4b5d-9b04-df9b8a4bc30d', 'name': '', 'tenant_id': '83131f334243413189106377c090f4a1', 'network_id': 'da267c96-729e-4db4-aad1-65fad7238fcf', 'ip_version': 6, 'cidr': '2cd0:941:eb1:388a:cfa9:a335::/96', 'allocation_pools': [{'start': '2cd0:941:eb1:388a:cfa9:a335:0:2', 'end': '2cd0:941:eb1:388a:cfa9:a335:ffff:fffe'}], 'gateway_ip': '2cd0:941:eb1:388a:cfa9:a335:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '2cd0:941:eb1:388a:cfa9:a335:0:2', 'tags': [], 'project_id': '83131f334243413189106377c090f4a1'}} 2025-08-22 13:55:25,300 - INFO - Created VN ctest-vn4-11653825 2025-08-22 13:55:25,357 - DEBUG - VN ctest-vn4-11653825 UUID is da267c96-729e-4db4-aad1-65fad7238fcf 2025-08-22 13:55:25,576 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': 'da267c96-729e-4db4-aad1-65fad7238fcf', 'name': 'ctest-vn4-11653825', 'tenant_id': '83131f334243413189106377c090f4a1', 'project_id': '83131f334243413189106377c090f4a1', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['14a1b092-818a-4938-95e7-f581155bd03a', '4d7d4ef1-2c38-4b5d-9b04-df9b8a4bc30d'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-32717089', 'ctest-vn4-11653825'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-32717089', 'ctest-policy1-80646900']], 'subnet_ipam': [{'subnet_cidr': '216.253.228.0/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '2cd0:941:eb1:388a:cfa9:a335::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2025-08-22 13:55:25,745 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2025-08-22 13:55:26,039 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2025-08-22 13:55:26,068 - DEBUG - Requesting: http://10.0.0.38:8082/domain/04ea8c22-e375-40ac-af44-d1fa6999dd92 2025-08-22 13:55:26,080 - DEBUG - Requesting: http://10.0.0.38:8082/project/83131f33-4243-4131-8910-6377c090f4a1 2025-08-22 13:55:26,152 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/da267c96-729e-4db4-aad1-65fad7238fcf 2025-08-22 13:55:26,164 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/da267c96-729e-4db4-aad1-65fad7238fcf 2025-08-22 13:55:26,174 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/13770722-0e9e-45cb-b897-71424d3408dd 2025-08-22 13:55:26,181 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/13770722-0e9e-45cb-b897-71424d3408dd 2025-08-22 13:55:26,187 - DEBUG - Requesting: http://10.0.0.38:8082/route-target/1d791063-7a2b-4364-99b3-110537daab86 2025-08-22 13:55:26,196 - DEBUG - Route Targets: ['target:64512:8000005'] 2025-08-22 13:55:26,196 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/da267c96-729e-4db4-aad1-65fad7238fcf 2025-08-22 13:55:26,205 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/13770722-0e9e-45cb-b897-71424d3408dd 2025-08-22 13:55:26,220 - INFO - Verified VN network id 10 for VN da267c96-729e-4db4-aad1-65fad7238fcf 2025-08-22 13:55:26,220 - INFO - Verifications in API Server for VN ctest-vn4-11653825 passed 2025-08-22 13:55:26,220 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/da267c96-729e-4db4-aad1-65fad7238fcf 2025-08-22 13:55:26,230 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/13770722-0e9e-45cb-b897-71424d3408dd 2025-08-22 13:55:26,238 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/13770722-0e9e-45cb-b897-71424d3408dd 2025-08-22 13:55:26,245 - DEBUG - Requesting: http://10.0.0.38:8082/route-target/1d791063-7a2b-4364-99b3-110537daab86 2025-08-22 13:55:26,259 - DEBUG - Control-node 10.0.0.38 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-32717089:ctest-vn4-11653825', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-32717089', 'owner-access': '7', 'group': 'admin', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '15719388534993210804', 'uuid-lslong': '12308731384605937615'}, 'enable': 'true', 'created': '2025-08-22T13:55:24', 'last-modified': '2025-08-22T13:55:25', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.722509'} 2025-08-22 13:55:26,267 - DEBUG - Route Targets: ['target:64512:8000005'] 2025-08-22 13:55:26,267 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-11653825 passed 2025-08-22 13:55:26,267 - DEBUG - ====Verifying policy data for ctest-vn4-11653825 in API_Server ====== 2025-08-22 13:55:26,267 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2025-08-22 13:55:26,273 - DEBUG - Requesting: http://10.0.0.38:8082/domain/04ea8c22-e375-40ac-af44-d1fa6999dd92 2025-08-22 13:55:26,284 - DEBUG - Requesting: http://10.0.0.38:8082/project/83131f33-4243-4131-8910-6377c090f4a1 2025-08-22 13:55:26,359 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/da267c96-729e-4db4-aad1-65fad7238fcf 2025-08-22 13:55:26,372 - DEBUG - ==>Verifying data for policy with id: 79819e6c-5dbb-4ed9-817d-41452626aa97, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-32717089', 'ctest-policy1-80646900'] 2025-08-22 13:55:26,372 - INFO - VN ctest-vn4-11653825 Policy verification: verify_vn_policy_in_api_server, status: True 2025-08-22 13:55:26,372 - DEBUG - Verifying the vn in opserver 2025-08-22 13:55:26,372 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-32717089:ctest-vn4-11653825 virtual network link through opserver 10.0.0.38 2025-08-22 13:55:26,372 - DEBUG - Requesting: http://10.0.0.38:8081/analytics/uves/virtual-networks 2025-08-22 13:55:26,669 - DEBUG - Requesting: http://10.0.0.38:8081/analytics/uves/virtual-networks 2025-08-22 13:55:26,744 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-32717089:ctest-vn4-11653825', 'href': 'http://10.0.0.38:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-32717089:ctest-vn4-11653825?flat'} 2025-08-22 13:55:26,744 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-32717089:ctest-vn4-11653825 is found in opserver 2025-08-22 13:55:26,754 - DEBUG - Do not have enough data to verify VN in agent 2025-08-22 13:55:26,758 - DEBUG - VRF ids for VN ctest-vn4-11653825: {} 2025-08-22 13:55:26,758 - DEBUG - ====Verifying data for ctest-policy1-80646900 in API_Server ====== 2025-08-22 13:55:26,758 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2025-08-22 13:55:26,780 - DEBUG - Requesting: http://10.0.0.38:8082/domain/04ea8c22-e375-40ac-af44-d1fa6999dd92 2025-08-22 13:55:26,811 - DEBUG - Requesting: http://10.0.0.38:8082/project/83131f33-4243-4131-8910-6377c090f4a1 2025-08-22 13:55:26,928 - DEBUG - Requesting: http://10.0.0.38:8082/network-policy/79819e6c-5dbb-4ed9-817d-41452626aa97 2025-08-22 13:55:26,961 - INFO - Verified policy ctest-policy1-80646900 in API Server, Result: True 2025-08-22 13:55:26,961 - INFO - Done with setup and verification, moving onto test .. 2025-08-22 13:55:26,971 - INFO - Deleting VN ctest-vn4-11653825 2025-08-22 13:55:27,318 - DEBUG - Response for deleting network () 2025-08-22 13:55:27,318 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/13770722-0e9e-45cb-b897-71424d3408dd 2025-08-22 13:55:27,327 - DEBUG - Response Code: 404 2025-08-22 13:55:27,327 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2025-08-22 13:55:27,339 - DEBUG - Requesting: http://10.0.0.38:8082/domain/04ea8c22-e375-40ac-af44-d1fa6999dd92 2025-08-22 13:55:27,365 - DEBUG - Requesting: http://10.0.0.38:8082/project/83131f33-4243-4131-8910-6377c090f4a1 2025-08-22 13:55:27,454 - INFO - Validated that VN ctest-vn4-11653825 is not found in API Server 2025-08-22 13:55:27,467 - DEBUG - VN ctest-vn4-11653825 is not present in Agent 10.0.0.38 2025-08-22 13:55:27,467 - INFO - Validated that VN ctest-vn4-11653825 is not in any agent 2025-08-22 13:55:27,489 - DEBUG - Control-node config DB still has VN ctest-vn4-11653825 2025-08-22 13:55:32,501 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-11653825 info 2025-08-22 13:55:32,535 - INFO - Deleted policy ctest-policy1-80646900 2025-08-22 13:55:32,721 - DEBUG - policy ctest-policy1-80646900 is not found in API Server 2025-08-22 13:55:32,986 - DEBUG - No XMPP flaps were noticed during the test 2025-08-22 13:55:32,986 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:09] 2025-08-22 13:55:32,986 - INFO - -------------------------------------------------------------------------------- 2025-08-22 13:55:33,276 - DEBUG - No XMPP flaps were noticed during the test 2025-08-22 13:55:33,276 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:10] 2025-08-22 13:55:33,276 - INFO - -------------------------------------------------------------------------------- 2025-08-22 13:55:34,010 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-32717089, ID : 83131f33-4243-4131-8910-6377c090f4a1