2025-10-07 19:12:34,902 - INFO - Domain Default found not creating 2025-10-07 19:12:35,045 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-84368690 not found, creating it 2025-10-07 19:12:35,488 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-84368690, ID : 33410c4b-c739-49b4-8949-e801abd514e7 2025-10-07 19:12:36,885 - INFO - ================================================================================ 2025-10-07 19:12:36,886 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-10-07 19:12:37,144 - DEBUG - Nothing to compare xmpp stats {'10.0.0.27': {'10.20.0.17': '0'}} with 2025-10-07 19:12:37,144 - INFO - Initial checks done. Running the testcase now 2025-10-07 19:12:37,144 - INFO - 2025-10-07 19:12:37,145 - INFO - ================================================================================ 2025-10-07 19:12:37,145 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-10-07 19:12:37,145 - 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-07 19:12:37,436 - DEBUG - Nothing to compare xmpp stats {'10.0.0.27': {'10.20.0.17': '0'}} with 2025-10-07 19:12:37,436 - INFO - Initial checks done. Running the testcase now 2025-10-07 19:12:37,437 - INFO - 2025-10-07 19:12:37,775 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-84368690:ctest-vn4-20627903, 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-84368690:ctest-vn4-20627903, 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-84368690:ctest-vn4-20627903, 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-84368690:ctest-vn4-20627903, 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-07 19:12:38,270 - DEBUG - Response for create_network : {'network': {'id': '4de3fd1b-469f-4d93-b3a2-52b0bcc12763', 'name': 'ctest-vn4-20627903', 'tenant_id': '33410c4bc73949b48949e801abd514e7', 'project_id': '33410c4bc73949b48949e801abd514e7', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-84368690', 'ctest-vn4-20627903'], 'port_security_enabled': True, 'description': ''}} 2025-10-07 19:12:38,491 - DEBUG - Response for create_subnet : {'subnet': {'id': 'e15ae45f-61a8-4ad3-92a8-814b7ac7b35b', 'name': '', 'tenant_id': '33410c4bc73949b48949e801abd514e7', 'network_id': '4de3fd1b-469f-4d93-b3a2-52b0bcc12763', 'ip_version': 4, 'cidr': '108.121.232.64/26', 'allocation_pools': [{'start': '108.121.232.66', 'end': '108.121.232.126'}], 'gateway_ip': '108.121.232.65', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '108.121.232.66', 'tags': [], 'project_id': '33410c4bc73949b48949e801abd514e7'}} 2025-10-07 19:12:38,659 - DEBUG - Response for create_subnet : {'subnet': {'id': '6a1a7e43-7e23-4cda-aeb5-5c300bcc6737', 'name': '', 'tenant_id': '33410c4bc73949b48949e801abd514e7', 'network_id': '4de3fd1b-469f-4d93-b3a2-52b0bcc12763', 'ip_version': 6, 'cidr': '3fdb:50f:c4a:6968:5030:3cca::/96', 'allocation_pools': [{'start': '3fdb:50f:c4a:6968:5030:3cca:0:2', 'end': '3fdb:50f:c4a:6968:5030:3cca:ffff:fffe'}], 'gateway_ip': '3fdb:50f:c4a:6968:5030:3cca:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '3fdb:50f:c4a:6968:5030:3cca:0:2', 'tags': [], 'project_id': '33410c4bc73949b48949e801abd514e7'}} 2025-10-07 19:12:38,677 - INFO - Created VN ctest-vn4-20627903 2025-10-07 19:12:38,728 - DEBUG - VN ctest-vn4-20627903 UUID is 4de3fd1b-469f-4d93-b3a2-52b0bcc12763 2025-10-07 19:12:38,916 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': '4de3fd1b-469f-4d93-b3a2-52b0bcc12763', 'name': 'ctest-vn4-20627903', 'tenant_id': '33410c4bc73949b48949e801abd514e7', 'project_id': '33410c4bc73949b48949e801abd514e7', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['e15ae45f-61a8-4ad3-92a8-814b7ac7b35b', '6a1a7e43-7e23-4cda-aeb5-5c300bcc6737'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-84368690', 'ctest-vn4-20627903'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-84368690', 'ctest-policy1-94174624']], 'subnet_ipam': [{'subnet_cidr': '108.121.232.64/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '3fdb:50f:c4a:6968:5030:3cca::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2025-10-07 19:12:39,080 - DEBUG - Requesting: http://10.0.0.27:8082/domains 2025-10-07 19:12:39,367 - DEBUG - Requesting: http://10.0.0.27:8082/domains 2025-10-07 19:12:39,391 - DEBUG - Requesting: http://10.0.0.27:8082/domain/cf7c0f16-67db-492b-b28a-02d68f92f04a 2025-10-07 19:12:39,402 - DEBUG - Requesting: http://10.0.0.27:8082/project/33410c4b-c739-49b4-8949-e801abd514e7 2025-10-07 19:12:39,482 - DEBUG - Requesting: http://10.0.0.27:8082/virtual-network/4de3fd1b-469f-4d93-b3a2-52b0bcc12763 2025-10-07 19:12:39,492 - DEBUG - Requesting: http://10.0.0.27:8082/virtual-network/4de3fd1b-469f-4d93-b3a2-52b0bcc12763 2025-10-07 19:12:39,501 - DEBUG - Requesting: http://10.0.0.27:8082/routing-instance/8565d2a2-3214-48fa-a077-120ea4e377d0 2025-10-07 19:12:39,507 - DEBUG - Requesting: http://10.0.0.27:8082/routing-instance/8565d2a2-3214-48fa-a077-120ea4e377d0 2025-10-07 19:12:39,514 - DEBUG - Requesting: http://10.0.0.27:8082/route-target/e8159d51-daad-49ca-8d01-b8def4427989 2025-10-07 19:12:39,520 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-10-07 19:12:39,521 - DEBUG - Requesting: http://10.0.0.27:8082/virtual-network/4de3fd1b-469f-4d93-b3a2-52b0bcc12763 2025-10-07 19:12:39,531 - DEBUG - Requesting: http://10.0.0.27:8082/routing-instance/8565d2a2-3214-48fa-a077-120ea4e377d0 2025-10-07 19:12:39,545 - INFO - Verified VN network id 12 for VN 4de3fd1b-469f-4d93-b3a2-52b0bcc12763 2025-10-07 19:12:39,545 - INFO - Verifications in API Server for VN ctest-vn4-20627903 passed 2025-10-07 19:12:39,545 - DEBUG - Requesting: http://10.0.0.27:8082/virtual-network/4de3fd1b-469f-4d93-b3a2-52b0bcc12763 2025-10-07 19:12:39,555 - DEBUG - Requesting: http://10.0.0.27:8082/routing-instance/8565d2a2-3214-48fa-a077-120ea4e377d0 2025-10-07 19:12:39,561 - DEBUG - Requesting: http://10.0.0.27:8082/routing-instance/8565d2a2-3214-48fa-a077-120ea4e377d0 2025-10-07 19:12:39,567 - DEBUG - Requesting: http://10.0.0.27:8082/route-target/e8159d51-daad-49ca-8d01-b8def4427989 2025-10-07 19:12:39,579 - DEBUG - Control-node 10.0.0.27 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-84368690:ctest-vn4-20627903', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-84368690', 'owner-access': '7', 'group': 'member', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '5612607854224559507', 'uuid-lslong': '12943999198050723683'}, 'enable': 'true', 'created': '2025-10-07T19:12:38', 'last-modified': '2025-10-07T19:12:38', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.688989'} 2025-10-07 19:12:39,586 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-10-07 19:12:39,586 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-20627903 passed 2025-10-07 19:12:39,587 - DEBUG - ====Verifying policy data for ctest-vn4-20627903 in API_Server ====== 2025-10-07 19:12:39,587 - DEBUG - Requesting: http://10.0.0.27:8082/domains 2025-10-07 19:12:39,592 - DEBUG - Requesting: http://10.0.0.27:8082/domain/cf7c0f16-67db-492b-b28a-02d68f92f04a 2025-10-07 19:12:39,603 - DEBUG - Requesting: http://10.0.0.27:8082/project/33410c4b-c739-49b4-8949-e801abd514e7 2025-10-07 19:12:39,673 - DEBUG - Requesting: http://10.0.0.27:8082/virtual-network/4de3fd1b-469f-4d93-b3a2-52b0bcc12763 2025-10-07 19:12:39,683 - DEBUG - ==>Verifying data for policy with id: 3191173c-9e03-42a2-8de3-eed1e22e6c9c, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-84368690', 'ctest-policy1-94174624'] 2025-10-07 19:12:39,683 - INFO - VN ctest-vn4-20627903 Policy verification: verify_vn_policy_in_api_server, status: True 2025-10-07 19:12:39,683 - DEBUG - Verifying the vn in opserver 2025-10-07 19:12:39,683 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-84368690:ctest-vn4-20627903 virtual network link through opserver 10.0.0.27 2025-10-07 19:12:39,683 - DEBUG - Requesting: http://10.0.0.27:8081/analytics/uves/virtual-networks 2025-10-07 19:12:39,972 - DEBUG - Requesting: http://10.0.0.27:8081/analytics/uves/virtual-networks 2025-10-07 19:12:40,032 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-84368690:ctest-vn4-20627903', 'href': 'http://10.0.0.27:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-84368690:ctest-vn4-20627903?flat'} 2025-10-07 19:12:40,032 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-84368690:ctest-vn4-20627903 is found in opserver 2025-10-07 19:12:40,040 - DEBUG - Do not have enough data to verify VN in agent 2025-10-07 19:12:40,044 - DEBUG - VRF ids for VN ctest-vn4-20627903: {} 2025-10-07 19:12:40,045 - DEBUG - ====Verifying data for ctest-policy1-94174624 in API_Server ====== 2025-10-07 19:12:40,045 - DEBUG - Requesting: http://10.0.0.27:8082/domains 2025-10-07 19:12:40,050 - DEBUG - Requesting: http://10.0.0.27:8082/domain/cf7c0f16-67db-492b-b28a-02d68f92f04a 2025-10-07 19:12:40,062 - DEBUG - Requesting: http://10.0.0.27:8082/project/33410c4b-c739-49b4-8949-e801abd514e7 2025-10-07 19:12:40,130 - DEBUG - Requesting: http://10.0.0.27:8082/network-policy/3191173c-9e03-42a2-8de3-eed1e22e6c9c 2025-10-07 19:12:40,139 - INFO - Verified policy ctest-policy1-94174624 in API Server, Result: True 2025-10-07 19:12:40,139 - INFO - Done with setup and verification, moving onto test .. 2025-10-07 19:12:40,146 - INFO - Deleting VN ctest-vn4-20627903 2025-10-07 19:12:40,248 - DEBUG - Response for deleting network () 2025-10-07 19:12:40,248 - DEBUG - Requesting: http://10.0.0.27:8082/routing-instance/8565d2a2-3214-48fa-a077-120ea4e377d0 2025-10-07 19:12:40,253 - DEBUG - Response Code: 404 2025-10-07 19:12:40,253 - DEBUG - Requesting: http://10.0.0.27:8082/domains 2025-10-07 19:12:40,258 - DEBUG - Requesting: http://10.0.0.27:8082/domain/cf7c0f16-67db-492b-b28a-02d68f92f04a 2025-10-07 19:12:40,312 - DEBUG - Requesting: http://10.0.0.27:8082/project/33410c4b-c739-49b4-8949-e801abd514e7 2025-10-07 19:12:40,385 - INFO - Validated that VN ctest-vn4-20627903 is not found in API Server 2025-10-07 19:12:40,395 - DEBUG - VN ctest-vn4-20627903 is not present in Agent 10.0.0.27 2025-10-07 19:12:40,395 - INFO - Validated that VN ctest-vn4-20627903 is not in any agent 2025-10-07 19:12:40,409 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-20627903 info 2025-10-07 19:12:40,446 - INFO - Deleted policy ctest-policy1-94174624 2025-10-07 19:12:40,612 - DEBUG - policy ctest-policy1-94174624 is not found in API Server 2025-10-07 19:12:40,868 - DEBUG - No XMPP flaps were noticed during the test 2025-10-07 19:12:40,869 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:03] 2025-10-07 19:12:40,869 - INFO - -------------------------------------------------------------------------------- 2025-10-07 19:12:41,162 - DEBUG - No XMPP flaps were noticed during the test 2025-10-07 19:12:41,162 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:05] 2025-10-07 19:12:41,162 - INFO - -------------------------------------------------------------------------------- 2025-10-07 19:12:41,815 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-84368690, ID : 33410c4b-c739-49b4-8949-e801abd514e7