2026-04-20 16:53:39,945 - INFO - Domain Default found not creating 2026-04-20 16:53:40,108 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-46007793 not found, creating it 2026-04-20 16:53:40,573 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-46007793, ID : 7358a55c-f3cd-4000-a42c-92c8c1a42361 2026-04-20 16:53:42,069 - INFO - ================================================================================ 2026-04-20 16:53:42,070 - INFO - STARTING TEST : test_remove_policy_with_ref 2026-04-20 16:53:42,323 - DEBUG - Nothing to compare xmpp stats {'10.0.0.38': {'10.20.0.201': '0'}} with 2026-04-20 16:53:42,323 - INFO - Initial checks done. Running the testcase now 2026-04-20 16:53:42,323 - INFO - 2026-04-20 16:53:42,323 - INFO - ================================================================================ 2026-04-20 16:53:42,323 - INFO - STARTING TEST : test_remove_policy_with_ref 2026-04-20 16:53:42,323 - 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-04-20 16:53:42,620 - DEBUG - Nothing to compare xmpp stats {'10.0.0.38': {'10.20.0.201': '0'}} with 2026-04-20 16:53:42,620 - INFO - Initial checks done. Running the testcase now 2026-04-20 16:53:42,620 - INFO - 2026-04-20 16:53:43,002 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-46007793:ctest-vn4-59137114, 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-46007793:ctest-vn4-59137114, 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-46007793:ctest-vn4-59137114, 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-46007793:ctest-vn4-59137114, 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-04-20 16:53:43,520 - DEBUG - Response for create_network : {'network': {'id': 'd3ba1550-1402-486d-908b-d95369b173c6', 'name': 'ctest-vn4-59137114', 'tenant_id': '7358a55cf3cd4000a42c92c8c1a42361', 'project_id': '7358a55cf3cd4000a42c92c8c1a42361', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-46007793', 'ctest-vn4-59137114'], 'port_security_enabled': True, 'description': ''}} 2026-04-20 16:53:43,722 - DEBUG - Response for create_subnet : {'subnet': {'id': '720b897d-b1fa-42f4-bf30-02b1eddd350e', 'name': '', 'tenant_id': '7358a55cf3cd4000a42c92c8c1a42361', 'network_id': 'd3ba1550-1402-486d-908b-d95369b173c6', 'ip_version': 4, 'cidr': '84.171.87.192/26', 'allocation_pools': [{'start': '84.171.87.194', 'end': '84.171.87.254'}], 'gateway_ip': '84.171.87.193', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '84.171.87.194', 'tags': [], 'project_id': '7358a55cf3cd4000a42c92c8c1a42361'}} 2026-04-20 16:53:43,887 - DEBUG - Response for create_subnet : {'subnet': {'id': '2d9014ca-7d8d-477d-b76c-c53d1cf113eb', 'name': '', 'tenant_id': '7358a55cf3cd4000a42c92c8c1a42361', 'network_id': 'd3ba1550-1402-486d-908b-d95369b173c6', 'ip_version': 6, 'cidr': '31b5:34b0:fb93:65ba:da84:c50c::/96', 'allocation_pools': [{'start': '31b5:34b0:fb93:65ba:da84:c50c:0:2', 'end': '31b5:34b0:fb93:65ba:da84:c50c:ffff:fffe'}], 'gateway_ip': '31b5:34b0:fb93:65ba:da84:c50c:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '31b5:34b0:fb93:65ba:da84:c50c:0:2', 'tags': [], 'project_id': '7358a55cf3cd4000a42c92c8c1a42361'}} 2026-04-20 16:53:43,908 - INFO - Created VN ctest-vn4-59137114 2026-04-20 16:53:43,965 - DEBUG - VN ctest-vn4-59137114 UUID is d3ba1550-1402-486d-908b-d95369b173c6 2026-04-20 16:53:44,165 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': 'd3ba1550-1402-486d-908b-d95369b173c6', 'name': 'ctest-vn4-59137114', 'tenant_id': '7358a55cf3cd4000a42c92c8c1a42361', 'project_id': '7358a55cf3cd4000a42c92c8c1a42361', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['720b897d-b1fa-42f4-bf30-02b1eddd350e', '2d9014ca-7d8d-477d-b76c-c53d1cf113eb'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-46007793', 'ctest-vn4-59137114'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-46007793', 'ctest-policy1-42975902']], 'subnet_ipam': [{'subnet_cidr': '84.171.87.192/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '31b5:34b0:fb93:65ba:da84:c50c::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2026-04-20 16:53:44,329 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2026-04-20 16:53:44,625 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2026-04-20 16:53:44,654 - DEBUG - Requesting: http://10.0.0.38:8082/domain/b4efae88-ad19-42dd-8d19-9ce1d0065f07 2026-04-20 16:53:44,666 - DEBUG - Requesting: http://10.0.0.38:8082/project/7358a55c-f3cd-4000-a42c-92c8c1a42361 2026-04-20 16:53:44,737 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/d3ba1550-1402-486d-908b-d95369b173c6 2026-04-20 16:53:44,748 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/d3ba1550-1402-486d-908b-d95369b173c6 2026-04-20 16:53:44,757 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/8f9503f0-ffc2-4ad1-b6a2-61baf203a8b9 2026-04-20 16:53:44,764 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/8f9503f0-ffc2-4ad1-b6a2-61baf203a8b9 2026-04-20 16:53:44,771 - DEBUG - Requesting: http://10.0.0.38:8082/route-target/42884cb8-fa11-4078-a729-8a1aead33e05 2026-04-20 16:53:44,777 - DEBUG - Route Targets: ['target:64512:8000004'] 2026-04-20 16:53:44,777 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/d3ba1550-1402-486d-908b-d95369b173c6 2026-04-20 16:53:44,787 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/8f9503f0-ffc2-4ad1-b6a2-61baf203a8b9 2026-04-20 16:53:44,800 - INFO - Verified VN network id 11 for VN d3ba1550-1402-486d-908b-d95369b173c6 2026-04-20 16:53:44,801 - INFO - Verifications in API Server for VN ctest-vn4-59137114 passed 2026-04-20 16:53:44,801 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/d3ba1550-1402-486d-908b-d95369b173c6 2026-04-20 16:53:44,809 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/8f9503f0-ffc2-4ad1-b6a2-61baf203a8b9 2026-04-20 16:53:44,816 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/8f9503f0-ffc2-4ad1-b6a2-61baf203a8b9 2026-04-20 16:53:44,823 - DEBUG - Requesting: http://10.0.0.38:8082/route-target/42884cb8-fa11-4078-a729-8a1aead33e05 2026-04-20 16:53:44,835 - DEBUG - Control-node 10.0.0.38 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-46007793:ctest-vn4-59137114', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-46007793', 'owner-access': '7', 'group': 'member', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '15256530121348237421', 'uuid-lslong': '10415657515503154118'}, 'enable': 'true', 'created': '2026-04-20T16:53:43', 'last-modified': '2026-04-20T16:53:44', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.693220'} 2026-04-20 16:53:44,841 - DEBUG - Route Targets: ['target:64512:8000004'] 2026-04-20 16:53:44,841 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-59137114 passed 2026-04-20 16:53:44,841 - DEBUG - ====Verifying policy data for ctest-vn4-59137114 in API_Server ====== 2026-04-20 16:53:44,841 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2026-04-20 16:53:44,847 - DEBUG - Requesting: http://10.0.0.38:8082/domain/b4efae88-ad19-42dd-8d19-9ce1d0065f07 2026-04-20 16:53:44,858 - DEBUG - Requesting: http://10.0.0.38:8082/project/7358a55c-f3cd-4000-a42c-92c8c1a42361 2026-04-20 16:53:44,926 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/d3ba1550-1402-486d-908b-d95369b173c6 2026-04-20 16:53:44,935 - DEBUG - ==>Verifying data for policy with id: c98e650f-b8fb-469c-9a7b-f1d87bb38618, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-46007793', 'ctest-policy1-42975902'] 2026-04-20 16:53:44,935 - INFO - VN ctest-vn4-59137114 Policy verification: verify_vn_policy_in_api_server, status: True 2026-04-20 16:53:44,935 - DEBUG - Verifying the vn in opserver 2026-04-20 16:53:44,936 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-46007793:ctest-vn4-59137114 virtual network link through opserver 10.0.0.38 2026-04-20 16:53:44,936 - DEBUG - Requesting: http://10.0.0.38:8081/analytics/uves/virtual-networks 2026-04-20 16:53:45,233 - DEBUG - Requesting: http://10.0.0.38:8081/analytics/uves/virtual-networks 2026-04-20 16:53:45,296 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-46007793:ctest-vn4-59137114', 'href': 'http://10.0.0.38:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-46007793:ctest-vn4-59137114?flat'} 2026-04-20 16:53:45,296 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-46007793:ctest-vn4-59137114 is found in opserver 2026-04-20 16:53:45,306 - DEBUG - Do not have enough data to verify VN in agent 2026-04-20 16:53:45,310 - DEBUG - VRF ids for VN ctest-vn4-59137114: {} 2026-04-20 16:53:45,311 - DEBUG - ====Verifying data for ctest-policy1-42975902 in API_Server ====== 2026-04-20 16:53:45,311 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2026-04-20 16:53:45,317 - DEBUG - Requesting: http://10.0.0.38:8082/domain/b4efae88-ad19-42dd-8d19-9ce1d0065f07 2026-04-20 16:53:45,329 - DEBUG - Requesting: http://10.0.0.38:8082/project/7358a55c-f3cd-4000-a42c-92c8c1a42361 2026-04-20 16:53:45,397 - DEBUG - Requesting: http://10.0.0.38:8082/network-policy/c98e650f-b8fb-469c-9a7b-f1d87bb38618 2026-04-20 16:53:45,405 - INFO - Verified policy ctest-policy1-42975902 in API Server, Result: True 2026-04-20 16:53:45,405 - INFO - Done with setup and verification, moving onto test .. 2026-04-20 16:53:45,413 - INFO - Deleting VN ctest-vn4-59137114 2026-04-20 16:53:45,531 - DEBUG - Response for deleting network () 2026-04-20 16:53:45,531 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/8f9503f0-ffc2-4ad1-b6a2-61baf203a8b9 2026-04-20 16:53:45,536 - DEBUG - Response Code: 404 2026-04-20 16:53:45,536 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2026-04-20 16:53:45,543 - DEBUG - Requesting: http://10.0.0.38:8082/domain/b4efae88-ad19-42dd-8d19-9ce1d0065f07 2026-04-20 16:53:45,598 - DEBUG - Requesting: http://10.0.0.38:8082/project/7358a55c-f3cd-4000-a42c-92c8c1a42361 2026-04-20 16:53:45,674 - INFO - Validated that VN ctest-vn4-59137114 is not found in API Server 2026-04-20 16:53:45,683 - DEBUG - VN ctest-vn4-59137114 is not present in Agent 10.0.0.38 2026-04-20 16:53:45,683 - INFO - Validated that VN ctest-vn4-59137114 is not in any agent 2026-04-20 16:53:45,697 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-59137114 info 2026-04-20 16:53:45,720 - INFO - Deleted policy ctest-policy1-42975902 2026-04-20 16:53:45,877 - DEBUG - policy ctest-policy1-42975902 is not found in API Server 2026-04-20 16:53:46,131 - DEBUG - No XMPP flaps were noticed during the test
2026-04-20 16:53:46,131 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04]
2026-04-20 16:53:46,131 - INFO - -------------------------------------------------------------------------------- 2026-04-20 16:53:46,417 - DEBUG - No XMPP flaps were noticed during the test
2026-04-20 16:53:46,418 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04]
2026-04-20 16:53:46,418 - INFO - -------------------------------------------------------------------------------- 2026-04-20 16:53:47,105 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-46007793, ID : 7358a55c-f3cd-4000-a42c-92c8c1a42361