2025-10-21 14:35:41,099 - INFO - Domain Default found not creating 2025-10-21 14:35:41,229 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-52913566 not found, creating it 2025-10-21 14:35:41,643 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-52913566, ID : 76297611-c2cd-43b4-9b6d-7928f32dae71 2025-10-21 14:35:42,978 - INFO - ================================================================================ 2025-10-21 14:35:42,978 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-10-21 14:35:43,228 - DEBUG - Nothing to compare xmpp stats {'10.0.0.254': {'10.20.0.254': '0'}} with 2025-10-21 14:35:43,228 - INFO - Initial checks done. Running the testcase now 2025-10-21 14:35:43,228 - INFO - 2025-10-21 14:35:43,228 - INFO - ================================================================================ 2025-10-21 14:35:43,228 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-10-21 14:35:43,228 - 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-10-21 14:35:43,512 - DEBUG - Nothing to compare xmpp stats {'10.0.0.254': {'10.20.0.254': '0'}} with 2025-10-21 14:35:43,512 - INFO - Initial checks done. Running the testcase now 2025-10-21 14:35:43,512 - INFO - 2025-10-21 14:35:43,847 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-52913566:ctest-vn4-03389827, 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-52913566:ctest-vn4-03389827, 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-52913566:ctest-vn4-03389827, 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-52913566:ctest-vn4-03389827, 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-10-21 14:35:44,321 - DEBUG - Response for create_network : {'network': {'id': '81e82204-dd18-46e2-b189-d31c077165cc', 'name': 'ctest-vn4-03389827', 'tenant_id': '76297611c2cd43b49b6d7928f32dae71', 'project_id': '76297611c2cd43b49b6d7928f32dae71', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-52913566', 'ctest-vn4-03389827'], 'port_security_enabled': True, 'description': ''}} 2025-10-21 14:35:44,503 - DEBUG - Response for create_subnet : {'subnet': {'id': '5cf28cfa-0f4f-40c4-86a9-bb73f2c127f9', 'name': '', 'tenant_id': '76297611c2cd43b49b6d7928f32dae71', 'network_id': '81e82204-dd18-46e2-b189-d31c077165cc', 'ip_version': 4, 'cidr': '215.20.217.0/26', 'allocation_pools': [{'start': '215.20.217.2', 'end': '215.20.217.62'}], 'gateway_ip': '215.20.217.1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '215.20.217.2', 'tags': [], 'project_id': '76297611c2cd43b49b6d7928f32dae71'}} 2025-10-21 14:35:44,633 - DEBUG - Response for create_subnet : {'subnet': {'id': 'ee5bad61-e9c6-4546-894c-6e60f8e3d133', 'name': '', 'tenant_id': '76297611c2cd43b49b6d7928f32dae71', 'network_id': '81e82204-dd18-46e2-b189-d31c077165cc', 'ip_version': 6, 'cidr': '203d:8582:e419:e1f5:f48b:c029::/96', 'allocation_pools': [{'start': '203d:8582:e419:e1f5:f48b:c029:0:2', 'end': '203d:8582:e419:e1f5:f48b:c029:ffff:fffe'}], 'gateway_ip': '203d:8582:e419:e1f5:f48b:c029:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '203d:8582:e419:e1f5:f48b:c029:0:2', 'tags': [], 'project_id': '76297611c2cd43b49b6d7928f32dae71'}} 2025-10-21 14:35:44,651 - INFO - Created VN ctest-vn4-03389827 2025-10-21 14:35:44,699 - DEBUG - VN ctest-vn4-03389827 UUID is 81e82204-dd18-46e2-b189-d31c077165cc 2025-10-21 14:35:44,872 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': '81e82204-dd18-46e2-b189-d31c077165cc', 'name': 'ctest-vn4-03389827', 'tenant_id': '76297611c2cd43b49b6d7928f32dae71', 'project_id': '76297611c2cd43b49b6d7928f32dae71', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['5cf28cfa-0f4f-40c4-86a9-bb73f2c127f9', 'ee5bad61-e9c6-4546-894c-6e60f8e3d133'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-52913566', 'ctest-vn4-03389827'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-52913566', 'ctest-policy1-39838945']], 'subnet_ipam': [{'subnet_cidr': '215.20.217.0/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '203d:8582:e419:e1f5:f48b:c029::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2025-10-21 14:35:45,031 - DEBUG - Requesting: http://10.0.0.254:8082/domains 2025-10-21 14:35:45,317 - DEBUG - Requesting: http://10.0.0.254:8082/domains 2025-10-21 14:35:45,351 - DEBUG - Requesting: http://10.0.0.254:8082/domain/2a1770f5-2bd5-4783-9760-17e9a48c1a45 2025-10-21 14:35:45,361 - DEBUG - Requesting: http://10.0.0.254:8082/project/76297611-c2cd-43b4-9b6d-7928f32dae71 2025-10-21 14:35:45,466 - DEBUG - Requesting: http://10.0.0.254:8082/virtual-network/81e82204-dd18-46e2-b189-d31c077165cc 2025-10-21 14:35:45,490 - DEBUG - Requesting: http://10.0.0.254:8082/virtual-network/81e82204-dd18-46e2-b189-d31c077165cc 2025-10-21 14:35:45,499 - DEBUG - Requesting: http://10.0.0.254:8082/routing-instance/3087021e-9210-4240-b45d-619209f7f280 2025-10-21 14:35:45,505 - DEBUG - Requesting: http://10.0.0.254:8082/routing-instance/3087021e-9210-4240-b45d-619209f7f280 2025-10-21 14:35:45,517 - DEBUG - Requesting: http://10.0.0.254:8082/route-target/47135273-c5d7-48be-814c-b5c721537296 2025-10-21 14:35:45,522 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-10-21 14:35:45,522 - DEBUG - Requesting: http://10.0.0.254:8082/virtual-network/81e82204-dd18-46e2-b189-d31c077165cc 2025-10-21 14:35:45,531 - DEBUG - Requesting: http://10.0.0.254:8082/routing-instance/3087021e-9210-4240-b45d-619209f7f280 2025-10-21 14:35:45,544 - INFO - Verified VN network id 11 for VN 81e82204-dd18-46e2-b189-d31c077165cc 2025-10-21 14:35:45,544 - INFO - Verifications in API Server for VN ctest-vn4-03389827 passed 2025-10-21 14:35:45,544 - DEBUG - Requesting: http://10.0.0.254:8082/virtual-network/81e82204-dd18-46e2-b189-d31c077165cc 2025-10-21 14:35:45,552 - DEBUG - Requesting: http://10.0.0.254:8082/routing-instance/3087021e-9210-4240-b45d-619209f7f280 2025-10-21 14:35:45,559 - DEBUG - Requesting: http://10.0.0.254:8082/routing-instance/3087021e-9210-4240-b45d-619209f7f280 2025-10-21 14:35:45,571 - DEBUG - Requesting: http://10.0.0.254:8082/route-target/47135273-c5d7-48be-814c-b5c721537296 2025-10-21 14:35:45,585 - DEBUG - Control-node 10.0.0.254 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-52913566:ctest-vn4-03389827', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-52913566', 'owner-access': '7', 'group': 'admin', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '9360769229774145250', 'uuid-lslong': '12792988333860021708'}, 'enable': 'true', 'created': '2025-10-21T14:35:44', 'last-modified': '2025-10-21T14:35:44', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.732312'} 2025-10-21 14:35:45,590 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-10-21 14:35:45,590 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-03389827 passed 2025-10-21 14:35:45,590 - DEBUG - ====Verifying policy data for ctest-vn4-03389827 in API_Server ====== 2025-10-21 14:35:45,590 - DEBUG - Requesting: http://10.0.0.254:8082/domains 2025-10-21 14:35:45,597 - DEBUG - Requesting: http://10.0.0.254:8082/domain/2a1770f5-2bd5-4783-9760-17e9a48c1a45 2025-10-21 14:35:45,660 - DEBUG - Requesting: http://10.0.0.254:8082/project/76297611-c2cd-43b4-9b6d-7928f32dae71 2025-10-21 14:35:45,748 - DEBUG - Requesting: http://10.0.0.254:8082/virtual-network/81e82204-dd18-46e2-b189-d31c077165cc 2025-10-21 14:35:45,764 - DEBUG - ==>Verifying data for policy with id: 780984da-fe04-4ceb-84fe-710058ab7caa, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-52913566', 'ctest-policy1-39838945'] 2025-10-21 14:35:45,764 - INFO - VN ctest-vn4-03389827 Policy verification: verify_vn_policy_in_api_server, status: True 2025-10-21 14:35:45,764 - DEBUG - Verifying the vn in opserver 2025-10-21 14:35:45,764 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-52913566:ctest-vn4-03389827 virtual network link through opserver 10.0.0.254 2025-10-21 14:35:45,764 - DEBUG - Requesting: http://10.0.0.254:8081/analytics/uves/virtual-networks 2025-10-21 14:35:46,073 - DEBUG - Requesting: http://10.0.0.254:8081/analytics/uves/virtual-networks 2025-10-21 14:35:46,121 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-52913566:ctest-vn4-03389827', 'href': 'http://10.0.0.254:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-52913566:ctest-vn4-03389827?flat'} 2025-10-21 14:35:46,121 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-52913566:ctest-vn4-03389827 is found in opserver 2025-10-21 14:35:46,130 - DEBUG - Do not have enough data to verify VN in agent 2025-10-21 14:35:46,134 - DEBUG - VRF ids for VN ctest-vn4-03389827: {} 2025-10-21 14:35:46,134 - DEBUG - ====Verifying data for ctest-policy1-39838945 in API_Server ====== 2025-10-21 14:35:46,135 - DEBUG - Requesting: http://10.0.0.254:8082/domains 2025-10-21 14:35:46,139 - DEBUG - Requesting: http://10.0.0.254:8082/domain/2a1770f5-2bd5-4783-9760-17e9a48c1a45 2025-10-21 14:35:46,149 - DEBUG - Requesting: http://10.0.0.254:8082/project/76297611-c2cd-43b4-9b6d-7928f32dae71 2025-10-21 14:35:46,215 - DEBUG - Requesting: http://10.0.0.254:8082/network-policy/780984da-fe04-4ceb-84fe-710058ab7caa 2025-10-21 14:35:46,224 - INFO - Verified policy ctest-policy1-39838945 in API Server, Result: True 2025-10-21 14:35:46,224 - INFO - Done with setup and verification, moving onto test .. 2025-10-21 14:35:46,230 - INFO - Deleting VN ctest-vn4-03389827 2025-10-21 14:35:46,331 - DEBUG - Response for deleting network () 2025-10-21 14:35:46,331 - DEBUG - Requesting: http://10.0.0.254:8082/routing-instance/3087021e-9210-4240-b45d-619209f7f280 2025-10-21 14:35:46,335 - DEBUG - Response Code: 404 2025-10-21 14:35:46,335 - DEBUG - Requesting: http://10.0.0.254:8082/domains 2025-10-21 14:35:46,339 - DEBUG - Requesting: http://10.0.0.254:8082/domain/2a1770f5-2bd5-4783-9760-17e9a48c1a45 2025-10-21 14:35:46,425 - DEBUG - Requesting: http://10.0.0.254:8082/project/76297611-c2cd-43b4-9b6d-7928f32dae71 2025-10-21 14:35:46,452 - INFO - Validated that VN ctest-vn4-03389827 is not found in API Server 2025-10-21 14:35:46,461 - DEBUG - VN ctest-vn4-03389827 is not present in Agent 10.0.0.254 2025-10-21 14:35:46,461 - INFO - Validated that VN ctest-vn4-03389827 is not in any agent 2025-10-21 14:35:46,472 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-03389827 info 2025-10-21 14:35:46,491 - INFO - Deleted policy ctest-policy1-39838945 2025-10-21 14:35:46,651 - DEBUG - policy ctest-policy1-39838945 is not found in API Server 2025-10-21 14:35:46,907 - DEBUG - No XMPP flaps were noticed during the test 2025-10-21 14:35:46,907 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:03] 2025-10-21 14:35:46,907 - INFO - -------------------------------------------------------------------------------- 2025-10-21 14:35:47,191 - DEBUG - No XMPP flaps were noticed during the test 2025-10-21 14:35:47,191 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:05] 2025-10-21 14:35:47,191 - INFO - -------------------------------------------------------------------------------- 2025-10-21 14:35:47,829 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-52913566, ID : 76297611-c2cd-43b4-9b6d-7928f32dae71