2025-11-17 20:45:51,159 - INFO - Domain Default found not creating 2025-11-17 20:45:51,333 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-93272207 not found, creating it 2025-11-17 20:45:51,812 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-93272207, ID : 4a2b177e-74f1-49d8-bb61-5e5ba16d8963 2025-11-17 20:45:53,372 - INFO - ================================================================================ 2025-11-17 20:45:53,372 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-11-17 20:45:53,638 - DEBUG - Nothing to compare xmpp stats {'10.0.0.33': {'10.20.0.254': '0'}} with 2025-11-17 20:45:53,638 - INFO - Initial checks done. Running the testcase now 2025-11-17 20:45:53,638 - INFO - 2025-11-17 20:45:53,638 - INFO - ================================================================================ 2025-11-17 20:45:53,638 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-11-17 20:45:53,638 - 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-11-17 20:45:53,936 - DEBUG - Nothing to compare xmpp stats {'10.0.0.33': {'10.20.0.254': '0'}} with 2025-11-17 20:45:53,936 - INFO - Initial checks done. Running the testcase now 2025-11-17 20:45:53,936 - INFO - 2025-11-17 20:45:54,303 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-93272207:ctest-vn4-31398482, 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-93272207:ctest-vn4-31398482, 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-93272207:ctest-vn4-31398482, 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-93272207:ctest-vn4-31398482, 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-11-17 20:45:54,825 - DEBUG - Response for create_network : {'network': {'id': 'c3071182-b86e-400f-9fea-4fbdc35debbf', 'name': 'ctest-vn4-31398482', 'tenant_id': '4a2b177e74f149d8bb615e5ba16d8963', 'project_id': '4a2b177e74f149d8bb615e5ba16d8963', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-93272207', 'ctest-vn4-31398482'], 'port_security_enabled': True, 'description': ''}} 2025-11-17 20:45:55,051 - DEBUG - Response for create_subnet : {'subnet': {'id': 'be8957f1-2b31-49a3-9ba2-3053c982ab72', 'name': '', 'tenant_id': '4a2b177e74f149d8bb615e5ba16d8963', 'network_id': 'c3071182-b86e-400f-9fea-4fbdc35debbf', 'ip_version': 4, 'cidr': '103.139.24.192/26', 'allocation_pools': [{'start': '103.139.24.194', 'end': '103.139.24.254'}], 'gateway_ip': '103.139.24.193', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '103.139.24.194', 'tags': [], 'project_id': '4a2b177e74f149d8bb615e5ba16d8963'}} 2025-11-17 20:45:55,224 - DEBUG - Response for create_subnet : {'subnet': {'id': 'a249ad3c-b35b-4d95-b880-3760336f15be', 'name': '', 'tenant_id': '4a2b177e74f149d8bb615e5ba16d8963', 'network_id': 'c3071182-b86e-400f-9fea-4fbdc35debbf', 'ip_version': 6, 'cidr': '39d9:46db:91ef:9865:e683:cbe::/96', 'allocation_pools': [{'start': '39d9:46db:91ef:9865:e683:cbe:0:2', 'end': '39d9:46db:91ef:9865:e683:cbe:ffff:fffe'}], 'gateway_ip': '39d9:46db:91ef:9865:e683:cbe:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '39d9:46db:91ef:9865:e683:cbe:0:2', 'tags': [], 'project_id': '4a2b177e74f149d8bb615e5ba16d8963'}} 2025-11-17 20:45:55,248 - INFO - Created VN ctest-vn4-31398482 2025-11-17 20:45:55,300 - DEBUG - VN ctest-vn4-31398482 UUID is c3071182-b86e-400f-9fea-4fbdc35debbf 2025-11-17 20:45:55,522 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': 'c3071182-b86e-400f-9fea-4fbdc35debbf', 'name': 'ctest-vn4-31398482', 'tenant_id': '4a2b177e74f149d8bb615e5ba16d8963', 'project_id': '4a2b177e74f149d8bb615e5ba16d8963', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['be8957f1-2b31-49a3-9ba2-3053c982ab72', 'a249ad3c-b35b-4d95-b880-3760336f15be'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-93272207', 'ctest-vn4-31398482'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-93272207', 'ctest-policy1-55075825']], 'subnet_ipam': [{'subnet_cidr': '103.139.24.192/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '39d9:46db:91ef:9865:e683:cbe::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2025-11-17 20:45:55,688 - DEBUG - Requesting: http://10.0.0.33:8082/domains 2025-11-17 20:45:56,006 - DEBUG - Requesting: http://10.0.0.33:8082/domains 2025-11-17 20:45:56,043 - DEBUG - Requesting: http://10.0.0.33:8082/domain/5fa1d011-9ea8-4632-ba8d-0e667b6ce2c5 2025-11-17 20:45:56,055 - DEBUG - Requesting: http://10.0.0.33:8082/project/4a2b177e-74f1-49d8-bb61-5e5ba16d8963 2025-11-17 20:45:56,129 - DEBUG - Requesting: http://10.0.0.33:8082/virtual-network/c3071182-b86e-400f-9fea-4fbdc35debbf 2025-11-17 20:45:56,141 - DEBUG - Requesting: http://10.0.0.33:8082/virtual-network/c3071182-b86e-400f-9fea-4fbdc35debbf 2025-11-17 20:45:56,150 - DEBUG - Requesting: http://10.0.0.33:8082/routing-instance/86da0594-6e5f-4650-83b0-2c82a393ba7b 2025-11-17 20:45:56,157 - DEBUG - Requesting: http://10.0.0.33:8082/routing-instance/86da0594-6e5f-4650-83b0-2c82a393ba7b 2025-11-17 20:45:56,165 - DEBUG - Requesting: http://10.0.0.33:8082/route-target/3d709cfd-e442-4721-acbd-0de460d854fe 2025-11-17 20:45:56,172 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-11-17 20:45:56,172 - DEBUG - Requesting: http://10.0.0.33:8082/virtual-network/c3071182-b86e-400f-9fea-4fbdc35debbf 2025-11-17 20:45:56,184 - DEBUG - Requesting: http://10.0.0.33:8082/routing-instance/86da0594-6e5f-4650-83b0-2c82a393ba7b 2025-11-17 20:45:56,199 - INFO - Verified VN network id 12 for VN c3071182-b86e-400f-9fea-4fbdc35debbf 2025-11-17 20:45:56,199 - INFO - Verifications in API Server for VN ctest-vn4-31398482 passed 2025-11-17 20:45:56,199 - DEBUG - Requesting: http://10.0.0.33:8082/virtual-network/c3071182-b86e-400f-9fea-4fbdc35debbf 2025-11-17 20:45:56,209 - DEBUG - Requesting: http://10.0.0.33:8082/routing-instance/86da0594-6e5f-4650-83b0-2c82a393ba7b 2025-11-17 20:45:56,216 - DEBUG - Requesting: http://10.0.0.33:8082/routing-instance/86da0594-6e5f-4650-83b0-2c82a393ba7b 2025-11-17 20:45:56,223 - DEBUG - Requesting: http://10.0.0.33:8082/route-target/3d709cfd-e442-4721-acbd-0de460d854fe 2025-11-17 20:45:56,236 - DEBUG - Control-node 10.0.0.33 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-93272207:ctest-vn4-31398482', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-93272207', 'owner-access': '7', 'group': 'admin', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '14053220415370575887', 'uuid-lslong': '11523110273025960895'}, 'enable': 'true', 'created': '2025-11-17T20:45:54', 'last-modified': '2025-11-17T20:45:55', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.750353'} 2025-11-17 20:45:56,242 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-11-17 20:45:56,243 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-31398482 passed 2025-11-17 20:45:56,243 - DEBUG - ====Verifying policy data for ctest-vn4-31398482 in API_Server ====== 2025-11-17 20:45:56,243 - DEBUG - Requesting: http://10.0.0.33:8082/domains 2025-11-17 20:45:56,248 - DEBUG - Requesting: http://10.0.0.33:8082/domain/5fa1d011-9ea8-4632-ba8d-0e667b6ce2c5 2025-11-17 20:45:56,259 - DEBUG - Requesting: http://10.0.0.33:8082/project/4a2b177e-74f1-49d8-bb61-5e5ba16d8963 2025-11-17 20:45:56,329 - DEBUG - Requesting: http://10.0.0.33:8082/virtual-network/c3071182-b86e-400f-9fea-4fbdc35debbf 2025-11-17 20:45:56,339 - DEBUG - ==>Verifying data for policy with id: add31a58-a108-4479-ab75-c03f717d3620, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-93272207', 'ctest-policy1-55075825'] 2025-11-17 20:45:56,339 - INFO - VN ctest-vn4-31398482 Policy verification: verify_vn_policy_in_api_server, status: True 2025-11-17 20:45:56,339 - DEBUG - Verifying the vn in opserver 2025-11-17 20:45:56,339 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-93272207:ctest-vn4-31398482 virtual network link through opserver 10.0.0.33 2025-11-17 20:45:56,339 - DEBUG - Requesting: http://10.0.0.33:8081/analytics/uves/virtual-networks 2025-11-17 20:45:56,632 - DEBUG - Requesting: http://10.0.0.33:8081/analytics/uves/virtual-networks 2025-11-17 20:45:56,706 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-93272207:ctest-vn4-31398482', 'href': 'http://10.0.0.33:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-93272207:ctest-vn4-31398482?flat'} 2025-11-17 20:45:56,706 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-93272207:ctest-vn4-31398482 is found in opserver 2025-11-17 20:45:56,719 - DEBUG - Do not have enough data to verify VN in agent 2025-11-17 20:45:56,725 - DEBUG - VRF ids for VN ctest-vn4-31398482: {} 2025-11-17 20:45:56,726 - DEBUG - ====Verifying data for ctest-policy1-55075825 in API_Server ====== 2025-11-17 20:45:56,726 - DEBUG - Requesting: http://10.0.0.33:8082/domains 2025-11-17 20:45:56,732 - DEBUG - Requesting: http://10.0.0.33:8082/domain/5fa1d011-9ea8-4632-ba8d-0e667b6ce2c5 2025-11-17 20:45:56,745 - DEBUG - Requesting: http://10.0.0.33:8082/project/4a2b177e-74f1-49d8-bb61-5e5ba16d8963 2025-11-17 20:45:56,815 - DEBUG - Requesting: http://10.0.0.33:8082/network-policy/add31a58-a108-4479-ab75-c03f717d3620 2025-11-17 20:45:56,825 - INFO - Verified policy ctest-policy1-55075825 in API Server, Result: True 2025-11-17 20:45:56,825 - INFO - Done with setup and verification, moving onto test .. 2025-11-17 20:45:56,834 - INFO - Deleting VN ctest-vn4-31398482 2025-11-17 20:45:56,974 - DEBUG - Response for deleting network () 2025-11-17 20:45:56,974 - DEBUG - Requesting: http://10.0.0.33:8082/routing-instance/86da0594-6e5f-4650-83b0-2c82a393ba7b 2025-11-17 20:45:56,980 - DEBUG - Response Code: 404 2025-11-17 20:45:56,980 - DEBUG - Requesting: http://10.0.0.33:8082/domains 2025-11-17 20:45:56,987 - DEBUG - Requesting: http://10.0.0.33:8082/domain/5fa1d011-9ea8-4632-ba8d-0e667b6ce2c5 2025-11-17 20:45:57,040 - DEBUG - Requesting: http://10.0.0.33:8082/project/4a2b177e-74f1-49d8-bb61-5e5ba16d8963 2025-11-17 20:45:57,111 - INFO - Validated that VN ctest-vn4-31398482 is not found in API Server 2025-11-17 20:45:57,121 - DEBUG - VN ctest-vn4-31398482 is not present in Agent 10.0.0.33 2025-11-17 20:45:57,121 - INFO - Validated that VN ctest-vn4-31398482 is not in any agent 2025-11-17 20:45:57,139 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-31398482 info 2025-11-17 20:45:57,165 - INFO - Deleted policy ctest-policy1-55075825 2025-11-17 20:45:57,328 - DEBUG - policy ctest-policy1-55075825 is not found in API Server 2025-11-17 20:45:57,582 - DEBUG - No XMPP flaps were noticed during the test 2025-11-17 20:45:57,582 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04] 2025-11-17 20:45:57,582 - INFO - -------------------------------------------------------------------------------- 2025-11-17 20:45:57,871 - DEBUG - No XMPP flaps were noticed during the test 2025-11-17 20:45:57,871 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04] 2025-11-17 20:45:57,871 - INFO - -------------------------------------------------------------------------------- 2025-11-17 20:45:58,565 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-93272207, ID : 4a2b177e-74f1-49d8-bb61-5e5ba16d8963