2025-08-12 15:59:38,154 - INFO - Domain Default found not creating 2025-08-12 15:59:38,264 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-72067060 not found, creating it 2025-08-12 15:59:38,750 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-72067060, ID : 7a921388-c2be-4c31-8d9f-8b2be1014163 2025-08-12 15:59:40,021 - INFO - ================================================================================ 2025-08-12 15:59:40,021 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-08-12 15:59:40,275 - DEBUG - Nothing to compare xmpp stats {'10.0.0.133': {'10.20.0.17': '0'}} with 2025-08-12 15:59:40,275 - INFO - Initial checks done. Running the testcase now 2025-08-12 15:59:40,275 - INFO - 2025-08-12 15:59:40,275 - INFO - ================================================================================ 2025-08-12 15:59:40,275 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-08-12 15:59:40,275 - 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-12 15:59:40,567 - DEBUG - Nothing to compare xmpp stats {'10.0.0.133': {'10.20.0.17': '0'}} with 2025-08-12 15:59:40,567 - INFO - Initial checks done. Running the testcase now 2025-08-12 15:59:40,567 - INFO - 2025-08-12 15:59:40,901 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-72067060:ctest-vn4-64858937, 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-72067060:ctest-vn4-64858937, 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-72067060:ctest-vn4-64858937, 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-72067060:ctest-vn4-64858937, 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-12 15:59:41,391 - DEBUG - Response for create_network : {'network': {'id': '70e90340-ebfa-48d3-8b09-df35c35b1c0e', 'name': 'ctest-vn4-64858937', 'tenant_id': '7a921388c2be4c318d9f8b2be1014163', 'project_id': '7a921388c2be4c318d9f8b2be1014163', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-72067060', 'ctest-vn4-64858937'], 'port_security_enabled': True, 'description': ''}} 2025-08-12 15:59:41,586 - DEBUG - Response for create_subnet : {'subnet': {'id': 'ff8a9ae2-5b84-4b1c-813f-32777ae6b152', 'name': '', 'tenant_id': '7a921388c2be4c318d9f8b2be1014163', 'network_id': '70e90340-ebfa-48d3-8b09-df35c35b1c0e', 'ip_version': 4, 'cidr': '163.228.215.64/26', 'allocation_pools': [{'start': '163.228.215.66', 'end': '163.228.215.126'}], 'gateway_ip': '163.228.215.65', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '163.228.215.66', 'tags': [], 'project_id': '7a921388c2be4c318d9f8b2be1014163'}} 2025-08-12 15:59:41,761 - DEBUG - Response for create_subnet : {'subnet': {'id': '40b94ddc-4f37-4923-9fac-dbaa32416df6', 'name': '', 'tenant_id': '7a921388c2be4c318d9f8b2be1014163', 'network_id': '70e90340-ebfa-48d3-8b09-df35c35b1c0e', 'ip_version': 6, 'cidr': '397a:6458:6d7:c0e6:1916:ed7d::/96', 'allocation_pools': [{'start': '397a:6458:6d7:c0e6:1916:ed7d:0:2', 'end': '397a:6458:6d7:c0e6:1916:ed7d:ffff:fffe'}], 'gateway_ip': '397a:6458:6d7:c0e6:1916:ed7d:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '397a:6458:6d7:c0e6:1916:ed7d:0:2', 'tags': [], 'project_id': '7a921388c2be4c318d9f8b2be1014163'}} 2025-08-12 15:59:41,777 - INFO - Created VN ctest-vn4-64858937 2025-08-12 15:59:41,830 - DEBUG - VN ctest-vn4-64858937 UUID is 70e90340-ebfa-48d3-8b09-df35c35b1c0e 2025-08-12 15:59:42,009 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': '70e90340-ebfa-48d3-8b09-df35c35b1c0e', 'name': 'ctest-vn4-64858937', 'tenant_id': '7a921388c2be4c318d9f8b2be1014163', 'project_id': '7a921388c2be4c318d9f8b2be1014163', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['ff8a9ae2-5b84-4b1c-813f-32777ae6b152', '40b94ddc-4f37-4923-9fac-dbaa32416df6'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-72067060', 'ctest-vn4-64858937'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-72067060', 'ctest-policy1-53929764']], 'subnet_ipam': [{'subnet_cidr': '163.228.215.64/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '397a:6458:6d7:c0e6:1916:ed7d::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2025-08-12 15:59:42,166 - DEBUG - Requesting: http://10.0.0.133:8082/domains 2025-08-12 15:59:42,452 - DEBUG - Requesting: http://10.0.0.133:8082/domains 2025-08-12 15:59:42,476 - DEBUG - Requesting: http://10.0.0.133:8082/domain/51a8d18b-6947-4111-b900-4e4b82af27cc 2025-08-12 15:59:42,488 - DEBUG - Requesting: http://10.0.0.133:8082/project/7a921388-c2be-4c31-8d9f-8b2be1014163 2025-08-12 15:59:42,557 - DEBUG - Requesting: http://10.0.0.133:8082/virtual-network/70e90340-ebfa-48d3-8b09-df35c35b1c0e 2025-08-12 15:59:42,568 - DEBUG - Requesting: http://10.0.0.133:8082/virtual-network/70e90340-ebfa-48d3-8b09-df35c35b1c0e 2025-08-12 15:59:42,577 - DEBUG - Requesting: http://10.0.0.133:8082/routing-instance/476db83b-3953-4ac7-bff4-c1a37aa36f5e 2025-08-12 15:59:42,584 - DEBUG - Requesting: http://10.0.0.133:8082/routing-instance/476db83b-3953-4ac7-bff4-c1a37aa36f5e 2025-08-12 15:59:42,590 - DEBUG - Requesting: http://10.0.0.133:8082/route-target/950ddd5f-4575-4329-8d0a-99ee81ae44ff 2025-08-12 15:59:42,595 - DEBUG - Route Targets: ['target:64512:8000005'] 2025-08-12 15:59:42,595 - DEBUG - Requesting: http://10.0.0.133:8082/virtual-network/70e90340-ebfa-48d3-8b09-df35c35b1c0e 2025-08-12 15:59:42,604 - DEBUG - Requesting: http://10.0.0.133:8082/routing-instance/476db83b-3953-4ac7-bff4-c1a37aa36f5e 2025-08-12 15:59:42,616 - INFO - Verified VN network id 11 for VN 70e90340-ebfa-48d3-8b09-df35c35b1c0e 2025-08-12 15:59:42,616 - INFO - Verifications in API Server for VN ctest-vn4-64858937 passed 2025-08-12 15:59:42,616 - DEBUG - Requesting: http://10.0.0.133:8082/virtual-network/70e90340-ebfa-48d3-8b09-df35c35b1c0e 2025-08-12 15:59:42,625 - DEBUG - Requesting: http://10.0.0.133:8082/routing-instance/476db83b-3953-4ac7-bff4-c1a37aa36f5e 2025-08-12 15:59:42,631 - DEBUG - Requesting: http://10.0.0.133:8082/routing-instance/476db83b-3953-4ac7-bff4-c1a37aa36f5e 2025-08-12 15:59:42,637 - DEBUG - Requesting: http://10.0.0.133:8082/route-target/950ddd5f-4575-4329-8d0a-99ee81ae44ff 2025-08-12 15:59:42,647 - DEBUG - Control-node 10.0.0.133 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-72067060:ctest-vn4-64858937', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-72067060', 'owner-access': '7', 'group': 'member', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '8136037779193350355', 'uuid-lslong': '10018784268066167822'}, 'enable': 'true', 'created': '2025-08-12T15:59:41', 'last-modified': '2025-08-12T15:59:41', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.664088'} 2025-08-12 15:59:42,655 - DEBUG - Route Targets: ['target:64512:8000005'] 2025-08-12 15:59:42,655 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-64858937 passed 2025-08-12 15:59:42,655 - DEBUG - ====Verifying policy data for ctest-vn4-64858937 in API_Server ====== 2025-08-12 15:59:42,655 - DEBUG - Requesting: http://10.0.0.133:8082/domains 2025-08-12 15:59:42,660 - DEBUG - Requesting: http://10.0.0.133:8082/domain/51a8d18b-6947-4111-b900-4e4b82af27cc 2025-08-12 15:59:42,670 - DEBUG - Requesting: http://10.0.0.133:8082/project/7a921388-c2be-4c31-8d9f-8b2be1014163 2025-08-12 15:59:42,740 - DEBUG - Requesting: http://10.0.0.133:8082/virtual-network/70e90340-ebfa-48d3-8b09-df35c35b1c0e 2025-08-12 15:59:42,750 - DEBUG - ==>Verifying data for policy with id: 37381a67-3b78-4d83-be8b-bddc60724870, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-72067060', 'ctest-policy1-53929764'] 2025-08-12 15:59:42,750 - INFO - VN ctest-vn4-64858937 Policy verification: verify_vn_policy_in_api_server, status: True 2025-08-12 15:59:42,750 - DEBUG - Verifying the vn in opserver 2025-08-12 15:59:42,750 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-72067060:ctest-vn4-64858937 virtual network link through opserver 10.0.0.133 2025-08-12 15:59:42,750 - DEBUG - Requesting: http://10.0.0.133:8081/analytics/uves/virtual-networks 2025-08-12 15:59:43,038 - DEBUG - Requesting: http://10.0.0.133:8081/analytics/uves/virtual-networks 2025-08-12 15:59:43,085 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-72067060:ctest-vn4-64858937', 'href': 'http://10.0.0.133:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-72067060:ctest-vn4-64858937?flat'} 2025-08-12 15:59:43,085 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-72067060:ctest-vn4-64858937 is found in opserver 2025-08-12 15:59:43,095 - DEBUG - Do not have enough data to verify VN in agent 2025-08-12 15:59:43,099 - DEBUG - VRF ids for VN ctest-vn4-64858937: {} 2025-08-12 15:59:43,100 - DEBUG - ====Verifying data for ctest-policy1-53929764 in API_Server ====== 2025-08-12 15:59:43,100 - DEBUG - Requesting: http://10.0.0.133:8082/domains 2025-08-12 15:59:43,104 - DEBUG - Requesting: http://10.0.0.133:8082/domain/51a8d18b-6947-4111-b900-4e4b82af27cc 2025-08-12 15:59:43,114 - DEBUG - Requesting: http://10.0.0.133:8082/project/7a921388-c2be-4c31-8d9f-8b2be1014163 2025-08-12 15:59:43,184 - DEBUG - Requesting: http://10.0.0.133:8082/network-policy/37381a67-3b78-4d83-be8b-bddc60724870 2025-08-12 15:59:43,193 - INFO - Verified policy ctest-policy1-53929764 in API Server, Result: True 2025-08-12 15:59:43,193 - INFO - Done with setup and verification, moving onto test .. 2025-08-12 15:59:43,200 - INFO - Deleting VN ctest-vn4-64858937 2025-08-12 15:59:43,303 - DEBUG - Response for deleting network () 2025-08-12 15:59:43,303 - DEBUG - Requesting: http://10.0.0.133:8082/routing-instance/476db83b-3953-4ac7-bff4-c1a37aa36f5e 2025-08-12 15:59:43,308 - DEBUG - Response Code: 404 2025-08-12 15:59:43,308 - DEBUG - Requesting: http://10.0.0.133:8082/domains 2025-08-12 15:59:43,312 - DEBUG - Requesting: http://10.0.0.133:8082/domain/51a8d18b-6947-4111-b900-4e4b82af27cc 2025-08-12 15:59:43,362 - DEBUG - Requesting: http://10.0.0.133:8082/project/7a921388-c2be-4c31-8d9f-8b2be1014163 2025-08-12 15:59:43,429 - INFO - Validated that VN ctest-vn4-64858937 is not found in API Server 2025-08-12 15:59:43,439 - DEBUG - VN ctest-vn4-64858937 is not present in Agent 10.0.0.133 2025-08-12 15:59:43,439 - INFO - Validated that VN ctest-vn4-64858937 is not in any agent 2025-08-12 15:59:43,454 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-64858937 info 2025-08-12 15:59:43,475 - INFO - Deleted policy ctest-policy1-53929764 2025-08-12 15:59:43,634 - DEBUG - policy ctest-policy1-53929764 is not found in API Server 2025-08-12 15:59:43,891 - DEBUG - No XMPP flaps were noticed during the test 2025-08-12 15:59:43,891 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:03] 2025-08-12 15:59:43,891 - INFO - -------------------------------------------------------------------------------- 2025-08-12 15:59:44,174 - DEBUG - No XMPP flaps were noticed during the test 2025-08-12 15:59:44,174 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04] 2025-08-12 15:59:44,174 - INFO - -------------------------------------------------------------------------------- 2025-08-12 15:59:44,801 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-72067060, ID : 7a921388-c2be-4c31-8d9f-8b2be1014163