2026-03-24 14:38:50,667 - INFO - Domain Default found not creating 2026-03-24 14:38:50,826 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-52165454 not found, creating it 2026-03-24 14:38:51,282 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-52165454, ID : 91cd78f7-c00e-4030-8b8a-d7406037cedf 2026-03-24 14:38:52,720 - INFO - ================================================================================ 2026-03-24 14:38:52,720 - INFO - STARTING TEST : test_remove_policy_with_ref 2026-03-24 14:38:52,977 - DEBUG - Nothing to compare xmpp stats {'10.0.0.22': {'10.20.0.17': '0'}} with 2026-03-24 14:38:52,977 - INFO - Initial checks done. Running the testcase now 2026-03-24 14:38:52,977 - INFO - 2026-03-24 14:38:52,977 - INFO - ================================================================================ 2026-03-24 14:38:52,977 - INFO - STARTING TEST : test_remove_policy_with_ref 2026-03-24 14:38:52,977 - 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. 2026-03-24 14:38:53,267 - DEBUG - Nothing to compare xmpp stats {'10.0.0.22': {'10.20.0.17': '0'}} with 2026-03-24 14:38:53,267 - INFO - Initial checks done. Running the testcase now 2026-03-24 14:38:53,267 - INFO - 2026-03-24 14:38:53,629 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-52165454:ctest-vn4-03366847, 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-52165454:ctest-vn4-03366847, 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-52165454:ctest-vn4-03366847, 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-52165454:ctest-vn4-03366847, 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] 2026-03-24 14:38:54,131 - DEBUG - Response for create_network : {'network': {'id': '99260fca-6ead-4d3b-a0cd-f38c96949540', 'name': 'ctest-vn4-03366847', 'tenant_id': '91cd78f7c00e40308b8ad7406037cedf', 'project_id': '91cd78f7c00e40308b8ad7406037cedf', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-52165454', 'ctest-vn4-03366847'], 'port_security_enabled': True, 'description': ''}} 2026-03-24 14:38:54,291 - DEBUG - Response for create_subnet : {'subnet': {'id': 'c6ffdcda-3de5-48f7-9834-8d8ff30abc19', 'name': '', 'tenant_id': '91cd78f7c00e40308b8ad7406037cedf', 'network_id': '99260fca-6ead-4d3b-a0cd-f38c96949540', 'ip_version': 4, 'cidr': '182.33.229.64/26', 'allocation_pools': [{'start': '182.33.229.66', 'end': '182.33.229.126'}], 'gateway_ip': '182.33.229.65', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '182.33.229.66', 'tags': [], 'project_id': '91cd78f7c00e40308b8ad7406037cedf'}} 2026-03-24 14:38:54,430 - DEBUG - Response for create_subnet : {'subnet': {'id': '27b0d2af-ca0f-4142-90ee-d410feb203a2', 'name': '', 'tenant_id': '91cd78f7c00e40308b8ad7406037cedf', 'network_id': '99260fca-6ead-4d3b-a0cd-f38c96949540', 'ip_version': 6, 'cidr': '2403:bfa0:76bd:33f:3e80:dce5::/96', 'allocation_pools': [{'start': '2403:bfa0:76bd:33f:3e80:dce5:0:2', 'end': '2403:bfa0:76bd:33f:3e80:dce5:ffff:fffe'}], 'gateway_ip': '2403:bfa0:76bd:33f:3e80:dce5:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '2403:bfa0:76bd:33f:3e80:dce5:0:2', 'tags': [], 'project_id': '91cd78f7c00e40308b8ad7406037cedf'}} 2026-03-24 14:38:54,447 - INFO - Created VN ctest-vn4-03366847 2026-03-24 14:38:54,498 - DEBUG - VN ctest-vn4-03366847 UUID is 99260fca-6ead-4d3b-a0cd-f38c96949540 2026-03-24 14:38:54,684 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': '99260fca-6ead-4d3b-a0cd-f38c96949540', 'name': 'ctest-vn4-03366847', 'tenant_id': '91cd78f7c00e40308b8ad7406037cedf', 'project_id': '91cd78f7c00e40308b8ad7406037cedf', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['c6ffdcda-3de5-48f7-9834-8d8ff30abc19', '27b0d2af-ca0f-4142-90ee-d410feb203a2'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-52165454', 'ctest-vn4-03366847'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-52165454', 'ctest-policy1-12464533']], 'subnet_ipam': [{'subnet_cidr': '182.33.229.64/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '2403:bfa0:76bd:33f:3e80:dce5::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2026-03-24 14:38:54,842 - DEBUG - Requesting: http://10.0.0.22:8082/domains 2026-03-24 14:38:55,139 - DEBUG - Requesting: http://10.0.0.22:8082/domains 2026-03-24 14:38:55,174 - DEBUG - Requesting: http://10.0.0.22:8082/domain/a8453274-36c8-4c17-b371-2378d7f97245 2026-03-24 14:38:55,188 - DEBUG - Requesting: http://10.0.0.22:8082/project/91cd78f7-c00e-4030-8b8a-d7406037cedf 2026-03-24 14:38:55,263 - DEBUG - Requesting: http://10.0.0.22:8082/virtual-network/99260fca-6ead-4d3b-a0cd-f38c96949540 2026-03-24 14:38:55,275 - DEBUG - Requesting: http://10.0.0.22:8082/virtual-network/99260fca-6ead-4d3b-a0cd-f38c96949540 2026-03-24 14:38:55,285 - DEBUG - Requesting: http://10.0.0.22:8082/routing-instance/2c0c4334-b137-41eb-bec1-c121e6062605 2026-03-24 14:38:55,292 - DEBUG - Requesting: http://10.0.0.22:8082/routing-instance/2c0c4334-b137-41eb-bec1-c121e6062605 2026-03-24 14:38:55,297 - DEBUG - Requesting: http://10.0.0.22:8082/route-target/46a208ab-be45-47b0-a7ce-24a7b8def3a7 2026-03-24 14:38:55,303 - DEBUG - Route Targets: ['target:64512:8000004'] 2026-03-24 14:38:55,303 - DEBUG - Requesting: http://10.0.0.22:8082/virtual-network/99260fca-6ead-4d3b-a0cd-f38c96949540 2026-03-24 14:38:55,313 - DEBUG - Requesting: http://10.0.0.22:8082/routing-instance/2c0c4334-b137-41eb-bec1-c121e6062605 2026-03-24 14:38:55,326 - INFO - Verified VN network id 10 for VN 99260fca-6ead-4d3b-a0cd-f38c96949540 2026-03-24 14:38:55,326 - INFO - Verifications in API Server for VN ctest-vn4-03366847 passed 2026-03-24 14:38:55,326 - DEBUG - Requesting: http://10.0.0.22:8082/virtual-network/99260fca-6ead-4d3b-a0cd-f38c96949540 2026-03-24 14:38:55,335 - DEBUG - Requesting: http://10.0.0.22:8082/routing-instance/2c0c4334-b137-41eb-bec1-c121e6062605 2026-03-24 14:38:55,343 - DEBUG - Requesting: http://10.0.0.22:8082/routing-instance/2c0c4334-b137-41eb-bec1-c121e6062605 2026-03-24 14:38:55,349 - DEBUG - Requesting: http://10.0.0.22:8082/route-target/46a208ab-be45-47b0-a7ce-24a7b8def3a7 2026-03-24 14:38:55,360 - DEBUG - Control-node 10.0.0.22 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-52165454:ctest-vn4-03366847', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-52165454', 'owner-access': '7', 'group': 'admin', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '11035525299032640827', 'uuid-lslong': '11587185201441445184'}, 'enable': 'true', 'created': '2026-03-24T14:38:54', 'last-modified': '2026-03-24T14:38:54', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.697306'} 2026-03-24 14:38:55,365 - DEBUG - Route Targets: ['target:64512:8000004'] 2026-03-24 14:38:55,366 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-03366847 passed 2026-03-24 14:38:55,366 - DEBUG - ====Verifying policy data for ctest-vn4-03366847 in API_Server ====== 2026-03-24 14:38:55,366 - DEBUG - Requesting: http://10.0.0.22:8082/domains 2026-03-24 14:38:55,371 - DEBUG - Requesting: http://10.0.0.22:8082/domain/a8453274-36c8-4c17-b371-2378d7f97245 2026-03-24 14:38:55,381 - DEBUG - Requesting: http://10.0.0.22:8082/project/91cd78f7-c00e-4030-8b8a-d7406037cedf 2026-03-24 14:38:55,451 - DEBUG - Requesting: http://10.0.0.22:8082/virtual-network/99260fca-6ead-4d3b-a0cd-f38c96949540 2026-03-24 14:38:55,460 - DEBUG - ==>Verifying data for policy with id: b6ec6090-641f-4fd0-a71d-3b40f6baba5f, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-52165454', 'ctest-policy1-12464533'] 2026-03-24 14:38:55,460 - INFO - VN ctest-vn4-03366847 Policy verification: verify_vn_policy_in_api_server, status: True 2026-03-24 14:38:55,460 - DEBUG - Verifying the vn in opserver 2026-03-24 14:38:55,460 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-52165454:ctest-vn4-03366847 virtual network link through opserver 10.0.0.22 2026-03-24 14:38:55,460 - DEBUG - Requesting: http://10.0.0.22:8081/analytics/uves/virtual-networks 2026-03-24 14:38:55,754 - DEBUG - Requesting: http://10.0.0.22:8081/analytics/uves/virtual-networks 2026-03-24 14:38:55,819 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-52165454:ctest-vn4-03366847', 'href': 'http://10.0.0.22:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-52165454:ctest-vn4-03366847?flat'} 2026-03-24 14:38:55,819 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-52165454:ctest-vn4-03366847 is found in opserver 2026-03-24 14:38:55,827 - DEBUG - Do not have enough data to verify VN in agent 2026-03-24 14:38:55,830 - DEBUG - VRF ids for VN ctest-vn4-03366847: {} 2026-03-24 14:38:55,831 - DEBUG - ====Verifying data for ctest-policy1-12464533 in API_Server ====== 2026-03-24 14:38:55,831 - DEBUG - Requesting: http://10.0.0.22:8082/domains 2026-03-24 14:38:55,835 - DEBUG - Requesting: http://10.0.0.22:8082/domain/a8453274-36c8-4c17-b371-2378d7f97245 2026-03-24 14:38:55,850 - DEBUG - Requesting: http://10.0.0.22:8082/project/91cd78f7-c00e-4030-8b8a-d7406037cedf 2026-03-24 14:38:55,922 - DEBUG - Requesting: http://10.0.0.22:8082/network-policy/b6ec6090-641f-4fd0-a71d-3b40f6baba5f 2026-03-24 14:38:55,930 - INFO - Verified policy ctest-policy1-12464533 in API Server, Result: True 2026-03-24 14:38:55,930 - INFO - Done with setup and verification, moving onto test .. 2026-03-24 14:38:55,937 - INFO - Deleting VN ctest-vn4-03366847 2026-03-24 14:38:56,036 - DEBUG - Response for deleting network () 2026-03-24 14:38:56,036 - DEBUG - Requesting: http://10.0.0.22:8082/routing-instance/2c0c4334-b137-41eb-bec1-c121e6062605 2026-03-24 14:38:56,041 - DEBUG - Response Code: 404 2026-03-24 14:38:56,041 - DEBUG - Requesting: http://10.0.0.22:8082/domains 2026-03-24 14:38:56,046 - DEBUG - Requesting: http://10.0.0.22:8082/domain/a8453274-36c8-4c17-b371-2378d7f97245 2026-03-24 14:38:56,099 - DEBUG - Requesting: http://10.0.0.22:8082/project/91cd78f7-c00e-4030-8b8a-d7406037cedf 2026-03-24 14:38:56,174 - INFO - Validated that VN ctest-vn4-03366847 is not found in API Server 2026-03-24 14:38:56,183 - DEBUG - VN ctest-vn4-03366847 is not present in Agent 10.0.0.22 2026-03-24 14:38:56,183 - INFO - Validated that VN ctest-vn4-03366847 is not in any agent 2026-03-24 14:38:56,196 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-03366847 info 2026-03-24 14:38:56,221 - INFO - Deleted policy ctest-policy1-12464533 2026-03-24 14:38:56,382 - DEBUG - policy ctest-policy1-12464533 is not found in API Server 2026-03-24 14:38:56,638 - DEBUG - No XMPP flaps were noticed during the test 2026-03-24 14:38:56,638 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04] 2026-03-24 14:38:56,638 - INFO - -------------------------------------------------------------------------------- 2026-03-24 14:38:56,927 - DEBUG - No XMPP flaps were noticed during the test 2026-03-24 14:38:56,927 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04] 2026-03-24 14:38:56,927 - INFO - -------------------------------------------------------------------------------- 2026-03-24 14:38:57,587 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-52165454, ID : 91cd78f7-c00e-4030-8b8a-d7406037cedf