2026-01-30 13:40:31,846 - INFO - Domain Default found not creating 2026-01-30 13:40:31,991 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-69216671 not found, creating it 2026-01-30 13:40:32,465 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-69216671, ID : ec5ad7d0-37e2-43dd-854f-749d2223d39f 2026-01-30 13:40:33,913 - INFO - ================================================================================ 2026-01-30 13:40:33,913 - INFO - STARTING TEST : test_remove_policy_with_ref 2026-01-30 13:40:34,166 - DEBUG - Nothing to compare xmpp stats {'10.0.0.38': {'10.20.0.254': '0'}} with 2026-01-30 13:40:34,166 - INFO - Initial checks done. Running the testcase now 2026-01-30 13:40:34,167 - INFO - 2026-01-30 13:40:34,167 - INFO - ================================================================================ 2026-01-30 13:40:34,167 - INFO - STARTING TEST : test_remove_policy_with_ref 2026-01-30 13:40:34,167 - 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-01-30 13:40:34,468 - DEBUG - Nothing to compare xmpp stats {'10.0.0.38': {'10.20.0.254': '0'}} with 2026-01-30 13:40:34,468 - INFO - Initial checks done. Running the testcase now 2026-01-30 13:40:34,468 - INFO - 2026-01-30 13:40:34,818 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-69216671:ctest-vn4-57340039, 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-69216671:ctest-vn4-57340039, 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-69216671:ctest-vn4-57340039, 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-69216671:ctest-vn4-57340039, 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-01-30 13:40:35,314 - DEBUG - Response for create_network : {'network': {'id': 'ba23dea1-ba0b-4812-8d82-76227be36a4a', 'name': 'ctest-vn4-57340039', 'tenant_id': 'ec5ad7d037e243dd854f749d2223d39f', 'project_id': 'ec5ad7d037e243dd854f749d2223d39f', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-69216671', 'ctest-vn4-57340039'], 'port_security_enabled': True, 'description': ''}} 2026-01-30 13:40:35,477 - DEBUG - Response for create_subnet : {'subnet': {'id': '985daeb7-0768-4ab3-ac4b-d57dbabb1adb', 'name': '', 'tenant_id': 'ec5ad7d037e243dd854f749d2223d39f', 'network_id': 'ba23dea1-ba0b-4812-8d82-76227be36a4a', 'ip_version': 4, 'cidr': '120.116.59.64/26', 'allocation_pools': [{'start': '120.116.59.66', 'end': '120.116.59.126'}], 'gateway_ip': '120.116.59.65', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '120.116.59.66', 'tags': [], 'project_id': 'ec5ad7d037e243dd854f749d2223d39f'}} 2026-01-30 13:40:35,671 - DEBUG - Response for create_subnet : {'subnet': {'id': 'f55f1f4a-2c9a-4333-848a-5f671d8041b1', 'name': '', 'tenant_id': 'ec5ad7d037e243dd854f749d2223d39f', 'network_id': 'ba23dea1-ba0b-4812-8d82-76227be36a4a', 'ip_version': 6, 'cidr': '289f:2620:641e:60cf:ac45:d53::/96', 'allocation_pools': [{'start': '289f:2620:641e:60cf:ac45:d53:0:2', 'end': '289f:2620:641e:60cf:ac45:d53:ffff:fffe'}], 'gateway_ip': '289f:2620:641e:60cf:ac45:d53:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '289f:2620:641e:60cf:ac45:d53:0:2', 'tags': [], 'project_id': 'ec5ad7d037e243dd854f749d2223d39f'}} 2026-01-30 13:40:35,689 - INFO - Created VN ctest-vn4-57340039 2026-01-30 13:40:35,741 - DEBUG - VN ctest-vn4-57340039 UUID is ba23dea1-ba0b-4812-8d82-76227be36a4a 2026-01-30 13:40:35,928 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': 'ba23dea1-ba0b-4812-8d82-76227be36a4a', 'name': 'ctest-vn4-57340039', 'tenant_id': 'ec5ad7d037e243dd854f749d2223d39f', 'project_id': 'ec5ad7d037e243dd854f749d2223d39f', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['985daeb7-0768-4ab3-ac4b-d57dbabb1adb', 'f55f1f4a-2c9a-4333-848a-5f671d8041b1'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-69216671', 'ctest-vn4-57340039'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-69216671', 'ctest-policy1-49644785']], 'subnet_ipam': [{'subnet_cidr': '120.116.59.64/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '289f:2620:641e:60cf:ac45:d53::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2026-01-30 13:40:36,097 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2026-01-30 13:40:36,389 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2026-01-30 13:40:36,419 - DEBUG - Requesting: http://10.0.0.38:8082/domain/2f092540-2be0-41f0-a91f-c975c7de479c 2026-01-30 13:40:36,430 - DEBUG - Requesting: http://10.0.0.38:8082/project/ec5ad7d0-37e2-43dd-854f-749d2223d39f 2026-01-30 13:40:36,497 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/ba23dea1-ba0b-4812-8d82-76227be36a4a 2026-01-30 13:40:36,507 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/ba23dea1-ba0b-4812-8d82-76227be36a4a 2026-01-30 13:40:36,516 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/d9c0f9a7-5fa4-4e6a-9fec-fa882b0f9310 2026-01-30 13:40:36,522 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/d9c0f9a7-5fa4-4e6a-9fec-fa882b0f9310 2026-01-30 13:40:36,528 - DEBUG - Requesting: http://10.0.0.38:8082/route-target/377be888-a431-485b-89c5-76e59493655b 2026-01-30 13:40:36,533 - DEBUG - Route Targets: ['target:64512:8000004'] 2026-01-30 13:40:36,533 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/ba23dea1-ba0b-4812-8d82-76227be36a4a 2026-01-30 13:40:36,541 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/d9c0f9a7-5fa4-4e6a-9fec-fa882b0f9310 2026-01-30 13:40:36,552 - INFO - Verified VN network id 12 for VN ba23dea1-ba0b-4812-8d82-76227be36a4a 2026-01-30 13:40:36,552 - INFO - Verifications in API Server for VN ctest-vn4-57340039 passed 2026-01-30 13:40:36,552 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/ba23dea1-ba0b-4812-8d82-76227be36a4a 2026-01-30 13:40:36,559 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/d9c0f9a7-5fa4-4e6a-9fec-fa882b0f9310 2026-01-30 13:40:36,566 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/d9c0f9a7-5fa4-4e6a-9fec-fa882b0f9310 2026-01-30 13:40:36,571 - DEBUG - Requesting: http://10.0.0.38:8082/route-target/377be888-a431-485b-89c5-76e59493655b 2026-01-30 13:40:36,580 - DEBUG - Control-node 10.0.0.38 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-69216671:ctest-vn4-57340039', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-69216671', 'owner-access': '7', 'group': 'admin', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '13412808901431871506', 'uuid-lslong': '10196842396799691338'}, 'enable': 'true', 'created': '2026-01-30T13:40:35', 'last-modified': '2026-01-30T13:40:35', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.674803'} 2026-01-30 13:40:36,585 - DEBUG - Route Targets: ['target:64512:8000004'] 2026-01-30 13:40:36,585 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-57340039 passed 2026-01-30 13:40:36,586 - DEBUG - ====Verifying policy data for ctest-vn4-57340039 in API_Server ====== 2026-01-30 13:40:36,586 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2026-01-30 13:40:36,590 - DEBUG - Requesting: http://10.0.0.38:8082/domain/2f092540-2be0-41f0-a91f-c975c7de479c 2026-01-30 13:40:36,600 - DEBUG - Requesting: http://10.0.0.38:8082/project/ec5ad7d0-37e2-43dd-854f-749d2223d39f 2026-01-30 13:40:36,670 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/ba23dea1-ba0b-4812-8d82-76227be36a4a 2026-01-30 13:40:36,680 - DEBUG - ==>Verifying data for policy with id: 933367c4-d17b-4d3b-8b4b-dd5711388bfa, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-69216671', 'ctest-policy1-49644785'] 2026-01-30 13:40:36,680 - INFO - VN ctest-vn4-57340039 Policy verification: verify_vn_policy_in_api_server, status: True 2026-01-30 13:40:36,680 - DEBUG - Verifying the vn in opserver 2026-01-30 13:40:36,680 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-69216671:ctest-vn4-57340039 virtual network link through opserver 10.0.0.38 2026-01-30 13:40:36,680 - DEBUG - Requesting: http://10.0.0.38:8081/analytics/uves/virtual-networks 2026-01-30 13:40:36,976 - DEBUG - Requesting: http://10.0.0.38:8081/analytics/uves/virtual-networks 2026-01-30 13:40:37,034 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-69216671:ctest-vn4-57340039', 'href': 'http://10.0.0.38:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-69216671:ctest-vn4-57340039?flat'} 2026-01-30 13:40:37,034 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-69216671:ctest-vn4-57340039 is found in opserver 2026-01-30 13:40:37,042 - DEBUG - Do not have enough data to verify VN in agent 2026-01-30 13:40:37,047 - DEBUG - VRF ids for VN ctest-vn4-57340039: {} 2026-01-30 13:40:37,047 - DEBUG - ====Verifying data for ctest-policy1-49644785 in API_Server ====== 2026-01-30 13:40:37,047 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2026-01-30 13:40:37,052 - DEBUG - Requesting: http://10.0.0.38:8082/domain/2f092540-2be0-41f0-a91f-c975c7de479c 2026-01-30 13:40:37,062 - DEBUG - Requesting: http://10.0.0.38:8082/project/ec5ad7d0-37e2-43dd-854f-749d2223d39f 2026-01-30 13:40:37,129 - DEBUG - Requesting: http://10.0.0.38:8082/network-policy/933367c4-d17b-4d3b-8b4b-dd5711388bfa 2026-01-30 13:40:37,137 - INFO - Verified policy ctest-policy1-49644785 in API Server, Result: True 2026-01-30 13:40:37,137 - INFO - Done with setup and verification, moving onto test .. 2026-01-30 13:40:37,143 - INFO - Deleting VN ctest-vn4-57340039 2026-01-30 13:40:37,254 - DEBUG - Response for deleting network () 2026-01-30 13:40:37,254 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/d9c0f9a7-5fa4-4e6a-9fec-fa882b0f9310 2026-01-30 13:40:37,259 - DEBUG - Response Code: 404 2026-01-30 13:40:37,259 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2026-01-30 13:40:37,265 - DEBUG - Requesting: http://10.0.0.38:8082/domain/2f092540-2be0-41f0-a91f-c975c7de479c 2026-01-30 13:40:37,318 - DEBUG - Requesting: http://10.0.0.38:8082/project/ec5ad7d0-37e2-43dd-854f-749d2223d39f 2026-01-30 13:40:37,385 - INFO - Validated that VN ctest-vn4-57340039 is not found in API Server 2026-01-30 13:40:37,395 - DEBUG - VN ctest-vn4-57340039 is not present in Agent 10.0.0.38 2026-01-30 13:40:37,395 - INFO - Validated that VN ctest-vn4-57340039 is not in any agent 2026-01-30 13:40:37,412 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-57340039 info 2026-01-30 13:40:37,438 - INFO - Deleted policy ctest-policy1-49644785 2026-01-30 13:40:37,596 - DEBUG - policy ctest-policy1-49644785 is not found in API Server 2026-01-30 13:40:37,853 - DEBUG - No XMPP flaps were noticed during the test 2026-01-30 13:40:37,853 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:03] 2026-01-30 13:40:37,853 - INFO - -------------------------------------------------------------------------------- 2026-01-30 13:40:38,141 - DEBUG - No XMPP flaps were noticed during the test 2026-01-30 13:40:38,141 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:05] 2026-01-30 13:40:38,141 - INFO - -------------------------------------------------------------------------------- 2026-01-30 13:40:38,822 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-69216671, ID : ec5ad7d0-37e2-43dd-854f-749d2223d39f