2025-09-08 15:40:19,867 - INFO - Domain Default found not creating 2025-09-08 15:40:19,997 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-23935882 not found, creating it 2025-09-08 15:40:20,426 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-23935882, ID : 1eef3833-9545-47d5-8fe6-46848e28d23c 2025-09-08 15:40:21,766 - INFO - ================================================================================ 2025-09-08 15:40:21,766 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-09-08 15:40:22,018 - DEBUG - Nothing to compare xmpp stats {'10.0.0.22': {'10.20.0.25': '0'}} with 2025-09-08 15:40:22,019 - INFO - Initial checks done. Running the testcase now 2025-09-08 15:40:22,019 - INFO - 2025-09-08 15:40:22,019 - INFO - ================================================================================ 2025-09-08 15:40:22,019 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-09-08 15:40:22,019 - 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-08 15:40:22,318 - DEBUG - Nothing to compare xmpp stats {'10.0.0.22': {'10.20.0.25': '0'}} with 2025-09-08 15:40:22,319 - INFO - Initial checks done. Running the testcase now 2025-09-08 15:40:22,319 - INFO - 2025-09-08 15:40:22,657 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-23935882:ctest-vn4-81442889, 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-23935882:ctest-vn4-81442889, 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-23935882:ctest-vn4-81442889, 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-23935882:ctest-vn4-81442889, 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-08 15:40:23,154 - DEBUG - Response for create_network : {'network': {'id': '1382bc91-ba3e-45cd-b66b-00b6663479df', 'name': 'ctest-vn4-81442889', 'tenant_id': '1eef3833954547d58fe646848e28d23c', 'project_id': '1eef3833954547d58fe646848e28d23c', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-23935882', 'ctest-vn4-81442889'], 'port_security_enabled': True, 'description': ''}} 2025-09-08 15:40:23,325 - DEBUG - Response for create_subnet : {'subnet': {'id': '0fc393c3-6f93-47f1-8bfe-0c932a084d2f', 'name': '', 'tenant_id': '1eef3833954547d58fe646848e28d23c', 'network_id': '1382bc91-ba3e-45cd-b66b-00b6663479df', 'ip_version': 4, 'cidr': '78.47.211.64/26', 'allocation_pools': [{'start': '78.47.211.66', 'end': '78.47.211.126'}], 'gateway_ip': '78.47.211.65', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '78.47.211.66', 'tags': [], 'project_id': '1eef3833954547d58fe646848e28d23c'}} 2025-09-08 15:40:23,504 - DEBUG - Response for create_subnet : {'subnet': {'id': '72789d8d-fe6f-4981-af82-da08af718c70', 'name': '', 'tenant_id': '1eef3833954547d58fe646848e28d23c', 'network_id': '1382bc91-ba3e-45cd-b66b-00b6663479df', 'ip_version': 6, 'cidr': '34fb:194f:533a:5b4a:edd9:5191::/96', 'allocation_pools': [{'start': '34fb:194f:533a:5b4a:edd9:5191:0:2', 'end': '34fb:194f:533a:5b4a:edd9:5191:ffff:fffe'}], 'gateway_ip': '34fb:194f:533a:5b4a:edd9:5191:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '34fb:194f:533a:5b4a:edd9:5191:0:2', 'tags': [], 'project_id': '1eef3833954547d58fe646848e28d23c'}} 2025-09-08 15:40:23,523 - INFO - Created VN ctest-vn4-81442889 2025-09-08 15:40:23,574 - DEBUG - VN ctest-vn4-81442889 UUID is 1382bc91-ba3e-45cd-b66b-00b6663479df 2025-09-08 15:40:23,811 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': '1382bc91-ba3e-45cd-b66b-00b6663479df', 'name': 'ctest-vn4-81442889', 'tenant_id': '1eef3833954547d58fe646848e28d23c', 'project_id': '1eef3833954547d58fe646848e28d23c', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['0fc393c3-6f93-47f1-8bfe-0c932a084d2f', '72789d8d-fe6f-4981-af82-da08af718c70'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-23935882', 'ctest-vn4-81442889'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-23935882', 'ctest-policy1-35082303']], 'subnet_ipam': [{'subnet_cidr': '78.47.211.64/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '34fb:194f:533a:5b4a:edd9:5191::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2025-09-08 15:40:23,970 - DEBUG - Requesting: http://10.0.0.22:8082/domains 2025-09-08 15:40:24,259 - DEBUG - Requesting: http://10.0.0.22:8082/domains 2025-09-08 15:40:24,284 - DEBUG - Requesting: http://10.0.0.22:8082/domain/65144227-5bef-4bc6-9fbb-39dd2a7958cb 2025-09-08 15:40:24,296 - DEBUG - Requesting: http://10.0.0.22:8082/project/1eef3833-9545-47d5-8fe6-46848e28d23c 2025-09-08 15:40:24,366 - DEBUG - Requesting: http://10.0.0.22:8082/virtual-network/1382bc91-ba3e-45cd-b66b-00b6663479df 2025-09-08 15:40:24,379 - DEBUG - Requesting: http://10.0.0.22:8082/virtual-network/1382bc91-ba3e-45cd-b66b-00b6663479df 2025-09-08 15:40:24,389 - DEBUG - Requesting: http://10.0.0.22:8082/routing-instance/2655a549-2a89-4991-abd6-fc39c3d9ca80 2025-09-08 15:40:24,397 - DEBUG - Requesting: http://10.0.0.22:8082/routing-instance/2655a549-2a89-4991-abd6-fc39c3d9ca80 2025-09-08 15:40:24,405 - DEBUG - Requesting: http://10.0.0.22:8082/route-target/3f088a44-d344-4b2a-820c-360fc1b06560 2025-09-08 15:40:24,412 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-09-08 15:40:24,412 - DEBUG - Requesting: http://10.0.0.22:8082/virtual-network/1382bc91-ba3e-45cd-b66b-00b6663479df 2025-09-08 15:40:24,421 - DEBUG - Requesting: http://10.0.0.22:8082/routing-instance/2655a549-2a89-4991-abd6-fc39c3d9ca80 2025-09-08 15:40:24,437 - INFO - Verified VN network id 12 for VN 1382bc91-ba3e-45cd-b66b-00b6663479df 2025-09-08 15:40:24,438 - INFO - Verifications in API Server for VN ctest-vn4-81442889 passed 2025-09-08 15:40:24,438 - DEBUG - Requesting: http://10.0.0.22:8082/virtual-network/1382bc91-ba3e-45cd-b66b-00b6663479df 2025-09-08 15:40:24,447 - DEBUG - Requesting: http://10.0.0.22:8082/routing-instance/2655a549-2a89-4991-abd6-fc39c3d9ca80 2025-09-08 15:40:24,453 - DEBUG - Requesting: http://10.0.0.22:8082/routing-instance/2655a549-2a89-4991-abd6-fc39c3d9ca80 2025-09-08 15:40:24,459 - DEBUG - Requesting: http://10.0.0.22:8082/route-target/3f088a44-d344-4b2a-820c-360fc1b06560 2025-09-08 15:40:24,469 - DEBUG - Control-node 10.0.0.22 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-23935882:ctest-vn4-81442889', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-23935882', 'owner-access': '7', 'group': 'reader', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '1405893367773939149', 'uuid-lslong': '13144600720809687519'}, 'enable': 'true', 'created': '2025-09-08T15:40:23', 'last-modified': '2025-09-08T15:40:23', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.735320'} 2025-09-08 15:40:24,483 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-09-08 15:40:24,483 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-81442889 passed 2025-09-08 15:40:24,483 - DEBUG - ====Verifying policy data for ctest-vn4-81442889 in API_Server ====== 2025-09-08 15:40:24,483 - DEBUG - Requesting: http://10.0.0.22:8082/domains 2025-09-08 15:40:24,489 - DEBUG - Requesting: http://10.0.0.22:8082/domain/65144227-5bef-4bc6-9fbb-39dd2a7958cb 2025-09-08 15:40:24,500 - DEBUG - Requesting: http://10.0.0.22:8082/project/1eef3833-9545-47d5-8fe6-46848e28d23c 2025-09-08 15:40:24,570 - DEBUG - Requesting: http://10.0.0.22:8082/virtual-network/1382bc91-ba3e-45cd-b66b-00b6663479df 2025-09-08 15:40:24,579 - DEBUG - ==>Verifying data for policy with id: a3eccd4c-189c-4217-9baf-c3d5c3860686, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-23935882', 'ctest-policy1-35082303'] 2025-09-08 15:40:24,579 - INFO - VN ctest-vn4-81442889 Policy verification: verify_vn_policy_in_api_server, status: True 2025-09-08 15:40:24,580 - DEBUG - Verifying the vn in opserver 2025-09-08 15:40:24,580 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-23935882:ctest-vn4-81442889 virtual network link through opserver 10.0.0.22 2025-09-08 15:40:24,580 - DEBUG - Requesting: http://10.0.0.22:8081/analytics/uves/virtual-networks 2025-09-08 15:40:24,868 - DEBUG - Requesting: http://10.0.0.22:8081/analytics/uves/virtual-networks 2025-09-08 15:40:24,919 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-23935882:ctest-vn4-81442889', 'href': 'http://10.0.0.22:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-23935882:ctest-vn4-81442889?flat'} 2025-09-08 15:40:24,919 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-23935882:ctest-vn4-81442889 is found in opserver 2025-09-08 15:40:24,928 - DEBUG - Do not have enough data to verify VN in agent 2025-09-08 15:40:24,932 - DEBUG - VRF ids for VN ctest-vn4-81442889: {} 2025-09-08 15:40:24,933 - DEBUG - ====Verifying data for ctest-policy1-35082303 in API_Server ====== 2025-09-08 15:40:24,933 - DEBUG - Requesting: http://10.0.0.22:8082/domains 2025-09-08 15:40:24,938 - DEBUG - Requesting: http://10.0.0.22:8082/domain/65144227-5bef-4bc6-9fbb-39dd2a7958cb 2025-09-08 15:40:24,947 - DEBUG - Requesting: http://10.0.0.22:8082/project/1eef3833-9545-47d5-8fe6-46848e28d23c 2025-09-08 15:40:25,017 - DEBUG - Requesting: http://10.0.0.22:8082/network-policy/a3eccd4c-189c-4217-9baf-c3d5c3860686 2025-09-08 15:40:25,027 - INFO - Verified policy ctest-policy1-35082303 in API Server, Result: True 2025-09-08 15:40:25,027 - INFO - Done with setup and verification, moving onto test .. 2025-09-08 15:40:25,035 - INFO - Deleting VN ctest-vn4-81442889 2025-09-08 15:40:25,162 - DEBUG - Response for deleting network () 2025-09-08 15:40:25,162 - DEBUG - Requesting: http://10.0.0.22:8082/routing-instance/2655a549-2a89-4991-abd6-fc39c3d9ca80 2025-09-08 15:40:25,167 - DEBUG - Response Code: 404 2025-09-08 15:40:25,167 - DEBUG - Requesting: http://10.0.0.22:8082/domains 2025-09-08 15:40:25,172 - DEBUG - Requesting: http://10.0.0.22:8082/domain/65144227-5bef-4bc6-9fbb-39dd2a7958cb 2025-09-08 15:40:25,223 - DEBUG - Requesting: http://10.0.0.22:8082/project/1eef3833-9545-47d5-8fe6-46848e28d23c 2025-09-08 15:40:25,295 - INFO - Validated that VN ctest-vn4-81442889 is not found in API Server 2025-09-08 15:40:25,304 - DEBUG - VN ctest-vn4-81442889 is not present in Agent 10.0.0.22 2025-09-08 15:40:25,304 - INFO - Validated that VN ctest-vn4-81442889 is not in any agent 2025-09-08 15:40:25,319 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-81442889 info 2025-09-08 15:40:25,349 - INFO - Deleted policy ctest-policy1-35082303 2025-09-08 15:40:25,518 - DEBUG - policy ctest-policy1-35082303 is not found in API Server 2025-09-08 15:40:25,779 - DEBUG - No XMPP flaps were noticed during the test
2025-09-08 15:40:25,779 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:03]
2025-09-08 15:40:25,779 - INFO - -------------------------------------------------------------------------------- 2025-09-08 15:40:26,072 - DEBUG - No XMPP flaps were noticed during the test
2025-09-08 15:40:26,072 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:05]
2025-09-08 15:40:26,072 - INFO - -------------------------------------------------------------------------------- 2025-09-08 15:40:26,721 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-23935882, ID : 1eef3833-9545-47d5-8fe6-46848e28d23c