2025-11-20 13:43:41,094 - INFO - Domain Default found not creating 2025-11-20 13:43:41,398 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-83120853 not found, creating it 2025-11-20 13:43:41,915 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-83120853, ID : 0012afe7-ec03-4920-9d03-a801845c00fb 2025-11-20 13:43:43,818 - INFO - ================================================================================ 2025-11-20 13:43:43,818 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-11-20 13:43:44,108 - DEBUG - Nothing to compare xmpp stats {'10.0.0.49': {'10.20.0.249': '0'}} with 2025-11-20 13:43:44,108 - INFO - Initial checks done. Running the testcase now 2025-11-20 13:43:44,108 - INFO - 2025-11-20 13:43:44,108 - INFO - ================================================================================ 2025-11-20 13:43:44,108 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-11-20 13:43:44,109 - 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-11-20 13:43:44,459 - DEBUG - Nothing to compare xmpp stats {'10.0.0.49': {'10.20.0.249': '0'}} with 2025-11-20 13:43:44,459 - INFO - Initial checks done. Running the testcase now 2025-11-20 13:43:44,459 - INFO - 2025-11-20 13:43:44,964 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-83120853:ctest-vn4-95900064, 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-83120853:ctest-vn4-95900064, 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-83120853:ctest-vn4-95900064, 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-83120853:ctest-vn4-95900064, 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-11-20 13:43:45,634 - DEBUG - Response for create_network : {'network': {'id': '6267d292-9fcc-412b-9618-ad07c5fad5d9', 'name': 'ctest-vn4-95900064', 'tenant_id': '0012afe7ec0349209d03a801845c00fb', 'project_id': '0012afe7ec0349209d03a801845c00fb', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-83120853', 'ctest-vn4-95900064'], 'port_security_enabled': True, 'description': ''}} 2025-11-20 13:43:45,907 - DEBUG - Response for create_subnet : {'subnet': {'id': '6f1453a2-6869-4f44-8554-6b33526c7e06', 'name': '', 'tenant_id': '0012afe7ec0349209d03a801845c00fb', 'network_id': '6267d292-9fcc-412b-9618-ad07c5fad5d9', 'ip_version': 4, 'cidr': '33.203.148.128/26', 'allocation_pools': [{'start': '33.203.148.130', 'end': '33.203.148.190'}], 'gateway_ip': '33.203.148.129', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '33.203.148.130', 'tags': [], 'project_id': '0012afe7ec0349209d03a801845c00fb'}} 2025-11-20 13:43:46,124 - DEBUG - Response for create_subnet : {'subnet': {'id': '7c519074-8849-450a-8059-d7dd94f8dacd', 'name': '', 'tenant_id': '0012afe7ec0349209d03a801845c00fb', 'network_id': '6267d292-9fcc-412b-9618-ad07c5fad5d9', 'ip_version': 6, 'cidr': '25fb:b1df:8276:e96c:24fe:6cd3::/96', 'allocation_pools': [{'start': '25fb:b1df:8276:e96c:24fe:6cd3:0:2', 'end': '25fb:b1df:8276:e96c:24fe:6cd3:ffff:fffe'}], 'gateway_ip': '25fb:b1df:8276:e96c:24fe:6cd3:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '25fb:b1df:8276:e96c:24fe:6cd3:0:2', 'tags': [], 'project_id': '0012afe7ec0349209d03a801845c00fb'}} 2025-11-20 13:43:46,167 - INFO - Created VN ctest-vn4-95900064 2025-11-20 13:43:46,223 - DEBUG - VN ctest-vn4-95900064 UUID is 6267d292-9fcc-412b-9618-ad07c5fad5d9 2025-11-20 13:43:46,485 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': '6267d292-9fcc-412b-9618-ad07c5fad5d9', 'name': 'ctest-vn4-95900064', 'tenant_id': '0012afe7ec0349209d03a801845c00fb', 'project_id': '0012afe7ec0349209d03a801845c00fb', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['6f1453a2-6869-4f44-8554-6b33526c7e06', '7c519074-8849-450a-8059-d7dd94f8dacd'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-83120853', 'ctest-vn4-95900064'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-83120853', 'ctest-policy1-78384248']], 'subnet_ipam': [{'subnet_cidr': '33.203.148.128/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '25fb:b1df:8276:e96c:24fe:6cd3::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2025-11-20 13:43:46,651 - DEBUG - Requesting: http://10.0.0.49:8082/domains 2025-11-20 13:43:46,978 - DEBUG - Requesting: http://10.0.0.49:8082/domains 2025-11-20 13:43:47,015 - DEBUG - Requesting: http://10.0.0.49:8082/domain/ebb41f27-7f4d-4f6b-8b76-984add42501d 2025-11-20 13:43:47,031 - DEBUG - Requesting: http://10.0.0.49:8082/project/0012afe7-ec03-4920-9d03-a801845c00fb 2025-11-20 13:43:47,157 - DEBUG - Requesting: http://10.0.0.49:8082/virtual-network/6267d292-9fcc-412b-9618-ad07c5fad5d9 2025-11-20 13:43:47,181 - DEBUG - Requesting: http://10.0.0.49:8082/virtual-network/6267d292-9fcc-412b-9618-ad07c5fad5d9 2025-11-20 13:43:47,201 - DEBUG - Requesting: http://10.0.0.49:8082/routing-instance/bfef9dce-b310-4287-8865-760f840f998f 2025-11-20 13:43:47,214 - DEBUG - Requesting: http://10.0.0.49:8082/routing-instance/bfef9dce-b310-4287-8865-760f840f998f 2025-11-20 13:43:47,226 - DEBUG - Requesting: http://10.0.0.49:8082/route-target/76311c69-b475-4357-9259-c0024f758875 2025-11-20 13:43:47,238 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-11-20 13:43:47,238 - DEBUG - Requesting: http://10.0.0.49:8082/virtual-network/6267d292-9fcc-412b-9618-ad07c5fad5d9 2025-11-20 13:43:47,260 - DEBUG - Requesting: http://10.0.0.49:8082/routing-instance/bfef9dce-b310-4287-8865-760f840f998f 2025-11-20 13:43:47,285 - INFO - Verified VN network id 11 for VN 6267d292-9fcc-412b-9618-ad07c5fad5d9 2025-11-20 13:43:47,285 - INFO - Verifications in API Server for VN ctest-vn4-95900064 passed 2025-11-20 13:43:47,285 - DEBUG - Requesting: http://10.0.0.49:8082/virtual-network/6267d292-9fcc-412b-9618-ad07c5fad5d9 2025-11-20 13:43:47,301 - DEBUG - Requesting: http://10.0.0.49:8082/routing-instance/bfef9dce-b310-4287-8865-760f840f998f 2025-11-20 13:43:47,312 - DEBUG - Requesting: http://10.0.0.49:8082/routing-instance/bfef9dce-b310-4287-8865-760f840f998f 2025-11-20 13:43:47,326 - DEBUG - Requesting: http://10.0.0.49:8082/route-target/76311c69-b475-4357-9259-c0024f758875 2025-11-20 13:43:47,350 - DEBUG - Control-node 10.0.0.49 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-83120853:ctest-vn4-95900064', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-83120853', 'owner-access': '7', 'group': 'reader', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '7090867665506156843', 'uuid-lslong': '10815584754028172761'}, 'enable': 'true', 'created': '2025-11-20T13:43:45', 'last-modified': '2025-11-20T13:43:46', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.896577'} 2025-11-20 13:43:47,361 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-11-20 13:43:47,361 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-95900064 passed 2025-11-20 13:43:47,362 - DEBUG - ====Verifying policy data for ctest-vn4-95900064 in API_Server ====== 2025-11-20 13:43:47,362 - DEBUG - Requesting: http://10.0.0.49:8082/domains 2025-11-20 13:43:47,370 - DEBUG - Requesting: http://10.0.0.49:8082/domain/ebb41f27-7f4d-4f6b-8b76-984add42501d 2025-11-20 13:43:47,389 - DEBUG - Requesting: http://10.0.0.49:8082/project/0012afe7-ec03-4920-9d03-a801845c00fb 2025-11-20 13:43:47,497 - DEBUG - Requesting: http://10.0.0.49:8082/virtual-network/6267d292-9fcc-412b-9618-ad07c5fad5d9 2025-11-20 13:43:47,516 - DEBUG - ==>Verifying data for policy with id: 3157b937-d18e-4265-abe3-30134483699f, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-83120853', 'ctest-policy1-78384248'] 2025-11-20 13:43:47,516 - INFO - VN ctest-vn4-95900064 Policy verification: verify_vn_policy_in_api_server, status: True 2025-11-20 13:43:47,516 - DEBUG - Verifying the vn in opserver 2025-11-20 13:43:47,516 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-83120853:ctest-vn4-95900064 virtual network link through opserver 10.0.0.49 2025-11-20 13:43:47,516 - DEBUG - Requesting: http://10.0.0.49:8081/analytics/uves/virtual-networks 2025-11-20 13:43:47,814 - DEBUG - Requesting: http://10.0.0.49:8081/analytics/uves/virtual-networks 2025-11-20 13:43:47,904 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-83120853:ctest-vn4-95900064', 'href': 'http://10.0.0.49:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-83120853:ctest-vn4-95900064?flat'} 2025-11-20 13:43:47,904 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-83120853:ctest-vn4-95900064 is found in opserver 2025-11-20 13:43:47,916 - DEBUG - Do not have enough data to verify VN in agent 2025-11-20 13:43:47,923 - DEBUG - VRF ids for VN ctest-vn4-95900064: {} 2025-11-20 13:43:47,923 - DEBUG - ====Verifying data for ctest-policy1-78384248 in API_Server ====== 2025-11-20 13:43:47,924 - DEBUG - Requesting: http://10.0.0.49:8082/domains 2025-11-20 13:43:47,931 - DEBUG - Requesting: http://10.0.0.49:8082/domain/ebb41f27-7f4d-4f6b-8b76-984add42501d 2025-11-20 13:43:47,951 - DEBUG - Requesting: http://10.0.0.49:8082/project/0012afe7-ec03-4920-9d03-a801845c00fb 2025-11-20 13:43:48,038 - DEBUG - Requesting: http://10.0.0.49:8082/network-policy/3157b937-d18e-4265-abe3-30134483699f 2025-11-20 13:43:48,054 - INFO - Verified policy ctest-policy1-78384248 in API Server, Result: True 2025-11-20 13:43:48,054 - INFO - Done with setup and verification, moving onto test .. 2025-11-20 13:43:48,065 - INFO - Deleting VN ctest-vn4-95900064 2025-11-20 13:43:48,220 - DEBUG - Response for deleting network () 2025-11-20 13:43:48,220 - DEBUG - Requesting: http://10.0.0.49:8082/routing-instance/bfef9dce-b310-4287-8865-760f840f998f 2025-11-20 13:43:48,225 - DEBUG - Response Code: 404 2025-11-20 13:43:48,225 - DEBUG - Requesting: http://10.0.0.49:8082/domains 2025-11-20 13:43:48,231 - DEBUG - Requesting: http://10.0.0.49:8082/domain/ebb41f27-7f4d-4f6b-8b76-984add42501d 2025-11-20 13:43:48,285 - DEBUG - Requesting: http://10.0.0.49:8082/project/0012afe7-ec03-4920-9d03-a801845c00fb 2025-11-20 13:43:48,379 - INFO - Validated that VN ctest-vn4-95900064 is not found in API Server 2025-11-20 13:43:48,393 - DEBUG - VN ctest-vn4-95900064 is not present in Agent 10.0.0.49 2025-11-20 13:43:48,393 - INFO - Validated that VN ctest-vn4-95900064 is not in any agent 2025-11-20 13:43:48,412 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-95900064 info 2025-11-20 13:43:48,452 - INFO - Deleted policy ctest-policy1-78384248 2025-11-20 13:43:48,634 - DEBUG - policy ctest-policy1-78384248 is not found in API Server 2025-11-20 13:43:48,915 - DEBUG - No XMPP flaps were noticed during the test 2025-11-20 13:43:48,915 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04] 2025-11-20 13:43:48,915 - INFO - -------------------------------------------------------------------------------- 2025-11-20 13:43:49,241 - DEBUG - No XMPP flaps were noticed during the test 2025-11-20 13:43:49,241 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:06] 2025-11-20 13:43:49,241 - INFO - -------------------------------------------------------------------------------- 2025-11-20 13:43:49,974 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-83120853, ID : 0012afe7-ec03-4920-9d03-a801845c00fb