2025-08-22 16:33:30,769 - INFO - Domain Default found not creating 2025-08-22 16:33:30,914 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-45965386 not found, creating it 2025-08-22 16:33:31,415 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-45965386, ID : 1eba5211-e88a-4062-84f5-7d2f212e53f0 2025-08-22 16:33:32,864 - INFO - ================================================================================ 2025-08-22 16:33:32,864 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-08-22 16:33:33,118 - DEBUG - Nothing to compare xmpp stats {'10.0.0.254': {'10.20.0.17': '0'}} with 2025-08-22 16:33:33,119 - INFO - Initial checks done. Running the testcase now 2025-08-22 16:33:33,119 - INFO - 2025-08-22 16:33:33,119 - INFO - ================================================================================ 2025-08-22 16:33:33,119 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-08-22 16:33:33,119 - 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-22 16:33:33,410 - DEBUG - Nothing to compare xmpp stats {'10.0.0.254': {'10.20.0.17': '0'}} with 2025-08-22 16:33:33,410 - INFO - Initial checks done. Running the testcase now 2025-08-22 16:33:33,410 - INFO - 2025-08-22 16:33:33,757 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-45965386:ctest-vn4-98674791, 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-45965386:ctest-vn4-98674791, 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-45965386:ctest-vn4-98674791, 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-45965386:ctest-vn4-98674791, 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-22 16:33:34,289 - DEBUG - Response for create_network : {'network': {'id': '1546deca-09fc-4546-b906-a550959465c0', 'name': 'ctest-vn4-98674791', 'tenant_id': '1eba5211e88a406284f57d2f212e53f0', 'project_id': '1eba5211e88a406284f57d2f212e53f0', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-45965386', 'ctest-vn4-98674791'], 'port_security_enabled': True, 'description': ''}} 2025-08-22 16:33:34,514 - DEBUG - Response for create_subnet : {'subnet': {'id': '45c95e4f-dc09-4a59-807f-870a8543364d', 'name': '', 'tenant_id': '1eba5211e88a406284f57d2f212e53f0', 'network_id': '1546deca-09fc-4546-b906-a550959465c0', 'ip_version': 4, 'cidr': '117.98.34.128/26', 'allocation_pools': [{'start': '117.98.34.130', 'end': '117.98.34.190'}], 'gateway_ip': '117.98.34.129', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '117.98.34.130', 'tags': [], 'project_id': '1eba5211e88a406284f57d2f212e53f0'}} 2025-08-22 16:33:34,673 - DEBUG - Response for create_subnet : {'subnet': {'id': 'd92d47ab-61f4-4d1b-954e-6191ffb9c653', 'name': '', 'tenant_id': '1eba5211e88a406284f57d2f212e53f0', 'network_id': '1546deca-09fc-4546-b906-a550959465c0', 'ip_version': 6, 'cidr': '2052:5c6c:23f6:c779:d5d7:b315::/96', 'allocation_pools': [{'start': '2052:5c6c:23f6:c779:d5d7:b315:0:2', 'end': '2052:5c6c:23f6:c779:d5d7:b315:ffff:fffe'}], 'gateway_ip': '2052:5c6c:23f6:c779:d5d7:b315:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '2052:5c6c:23f6:c779:d5d7:b315:0:2', 'tags': [], 'project_id': '1eba5211e88a406284f57d2f212e53f0'}} 2025-08-22 16:33:34,691 - INFO - Created VN ctest-vn4-98674791 2025-08-22 16:33:34,745 - DEBUG - VN ctest-vn4-98674791 UUID is 1546deca-09fc-4546-b906-a550959465c0 2025-08-22 16:33:34,966 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': '1546deca-09fc-4546-b906-a550959465c0', 'name': 'ctest-vn4-98674791', 'tenant_id': '1eba5211e88a406284f57d2f212e53f0', 'project_id': '1eba5211e88a406284f57d2f212e53f0', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['45c95e4f-dc09-4a59-807f-870a8543364d', 'd92d47ab-61f4-4d1b-954e-6191ffb9c653'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-45965386', 'ctest-vn4-98674791'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-45965386', 'ctest-policy1-26342908']], 'subnet_ipam': [{'subnet_cidr': '117.98.34.128/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '2052:5c6c:23f6:c779:d5d7:b315::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2025-08-22 16:33:35,145 - DEBUG - Requesting: http://10.0.0.254:8082/domains 2025-08-22 16:33:35,437 - DEBUG - Requesting: http://10.0.0.254:8082/domains 2025-08-22 16:33:35,465 - DEBUG - Requesting: http://10.0.0.254:8082/domain/bf53a1a6-cb6d-44dc-83b6-3bb6a4e6571e 2025-08-22 16:33:35,482 - DEBUG - Requesting: http://10.0.0.254:8082/project/1eba5211-e88a-4062-84f5-7d2f212e53f0 2025-08-22 16:33:35,566 - DEBUG - Requesting: http://10.0.0.254:8082/virtual-network/1546deca-09fc-4546-b906-a550959465c0 2025-08-22 16:33:35,581 - DEBUG - Requesting: http://10.0.0.254:8082/virtual-network/1546deca-09fc-4546-b906-a550959465c0 2025-08-22 16:33:35,592 - DEBUG - Requesting: http://10.0.0.254:8082/routing-instance/bb523f01-f292-4f71-87db-009c26d6b129 2025-08-22 16:33:35,600 - DEBUG - Requesting: http://10.0.0.254:8082/routing-instance/bb523f01-f292-4f71-87db-009c26d6b129 2025-08-22 16:33:35,607 - DEBUG - Requesting: http://10.0.0.254:8082/route-target/3364bfdc-7660-40ea-8dc4-e99e73077096 2025-08-22 16:33:35,615 - DEBUG - Route Targets: ['target:64512:8000005'] 2025-08-22 16:33:35,615 - DEBUG - Requesting: http://10.0.0.254:8082/virtual-network/1546deca-09fc-4546-b906-a550959465c0 2025-08-22 16:33:35,629 - DEBUG - Requesting: http://10.0.0.254:8082/routing-instance/bb523f01-f292-4f71-87db-009c26d6b129 2025-08-22 16:33:35,648 - INFO - Verified VN network id 12 for VN 1546deca-09fc-4546-b906-a550959465c0 2025-08-22 16:33:35,648 - INFO - Verifications in API Server for VN ctest-vn4-98674791 passed 2025-08-22 16:33:35,648 - DEBUG - Requesting: http://10.0.0.254:8082/virtual-network/1546deca-09fc-4546-b906-a550959465c0 2025-08-22 16:33:35,666 - DEBUG - Requesting: http://10.0.0.254:8082/routing-instance/bb523f01-f292-4f71-87db-009c26d6b129 2025-08-22 16:33:35,675 - DEBUG - Requesting: http://10.0.0.254:8082/routing-instance/bb523f01-f292-4f71-87db-009c26d6b129 2025-08-22 16:33:35,683 - DEBUG - Requesting: http://10.0.0.254:8082/route-target/3364bfdc-7660-40ea-8dc4-e99e73077096 2025-08-22 16:33:35,699 - DEBUG - Control-node 10.0.0.254 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-45965386:ctest-vn4-98674791', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-45965386', 'owner-access': '7', 'group': 'reader', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '1533157682498520390', 'uuid-lslong': '13332525512402429376'}, 'enable': 'true', 'created': '2025-08-22T16:33:34', 'last-modified': '2025-08-22T16:33:34', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.769099'} 2025-08-22 16:33:35,708 - DEBUG - Route Targets: ['target:64512:8000005'] 2025-08-22 16:33:35,708 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-98674791 passed 2025-08-22 16:33:35,709 - DEBUG - ====Verifying policy data for ctest-vn4-98674791 in API_Server ====== 2025-08-22 16:33:35,709 - DEBUG - Requesting: http://10.0.0.254:8082/domains 2025-08-22 16:33:35,716 - DEBUG - Requesting: http://10.0.0.254:8082/domain/bf53a1a6-cb6d-44dc-83b6-3bb6a4e6571e 2025-08-22 16:33:35,732 - DEBUG - Requesting: http://10.0.0.254:8082/project/1eba5211-e88a-4062-84f5-7d2f212e53f0 2025-08-22 16:33:35,816 - DEBUG - Requesting: http://10.0.0.254:8082/virtual-network/1546deca-09fc-4546-b906-a550959465c0 2025-08-22 16:33:35,829 - DEBUG - ==>Verifying data for policy with id: 94f8e251-2df7-4852-8ea5-65c5cc61c949, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-45965386', 'ctest-policy1-26342908'] 2025-08-22 16:33:35,829 - INFO - VN ctest-vn4-98674791 Policy verification: verify_vn_policy_in_api_server, status: True 2025-08-22 16:33:35,829 - DEBUG - Verifying the vn in opserver 2025-08-22 16:33:35,829 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-45965386:ctest-vn4-98674791 virtual network link through opserver 10.0.0.254 2025-08-22 16:33:35,829 - DEBUG - Requesting: http://10.0.0.254:8081/analytics/uves/virtual-networks 2025-08-22 16:33:36,123 - DEBUG - Requesting: http://10.0.0.254:8081/analytics/uves/virtual-networks 2025-08-22 16:33:36,181 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-45965386:ctest-vn4-98674791', 'href': 'http://10.0.0.254:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-45965386:ctest-vn4-98674791?flat'} 2025-08-22 16:33:36,181 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-45965386:ctest-vn4-98674791 is found in opserver 2025-08-22 16:33:36,192 - DEBUG - Do not have enough data to verify VN in agent 2025-08-22 16:33:36,197 - DEBUG - VRF ids for VN ctest-vn4-98674791: {} 2025-08-22 16:33:36,197 - DEBUG - ====Verifying data for ctest-policy1-26342908 in API_Server ====== 2025-08-22 16:33:36,197 - DEBUG - Requesting: http://10.0.0.254:8082/domains 2025-08-22 16:33:36,202 - DEBUG - Requesting: http://10.0.0.254:8082/domain/bf53a1a6-cb6d-44dc-83b6-3bb6a4e6571e 2025-08-22 16:33:36,213 - DEBUG - Requesting: http://10.0.0.254:8082/project/1eba5211-e88a-4062-84f5-7d2f212e53f0 2025-08-22 16:33:36,289 - DEBUG - Requesting: http://10.0.0.254:8082/network-policy/94f8e251-2df7-4852-8ea5-65c5cc61c949 2025-08-22 16:33:36,302 - INFO - Verified policy ctest-policy1-26342908 in API Server, Result: True 2025-08-22 16:33:36,302 - INFO - Done with setup and verification, moving onto test .. 2025-08-22 16:33:36,310 - INFO - Deleting VN ctest-vn4-98674791 2025-08-22 16:33:36,438 - DEBUG - Response for deleting network () 2025-08-22 16:33:36,438 - DEBUG - Requesting: http://10.0.0.254:8082/routing-instance/bb523f01-f292-4f71-87db-009c26d6b129 2025-08-22 16:33:36,443 - DEBUG - Response Code: 404 2025-08-22 16:33:36,443 - DEBUG - Requesting: http://10.0.0.254:8082/domains 2025-08-22 16:33:36,452 - DEBUG - Requesting: http://10.0.0.254:8082/domain/bf53a1a6-cb6d-44dc-83b6-3bb6a4e6571e 2025-08-22 16:33:36,506 - DEBUG - Requesting: http://10.0.0.254:8082/project/1eba5211-e88a-4062-84f5-7d2f212e53f0 2025-08-22 16:33:36,579 - INFO - Validated that VN ctest-vn4-98674791 is not found in API Server 2025-08-22 16:33:36,591 - DEBUG - VN ctest-vn4-98674791 is not present in Agent 10.0.0.254 2025-08-22 16:33:36,591 - INFO - Validated that VN ctest-vn4-98674791 is not in any agent 2025-08-22 16:33:36,606 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-98674791 info 2025-08-22 16:33:36,633 - INFO - Deleted policy ctest-policy1-26342908 2025-08-22 16:33:36,801 - DEBUG - policy ctest-policy1-26342908 is not found in API Server 2025-08-22 16:33:37,058 - DEBUG - No XMPP flaps were noticed during the test 2025-08-22 16:33:37,058 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04] 2025-08-22 16:33:37,058 - INFO - -------------------------------------------------------------------------------- 2025-08-22 16:33:37,347 - DEBUG - No XMPP flaps were noticed during the test 2025-08-22 16:33:37,347 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:05] 2025-08-22 16:33:37,347 - INFO - -------------------------------------------------------------------------------- 2025-08-22 16:33:38,015 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-45965386, ID : 1eba5211-e88a-4062-84f5-7d2f212e53f0