2025-11-01 07:42:36,121 - INFO - Domain Default found not creating 2025-11-01 07:42:36,352 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-07860357 not found, creating it 2025-11-01 07:42:36,906 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-07860357, ID : d448dad2-5933-4c6f-8851-07ecb86491d9 2025-11-01 07:42:38,881 - INFO - ================================================================================ 2025-11-01 07:42:38,881 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-11-01 07:42:39,199 - DEBUG - Nothing to compare xmpp stats {'10.0.0.38': {'10.20.0.17': '0'}} with 2025-11-01 07:42:39,199 - INFO - Initial checks done. Running the testcase now 2025-11-01 07:42:39,200 - INFO - 2025-11-01 07:42:39,200 - INFO - ================================================================================ 2025-11-01 07:42:39,200 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-11-01 07:42:39,200 - 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-01 07:42:39,511 - DEBUG - Nothing to compare xmpp stats {'10.0.0.38': {'10.20.0.17': '0'}} with 2025-11-01 07:42:39,512 - INFO - Initial checks done. Running the testcase now 2025-11-01 07:42:39,512 - INFO - 2025-11-01 07:42:39,942 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-07860357:ctest-vn4-34213987, 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-07860357:ctest-vn4-34213987, 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-07860357:ctest-vn4-34213987, 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-07860357:ctest-vn4-34213987, 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-01 07:42:40,536 - DEBUG - Response for create_network : {'network': {'id': 'be297e1f-5a6c-4b17-93ef-4cdc2fd0f03e', 'name': 'ctest-vn4-34213987', 'tenant_id': 'd448dad259334c6f885107ecb86491d9', 'project_id': 'd448dad259334c6f885107ecb86491d9', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-07860357', 'ctest-vn4-34213987'], 'port_security_enabled': True, 'description': ''}} 2025-11-01 07:42:40,744 - DEBUG - Response for create_subnet : {'subnet': {'id': '9ff2b5a5-29aa-40d3-8082-66a623489aa0', 'name': '', 'tenant_id': 'd448dad259334c6f885107ecb86491d9', 'network_id': 'be297e1f-5a6c-4b17-93ef-4cdc2fd0f03e', 'ip_version': 4, 'cidr': '165.166.175.0/26', 'allocation_pools': [{'start': '165.166.175.2', 'end': '165.166.175.62'}], 'gateway_ip': '165.166.175.1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '165.166.175.2', 'tags': [], 'project_id': 'd448dad259334c6f885107ecb86491d9'}} 2025-11-01 07:42:40,931 - DEBUG - Response for create_subnet : {'subnet': {'id': 'c5214841-0628-43f8-8824-64d1ac0c10a4', 'name': '', 'tenant_id': 'd448dad259334c6f885107ecb86491d9', 'network_id': 'be297e1f-5a6c-4b17-93ef-4cdc2fd0f03e', 'ip_version': 6, 'cidr': '29e7:4261:280f:963f:8d77:bc99::/96', 'allocation_pools': [{'start': '29e7:4261:280f:963f:8d77:bc99:0:2', 'end': '29e7:4261:280f:963f:8d77:bc99:ffff:fffe'}], 'gateway_ip': '29e7:4261:280f:963f:8d77:bc99:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '29e7:4261:280f:963f:8d77:bc99:0:2', 'tags': [], 'project_id': 'd448dad259334c6f885107ecb86491d9'}} 2025-11-01 07:42:40,957 - INFO - Created VN ctest-vn4-34213987 2025-11-01 07:42:41,011 - DEBUG - VN ctest-vn4-34213987 UUID is be297e1f-5a6c-4b17-93ef-4cdc2fd0f03e 2025-11-01 07:42:41,259 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': 'be297e1f-5a6c-4b17-93ef-4cdc2fd0f03e', 'name': 'ctest-vn4-34213987', 'tenant_id': 'd448dad259334c6f885107ecb86491d9', 'project_id': 'd448dad259334c6f885107ecb86491d9', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['9ff2b5a5-29aa-40d3-8082-66a623489aa0', 'c5214841-0628-43f8-8824-64d1ac0c10a4'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-07860357', 'ctest-vn4-34213987'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-07860357', 'ctest-policy1-47852287']], 'subnet_ipam': [{'subnet_cidr': '165.166.175.0/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '29e7:4261:280f:963f:8d77:bc99::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2025-11-01 07:42:41,443 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2025-11-01 07:42:41,752 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2025-11-01 07:42:41,789 - DEBUG - Requesting: http://10.0.0.38:8082/domain/2958400e-9cbc-4726-a49e-032218ed4947 2025-11-01 07:42:41,805 - DEBUG - Requesting: http://10.0.0.38:8082/project/d448dad2-5933-4c6f-8851-07ecb86491d9 2025-11-01 07:42:41,896 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/be297e1f-5a6c-4b17-93ef-4cdc2fd0f03e 2025-11-01 07:42:41,916 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/be297e1f-5a6c-4b17-93ef-4cdc2fd0f03e 2025-11-01 07:42:41,929 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/ac2e58dc-5028-4047-b447-4f07350e8c52 2025-11-01 07:42:41,938 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/ac2e58dc-5028-4047-b447-4f07350e8c52 2025-11-01 07:42:41,947 - DEBUG - Requesting: http://10.0.0.38:8082/route-target/ca47ab93-7fcc-469e-bf09-b2a565846997 2025-11-01 07:42:41,956 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-11-01 07:42:41,956 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/be297e1f-5a6c-4b17-93ef-4cdc2fd0f03e 2025-11-01 07:42:41,970 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/ac2e58dc-5028-4047-b447-4f07350e8c52 2025-11-01 07:42:42,057 - INFO - Verified VN network id 11 for VN be297e1f-5a6c-4b17-93ef-4cdc2fd0f03e 2025-11-01 07:42:42,058 - INFO - Verifications in API Server for VN ctest-vn4-34213987 passed 2025-11-01 07:42:42,058 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/be297e1f-5a6c-4b17-93ef-4cdc2fd0f03e 2025-11-01 07:42:42,072 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/ac2e58dc-5028-4047-b447-4f07350e8c52 2025-11-01 07:42:42,082 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/ac2e58dc-5028-4047-b447-4f07350e8c52 2025-11-01 07:42:42,089 - DEBUG - Requesting: http://10.0.0.38:8082/route-target/ca47ab93-7fcc-469e-bf09-b2a565846997 2025-11-01 07:42:42,112 - DEBUG - Control-node 10.0.0.38 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-07860357:ctest-vn4-34213987', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-07860357', 'owner-access': '7', 'group': 'member', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '13702622014377577239', 'uuid-lslong': '10659823351587991614'}, 'enable': 'true', 'created': '2025-11-01T07:42:40', 'last-modified': '2025-11-01T07:42:41', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.893332'} 2025-11-01 07:42:42,125 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-11-01 07:42:42,125 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-34213987 passed 2025-11-01 07:42:42,126 - DEBUG - ====Verifying policy data for ctest-vn4-34213987 in API_Server ====== 2025-11-01 07:42:42,126 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2025-11-01 07:42:42,136 - DEBUG - Requesting: http://10.0.0.38:8082/domain/2958400e-9cbc-4726-a49e-032218ed4947 2025-11-01 07:42:42,154 - DEBUG - Requesting: http://10.0.0.38:8082/project/d448dad2-5933-4c6f-8851-07ecb86491d9 2025-11-01 07:42:42,233 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/be297e1f-5a6c-4b17-93ef-4cdc2fd0f03e 2025-11-01 07:42:42,245 - DEBUG - ==>Verifying data for policy with id: ca8f72c5-1c6d-4b22-9628-f6ea880c12aa, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-07860357', 'ctest-policy1-47852287'] 2025-11-01 07:42:42,245 - INFO - VN ctest-vn4-34213987 Policy verification: verify_vn_policy_in_api_server, status: True 2025-11-01 07:42:42,245 - DEBUG - Verifying the vn in opserver 2025-11-01 07:42:42,245 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-07860357:ctest-vn4-34213987 virtual network link through opserver 10.0.0.38 2025-11-01 07:42:42,245 - DEBUG - Requesting: http://10.0.0.38:8081/analytics/uves/virtual-networks 2025-11-01 07:42:42,551 - DEBUG - Requesting: http://10.0.0.38:8081/analytics/uves/virtual-networks 2025-11-01 07:42:42,646 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-07860357:ctest-vn4-34213987', 'href': 'http://10.0.0.38:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-07860357:ctest-vn4-34213987?flat'} 2025-11-01 07:42:42,646 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-07860357:ctest-vn4-34213987 is found in opserver 2025-11-01 07:42:42,660 - DEBUG - Do not have enough data to verify VN in agent 2025-11-01 07:42:42,668 - DEBUG - VRF ids for VN ctest-vn4-34213987: {} 2025-11-01 07:42:42,669 - DEBUG - ====Verifying data for ctest-policy1-47852287 in API_Server ====== 2025-11-01 07:42:42,669 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2025-11-01 07:42:42,680 - DEBUG - Requesting: http://10.0.0.38:8082/domain/2958400e-9cbc-4726-a49e-032218ed4947 2025-11-01 07:42:42,697 - DEBUG - Requesting: http://10.0.0.38:8082/project/d448dad2-5933-4c6f-8851-07ecb86491d9 2025-11-01 07:42:42,780 - DEBUG - Requesting: http://10.0.0.38:8082/network-policy/ca8f72c5-1c6d-4b22-9628-f6ea880c12aa 2025-11-01 07:42:42,799 - INFO - Verified policy ctest-policy1-47852287 in API Server, Result: True 2025-11-01 07:42:42,800 - INFO - Done with setup and verification, moving onto test .. 2025-11-01 07:42:42,815 - INFO - Deleting VN ctest-vn4-34213987 2025-11-01 07:42:42,969 - DEBUG - Response for deleting network () 2025-11-01 07:42:42,969 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/ac2e58dc-5028-4047-b447-4f07350e8c52 2025-11-01 07:42:42,975 - DEBUG - Response Code: 404 2025-11-01 07:42:42,975 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2025-11-01 07:42:42,980 - DEBUG - Requesting: http://10.0.0.38:8082/domain/2958400e-9cbc-4726-a49e-032218ed4947 2025-11-01 07:42:43,034 - DEBUG - Requesting: http://10.0.0.38:8082/project/d448dad2-5933-4c6f-8851-07ecb86491d9 2025-11-01 07:42:43,120 - INFO - Validated that VN ctest-vn4-34213987 is not found in API Server 2025-11-01 07:42:43,134 - DEBUG - VN ctest-vn4-34213987 is not present in Agent 10.0.0.38 2025-11-01 07:42:43,134 - INFO - Validated that VN ctest-vn4-34213987 is not in any agent 2025-11-01 07:42:43,151 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-34213987 info 2025-11-01 07:42:43,181 - INFO - Deleted policy ctest-policy1-47852287 2025-11-01 07:42:43,355 - DEBUG - policy ctest-policy1-47852287 is not found in API Server 2025-11-01 07:42:43,658 - DEBUG - No XMPP flaps were noticed during the test
2025-11-01 07:42:43,659 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04]
2025-11-01 07:42:43,659 - INFO - -------------------------------------------------------------------------------- 2025-11-01 07:42:43,964 - DEBUG - No XMPP flaps were noticed during the test
2025-11-01 07:42:43,964 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:05]
2025-11-01 07:42:43,964 - INFO - -------------------------------------------------------------------------------- 2025-11-01 07:42:44,819 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-07860357, ID : d448dad2-5933-4c6f-8851-07ecb86491d9