2025-09-15 11:32:32,741 - INFO - Domain Default found not creating 2025-09-15 11:32:32,900 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-76585011 not found, creating it 2025-09-15 11:32:33,346 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-76585011, ID : 59f6123d-0460-4e81-85d0-7f7a6aaa4d48 2025-09-15 11:32:34,740 - INFO - ================================================================================ 2025-09-15 11:32:34,740 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-09-15 11:32:35,007 - DEBUG - Nothing to compare xmpp stats {'10.0.0.22': {'10.20.0.17': '0'}} with 2025-09-15 11:32:35,008 - INFO - Initial checks done. Running the testcase now 2025-09-15 11:32:35,008 - INFO - 2025-09-15 11:32:35,008 - INFO - ================================================================================ 2025-09-15 11:32:35,008 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-09-15 11:32:35,008 - 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-09-15 11:32:35,295 - DEBUG - Nothing to compare xmpp stats {'10.0.0.22': {'10.20.0.17': '0'}} with 2025-09-15 11:32:35,295 - INFO - Initial checks done. Running the testcase now 2025-09-15 11:32:35,295 - INFO - 2025-09-15 11:32:35,636 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-76585011:ctest-vn4-62469020, 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-76585011:ctest-vn4-62469020, 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-76585011:ctest-vn4-62469020, 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-76585011:ctest-vn4-62469020, 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-09-15 11:32:36,401 - DEBUG - Response for create_network : {'network': {'id': '072fba66-8d91-483e-8b54-3c95353321b2', 'name': 'ctest-vn4-62469020', 'tenant_id': '59f6123d04604e8185d07f7a6aaa4d48', 'project_id': '59f6123d04604e8185d07f7a6aaa4d48', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-76585011', 'ctest-vn4-62469020'], 'port_security_enabled': True, 'description': ''}} 2025-09-15 11:32:36,577 - DEBUG - Response for create_subnet : {'subnet': {'id': '84b2fadb-55c0-4eca-8b24-72c329091782', 'name': '', 'tenant_id': '59f6123d04604e8185d07f7a6aaa4d48', 'network_id': '072fba66-8d91-483e-8b54-3c95353321b2', 'ip_version': 4, 'cidr': '73.216.191.192/26', 'allocation_pools': [{'start': '73.216.191.194', 'end': '73.216.191.254'}], 'gateway_ip': '73.216.191.193', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '73.216.191.194', 'tags': [], 'project_id': '59f6123d04604e8185d07f7a6aaa4d48'}} 2025-09-15 11:32:36,766 - DEBUG - Response for create_subnet : {'subnet': {'id': 'ac88e764-1cbe-4ade-8e70-f7a1abb32764', 'name': '', 'tenant_id': '59f6123d04604e8185d07f7a6aaa4d48', 'network_id': '072fba66-8d91-483e-8b54-3c95353321b2', 'ip_version': 6, 'cidr': '20fd:b4d4:a61f:bba3:848e:7cb5::/96', 'allocation_pools': [{'start': '20fd:b4d4:a61f:bba3:848e:7cb5:0:2', 'end': '20fd:b4d4:a61f:bba3:848e:7cb5:ffff:fffe'}], 'gateway_ip': '20fd:b4d4:a61f:bba3:848e:7cb5:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '20fd:b4d4:a61f:bba3:848e:7cb5:0:2', 'tags': [], 'project_id': '59f6123d04604e8185d07f7a6aaa4d48'}} 2025-09-15 11:32:36,787 - INFO - Created VN ctest-vn4-62469020 2025-09-15 11:32:36,839 - DEBUG - VN ctest-vn4-62469020 UUID is 072fba66-8d91-483e-8b54-3c95353321b2 2025-09-15 11:32:37,116 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': '072fba66-8d91-483e-8b54-3c95353321b2', 'name': 'ctest-vn4-62469020', 'tenant_id': '59f6123d04604e8185d07f7a6aaa4d48', 'project_id': '59f6123d04604e8185d07f7a6aaa4d48', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['84b2fadb-55c0-4eca-8b24-72c329091782', 'ac88e764-1cbe-4ade-8e70-f7a1abb32764'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-76585011', 'ctest-vn4-62469020'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-76585011', 'ctest-policy1-52058784']], 'subnet_ipam': [{'subnet_cidr': '73.216.191.192/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '20fd:b4d4:a61f:bba3:848e:7cb5::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2025-09-15 11:32:37,275 - DEBUG - Requesting: http://10.0.0.22:8082/domains 2025-09-15 11:32:37,571 - DEBUG - Requesting: http://10.0.0.22:8082/domains 2025-09-15 11:32:37,597 - DEBUG - Requesting: http://10.0.0.22:8082/domain/b060051c-7aee-4d6e-8637-30f7274bf19e 2025-09-15 11:32:37,608 - DEBUG - Requesting: http://10.0.0.22:8082/project/59f6123d-0460-4e81-85d0-7f7a6aaa4d48 2025-09-15 11:32:37,678 - DEBUG - Requesting: http://10.0.0.22:8082/virtual-network/072fba66-8d91-483e-8b54-3c95353321b2 2025-09-15 11:32:37,690 - DEBUG - Requesting: http://10.0.0.22:8082/virtual-network/072fba66-8d91-483e-8b54-3c95353321b2 2025-09-15 11:32:37,699 - DEBUG - Requesting: http://10.0.0.22:8082/routing-instance/d860719c-c8e7-4651-9db2-97366151ba8e 2025-09-15 11:32:37,705 - DEBUG - Requesting: http://10.0.0.22:8082/routing-instance/d860719c-c8e7-4651-9db2-97366151ba8e 2025-09-15 11:32:37,711 - DEBUG - Requesting: http://10.0.0.22:8082/route-target/1720327b-1779-434d-ae43-24b31819bdf8 2025-09-15 11:32:37,717 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-09-15 11:32:37,717 - DEBUG - Requesting: http://10.0.0.22:8082/virtual-network/072fba66-8d91-483e-8b54-3c95353321b2 2025-09-15 11:32:37,726 - DEBUG - Requesting: http://10.0.0.22:8082/routing-instance/d860719c-c8e7-4651-9db2-97366151ba8e 2025-09-15 11:32:37,738 - INFO - Verified VN network id 11 for VN 072fba66-8d91-483e-8b54-3c95353321b2 2025-09-15 11:32:37,739 - INFO - Verifications in API Server for VN ctest-vn4-62469020 passed 2025-09-15 11:32:37,739 - DEBUG - Requesting: http://10.0.0.22:8082/virtual-network/072fba66-8d91-483e-8b54-3c95353321b2 2025-09-15 11:32:37,747 - DEBUG - Requesting: http://10.0.0.22:8082/routing-instance/d860719c-c8e7-4651-9db2-97366151ba8e 2025-09-15 11:32:37,753 - DEBUG - Requesting: http://10.0.0.22:8082/routing-instance/d860719c-c8e7-4651-9db2-97366151ba8e 2025-09-15 11:32:37,759 - DEBUG - Requesting: http://10.0.0.22:8082/route-target/1720327b-1779-434d-ae43-24b31819bdf8 2025-09-15 11:32:37,769 - DEBUG - Control-node 10.0.0.22 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-76585011:ctest-vn4-62469020', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-76585011', 'owner-access': '7', 'group': 'admin', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '517837431795435582', 'uuid-lslong': '10039716080856015282'}, 'enable': 'true', 'created': '2025-09-15T11:32:36', 'last-modified': '2025-09-15T11:32:37', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.688941'} 2025-09-15 11:32:37,776 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-09-15 11:32:37,776 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-62469020 passed 2025-09-15 11:32:37,777 - DEBUG - ====Verifying policy data for ctest-vn4-62469020 in API_Server ====== 2025-09-15 11:32:37,777 - DEBUG - Requesting: http://10.0.0.22:8082/domains 2025-09-15 11:32:37,783 - DEBUG - Requesting: http://10.0.0.22:8082/domain/b060051c-7aee-4d6e-8637-30f7274bf19e 2025-09-15 11:32:37,793 - DEBUG - Requesting: http://10.0.0.22:8082/project/59f6123d-0460-4e81-85d0-7f7a6aaa4d48 2025-09-15 11:32:37,865 - DEBUG - Requesting: http://10.0.0.22:8082/virtual-network/072fba66-8d91-483e-8b54-3c95353321b2 2025-09-15 11:32:37,876 - DEBUG - ==>Verifying data for policy with id: 8ace9e92-b65f-461c-bcab-62185bcd442a, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-76585011', 'ctest-policy1-52058784'] 2025-09-15 11:32:37,876 - INFO - VN ctest-vn4-62469020 Policy verification: verify_vn_policy_in_api_server, status: True 2025-09-15 11:32:37,876 - DEBUG - Verifying the vn in opserver 2025-09-15 11:32:37,876 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-76585011:ctest-vn4-62469020 virtual network link through opserver 10.0.0.22 2025-09-15 11:32:37,877 - DEBUG - Requesting: http://10.0.0.22:8081/analytics/uves/virtual-networks 2025-09-15 11:32:38,172 - DEBUG - Requesting: http://10.0.0.22:8081/analytics/uves/virtual-networks 2025-09-15 11:32:38,223 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-76585011:ctest-vn4-62469020', 'href': 'http://10.0.0.22:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-76585011:ctest-vn4-62469020?flat'} 2025-09-15 11:32:38,223 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-76585011:ctest-vn4-62469020 is found in opserver 2025-09-15 11:32:38,234 - DEBUG - Do not have enough data to verify VN in agent 2025-09-15 11:32:38,238 - DEBUG - VRF ids for VN ctest-vn4-62469020: {} 2025-09-15 11:32:38,239 - DEBUG - ====Verifying data for ctest-policy1-52058784 in API_Server ====== 2025-09-15 11:32:38,239 - DEBUG - Requesting: http://10.0.0.22:8082/domains 2025-09-15 11:32:38,244 - DEBUG - Requesting: http://10.0.0.22:8082/domain/b060051c-7aee-4d6e-8637-30f7274bf19e 2025-09-15 11:32:38,254 - DEBUG - Requesting: http://10.0.0.22:8082/project/59f6123d-0460-4e81-85d0-7f7a6aaa4d48 2025-09-15 11:32:38,325 - DEBUG - Requesting: http://10.0.0.22:8082/network-policy/8ace9e92-b65f-461c-bcab-62185bcd442a 2025-09-15 11:32:38,335 - INFO - Verified policy ctest-policy1-52058784 in API Server, Result: True 2025-09-15 11:32:38,335 - INFO - Done with setup and verification, moving onto test .. 2025-09-15 11:32:38,343 - INFO - Deleting VN ctest-vn4-62469020 2025-09-15 11:32:38,469 - DEBUG - Response for deleting network () 2025-09-15 11:32:38,469 - DEBUG - Requesting: http://10.0.0.22:8082/routing-instance/d860719c-c8e7-4651-9db2-97366151ba8e 2025-09-15 11:32:38,474 - DEBUG - Response Code: 404 2025-09-15 11:32:38,474 - DEBUG - Requesting: http://10.0.0.22:8082/domains 2025-09-15 11:32:38,479 - DEBUG - Requesting: http://10.0.0.22:8082/domain/b060051c-7aee-4d6e-8637-30f7274bf19e 2025-09-15 11:32:38,531 - DEBUG - Requesting: http://10.0.0.22:8082/project/59f6123d-0460-4e81-85d0-7f7a6aaa4d48 2025-09-15 11:32:38,606 - INFO - Validated that VN ctest-vn4-62469020 is not found in API Server 2025-09-15 11:32:38,614 - DEBUG - VN ctest-vn4-62469020 is not present in Agent 10.0.0.22 2025-09-15 11:32:38,615 - INFO - Validated that VN ctest-vn4-62469020 is not in any agent 2025-09-15 11:32:38,629 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-62469020 info 2025-09-15 11:32:38,654 - INFO - Deleted policy ctest-policy1-52058784 2025-09-15 11:32:38,815 - DEBUG - policy ctest-policy1-52058784 is not found in API Server 2025-09-15 11:32:39,072 - DEBUG - No XMPP flaps were noticed during the test 2025-09-15 11:32:39,072 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04] 2025-09-15 11:32:39,073 - INFO - -------------------------------------------------------------------------------- 2025-09-15 11:32:39,361 - DEBUG - No XMPP flaps were noticed during the test 2025-09-15 11:32:39,361 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:05] 2025-09-15 11:32:39,362 - INFO - -------------------------------------------------------------------------------- 2025-09-15 11:32:40,032 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-76585011, ID : 59f6123d-0460-4e81-85d0-7f7a6aaa4d48