2025-08-04 10:06:27,747 - INFO - Domain Default found not creating 2025-08-04 10:06:27,935 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-39037403 not found, creating it 2025-08-04 10:06:28,427 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-39037403, ID : 42950710-772d-4f52-a873-5bb5c52fa8b5 2025-08-04 10:06:30,044 - INFO - ================================================================================ 2025-08-04 10:06:30,044 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-08-04 10:06:30,307 - DEBUG - Nothing to compare xmpp stats {'10.0.0.50': {'10.20.0.17': '0'}} with 2025-08-04 10:06:30,307 - INFO - Initial checks done. Running the testcase now 2025-08-04 10:06:30,307 - INFO - 2025-08-04 10:06:30,307 - INFO - ================================================================================ 2025-08-04 10:06:30,307 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-08-04 10:06:30,307 - 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-08-04 10:06:30,612 - DEBUG - Nothing to compare xmpp stats {'10.0.0.50': {'10.20.0.17': '0'}} with 2025-08-04 10:06:30,612 - INFO - Initial checks done. Running the testcase now 2025-08-04 10:06:30,612 - INFO - 2025-08-04 10:06:30,985 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-39037403:ctest-vn4-87624892, 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-39037403:ctest-vn4-87624892, 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-39037403:ctest-vn4-87624892, 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-39037403:ctest-vn4-87624892, 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-08-04 10:06:31,599 - DEBUG - Response for create_network : {'network': {'id': 'a1904697-4ef3-4dc5-a0e1-8eafb0c46825', 'name': 'ctest-vn4-87624892', 'tenant_id': '42950710772d4f52a8735bb5c52fa8b5', 'project_id': '42950710772d4f52a8735bb5c52fa8b5', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-39037403', 'ctest-vn4-87624892'], 'port_security_enabled': True, 'description': ''}} 2025-08-04 10:06:31,795 - DEBUG - Response for create_subnet : {'subnet': {'id': 'b1c5d1fa-f012-4213-8446-8dddf8d7e5fa', 'name': '', 'tenant_id': '42950710772d4f52a8735bb5c52fa8b5', 'network_id': 'a1904697-4ef3-4dc5-a0e1-8eafb0c46825', 'ip_version': 4, 'cidr': '6.140.202.192/26', 'allocation_pools': [{'start': '6.140.202.194', 'end': '6.140.202.254'}], 'gateway_ip': '6.140.202.193', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '6.140.202.194', 'tags': [], 'project_id': '42950710772d4f52a8735bb5c52fa8b5'}} 2025-08-04 10:06:32,028 - DEBUG - Response for create_subnet : {'subnet': {'id': '9f487dce-9b0c-411d-8a44-537a4b5bccb5', 'name': '', 'tenant_id': '42950710772d4f52a8735bb5c52fa8b5', 'network_id': 'a1904697-4ef3-4dc5-a0e1-8eafb0c46825', 'ip_version': 6, 'cidr': '3b95:acc2:f191:7ed7:6b9b:a160::/96', 'allocation_pools': [{'start': '3b95:acc2:f191:7ed7:6b9b:a160:0:2', 'end': '3b95:acc2:f191:7ed7:6b9b:a160:ffff:fffe'}], 'gateway_ip': '3b95:acc2:f191:7ed7:6b9b:a160:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '3b95:acc2:f191:7ed7:6b9b:a160:0:2', 'tags': [], 'project_id': '42950710772d4f52a8735bb5c52fa8b5'}} 2025-08-04 10:06:32,055 - INFO - Created VN ctest-vn4-87624892 2025-08-04 10:06:32,113 - DEBUG - VN ctest-vn4-87624892 UUID is a1904697-4ef3-4dc5-a0e1-8eafb0c46825 2025-08-04 10:06:32,381 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': 'a1904697-4ef3-4dc5-a0e1-8eafb0c46825', 'name': 'ctest-vn4-87624892', 'tenant_id': '42950710772d4f52a8735bb5c52fa8b5', 'project_id': '42950710772d4f52a8735bb5c52fa8b5', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['b1c5d1fa-f012-4213-8446-8dddf8d7e5fa', '9f487dce-9b0c-411d-8a44-537a4b5bccb5'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-39037403', 'ctest-vn4-87624892'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-39037403', 'ctest-policy1-79271060']], 'subnet_ipam': [{'subnet_cidr': '6.140.202.192/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '3b95:acc2:f191:7ed7:6b9b:a160::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2025-08-04 10:06:32,549 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2025-08-04 10:06:32,847 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2025-08-04 10:06:32,884 - DEBUG - Requesting: http://10.0.0.50:8082/domain/d16048ad-2f86-4210-b688-2a095b65d0e1 2025-08-04 10:06:32,904 - DEBUG - Requesting: http://10.0.0.50:8082/project/42950710-772d-4f52-a873-5bb5c52fa8b5 2025-08-04 10:06:32,992 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/a1904697-4ef3-4dc5-a0e1-8eafb0c46825 2025-08-04 10:06:33,010 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/a1904697-4ef3-4dc5-a0e1-8eafb0c46825 2025-08-04 10:06:33,026 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/4cc4105b-41a8-4b22-9276-193996ffe7ee 2025-08-04 10:06:33,037 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/4cc4105b-41a8-4b22-9276-193996ffe7ee 2025-08-04 10:06:33,047 - DEBUG - Requesting: http://10.0.0.50:8082/route-target/ca82fb8f-a46f-497e-9b22-11e700fff8e6 2025-08-04 10:06:33,056 - DEBUG - Route Targets: ['target:64512:8000005'] 2025-08-04 10:06:33,056 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/a1904697-4ef3-4dc5-a0e1-8eafb0c46825 2025-08-04 10:06:33,070 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/4cc4105b-41a8-4b22-9276-193996ffe7ee 2025-08-04 10:06:33,094 - INFO - Verified VN network id 11 for VN a1904697-4ef3-4dc5-a0e1-8eafb0c46825 2025-08-04 10:06:33,094 - INFO - Verifications in API Server for VN ctest-vn4-87624892 passed 2025-08-04 10:06:33,094 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/a1904697-4ef3-4dc5-a0e1-8eafb0c46825 2025-08-04 10:06:33,109 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/4cc4105b-41a8-4b22-9276-193996ffe7ee 2025-08-04 10:06:33,120 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/4cc4105b-41a8-4b22-9276-193996ffe7ee 2025-08-04 10:06:33,128 - DEBUG - Requesting: http://10.0.0.50:8082/route-target/ca82fb8f-a46f-497e-9b22-11e700fff8e6 2025-08-04 10:06:33,142 - DEBUG - Control-node 10.0.0.50 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-39037403:ctest-vn4-87624892', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-39037403', 'owner-access': '7', 'group': 'member', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '11641882652431306181', 'uuid-lslong': '11592703801064450085'}, 'enable': 'true', 'created': '2025-08-04T10:06:31', 'last-modified': '2025-08-04T10:06:32', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.818865'} 2025-08-04 10:06:33,150 - DEBUG - Route Targets: ['target:64512:8000005'] 2025-08-04 10:06:33,150 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-87624892 passed 2025-08-04 10:06:33,151 - DEBUG - ====Verifying policy data for ctest-vn4-87624892 in API_Server ====== 2025-08-04 10:06:33,151 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2025-08-04 10:06:33,158 - DEBUG - Requesting: http://10.0.0.50:8082/domain/d16048ad-2f86-4210-b688-2a095b65d0e1 2025-08-04 10:06:33,172 - DEBUG - Requesting: http://10.0.0.50:8082/project/42950710-772d-4f52-a873-5bb5c52fa8b5 2025-08-04 10:06:33,258 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/a1904697-4ef3-4dc5-a0e1-8eafb0c46825 2025-08-04 10:06:33,270 - DEBUG - ==>Verifying data for policy with id: 35606396-0e5d-4aed-a68f-832a6ffd911c, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-39037403', 'ctest-policy1-79271060'] 2025-08-04 10:06:33,271 - INFO - VN ctest-vn4-87624892 Policy verification: verify_vn_policy_in_api_server, status: True 2025-08-04 10:06:33,271 - DEBUG - Verifying the vn in opserver 2025-08-04 10:06:33,271 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-39037403:ctest-vn4-87624892 virtual network link through opserver 10.0.0.50 2025-08-04 10:06:33,271 - DEBUG - Requesting: http://10.0.0.50:8081/analytics/uves/virtual-networks 2025-08-04 10:06:33,570 - DEBUG - Requesting: http://10.0.0.50:8081/analytics/uves/virtual-networks 2025-08-04 10:06:33,637 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-39037403:ctest-vn4-87624892', 'href': 'http://10.0.0.50:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-39037403:ctest-vn4-87624892?flat'} 2025-08-04 10:06:33,637 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-39037403:ctest-vn4-87624892 is found in opserver 2025-08-04 10:06:33,651 - DEBUG - Do not have enough data to verify VN in agent 2025-08-04 10:06:33,656 - DEBUG - VRF ids for VN ctest-vn4-87624892: {} 2025-08-04 10:06:33,657 - DEBUG - ====Verifying data for ctest-policy1-79271060 in API_Server ====== 2025-08-04 10:06:33,657 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2025-08-04 10:06:33,664 - DEBUG - Requesting: http://10.0.0.50:8082/domain/d16048ad-2f86-4210-b688-2a095b65d0e1 2025-08-04 10:06:33,679 - DEBUG - Requesting: http://10.0.0.50:8082/project/42950710-772d-4f52-a873-5bb5c52fa8b5 2025-08-04 10:06:33,763 - DEBUG - Requesting: http://10.0.0.50:8082/network-policy/35606396-0e5d-4aed-a68f-832a6ffd911c 2025-08-04 10:06:33,779 - INFO - Verified policy ctest-policy1-79271060 in API Server, Result: True 2025-08-04 10:06:33,779 - INFO - Done with setup and verification, moving onto test .. 2025-08-04 10:06:33,791 - INFO - Deleting VN ctest-vn4-87624892 2025-08-04 10:06:33,960 - DEBUG - Response for deleting network () 2025-08-04 10:06:33,960 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/4cc4105b-41a8-4b22-9276-193996ffe7ee 2025-08-04 10:06:33,969 - DEBUG - Response Code: 404 2025-08-04 10:06:33,969 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2025-08-04 10:06:33,979 - DEBUG - Requesting: http://10.0.0.50:8082/domain/d16048ad-2f86-4210-b688-2a095b65d0e1 2025-08-04 10:06:34,039 - DEBUG - Requesting: http://10.0.0.50:8082/project/42950710-772d-4f52-a873-5bb5c52fa8b5 2025-08-04 10:06:34,126 - INFO - Validated that VN ctest-vn4-87624892 is not found in API Server 2025-08-04 10:06:34,146 - DEBUG - VN ctest-vn4-87624892 is not present in Agent 10.0.0.50 2025-08-04 10:06:34,146 - INFO - Validated that VN ctest-vn4-87624892 is not in any agent 2025-08-04 10:06:34,168 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-87624892 info 2025-08-04 10:06:34,208 - INFO - Deleted policy ctest-policy1-79271060 2025-08-04 10:06:34,392 - DEBUG - policy ctest-policy1-79271060 is not found in API Server 2025-08-04 10:06:34,652 - DEBUG - No XMPP flaps were noticed during the test 2025-08-04 10:06:34,652 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04] 2025-08-04 10:06:34,652 - INFO - -------------------------------------------------------------------------------- 2025-08-04 10:06:34,947 - DEBUG - No XMPP flaps were noticed during the test 2025-08-04 10:06:34,947 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04] 2025-08-04 10:06:34,947 - INFO - -------------------------------------------------------------------------------- 2025-08-04 10:06:35,664 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-39037403, ID : 42950710-772d-4f52-a873-5bb5c52fa8b5