2025-11-03 09:02:04,055 - INFO - Domain Default found not creating 2025-11-03 09:02:04,189 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-68746801 not found, creating it 2025-11-03 09:02:04,628 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-68746801, ID : 9703e10c-380d-493d-a8d7-db96b8488858 2025-11-03 09:02:05,980 - INFO - ================================================================================ 2025-11-03 09:02:05,981 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-11-03 09:02:06,236 - DEBUG - Nothing to compare xmpp stats {'10.0.0.50': {'10.20.0.17': '0'}} with 2025-11-03 09:02:06,236 - INFO - Initial checks done. Running the testcase now 2025-11-03 09:02:06,236 - INFO - 2025-11-03 09:02:06,236 - INFO - ================================================================================ 2025-11-03 09:02:06,236 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-11-03 09:02:06,236 - 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-03 09:02:06,525 - DEBUG - Nothing to compare xmpp stats {'10.0.0.50': {'10.20.0.17': '0'}} with 2025-11-03 09:02:06,525 - INFO - Initial checks done. Running the testcase now 2025-11-03 09:02:06,525 - INFO - 2025-11-03 09:02:06,910 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-68746801:ctest-vn4-52989669, 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-68746801:ctest-vn4-52989669, 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-68746801:ctest-vn4-52989669, 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-68746801:ctest-vn4-52989669, 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-03 09:02:07,387 - DEBUG - Response for create_network : {'network': {'id': 'c3e0312a-345f-495a-8a86-303aa0be7858', 'name': 'ctest-vn4-52989669', 'tenant_id': '9703e10c380d493da8d7db96b8488858', 'project_id': '9703e10c380d493da8d7db96b8488858', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-68746801', 'ctest-vn4-52989669'], 'port_security_enabled': True, 'description': ''}} 2025-11-03 09:02:07,558 - DEBUG - Response for create_subnet : {'subnet': {'id': '7a6b4238-b5fa-4279-8d92-d7f03e12006d', 'name': '', 'tenant_id': '9703e10c380d493da8d7db96b8488858', 'network_id': 'c3e0312a-345f-495a-8a86-303aa0be7858', 'ip_version': 4, 'cidr': '11.70.122.192/26', 'allocation_pools': [{'start': '11.70.122.194', 'end': '11.70.122.254'}], 'gateway_ip': '11.70.122.193', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '11.70.122.194', 'tags': [], 'project_id': '9703e10c380d493da8d7db96b8488858'}} 2025-11-03 09:02:07,740 - DEBUG - Response for create_subnet : {'subnet': {'id': '261ad9fd-099a-4d80-914b-ff749f5ac9e5', 'name': '', 'tenant_id': '9703e10c380d493da8d7db96b8488858', 'network_id': 'c3e0312a-345f-495a-8a86-303aa0be7858', 'ip_version': 6, 'cidr': '2dd1:c853:e49a:c0f8:ed46:49ac::/96', 'allocation_pools': [{'start': '2dd1:c853:e49a:c0f8:ed46:49ac:0:2', 'end': '2dd1:c853:e49a:c0f8:ed46:49ac:ffff:fffe'}], 'gateway_ip': '2dd1:c853:e49a:c0f8:ed46:49ac:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '2dd1:c853:e49a:c0f8:ed46:49ac:0:2', 'tags': [], 'project_id': '9703e10c380d493da8d7db96b8488858'}} 2025-11-03 09:02:07,757 - INFO - Created VN ctest-vn4-52989669 2025-11-03 09:02:07,810 - DEBUG - VN ctest-vn4-52989669 UUID is c3e0312a-345f-495a-8a86-303aa0be7858 2025-11-03 09:02:08,000 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': 'c3e0312a-345f-495a-8a86-303aa0be7858', 'name': 'ctest-vn4-52989669', 'tenant_id': '9703e10c380d493da8d7db96b8488858', 'project_id': '9703e10c380d493da8d7db96b8488858', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['7a6b4238-b5fa-4279-8d92-d7f03e12006d', '261ad9fd-099a-4d80-914b-ff749f5ac9e5'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-68746801', 'ctest-vn4-52989669'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-68746801', 'ctest-policy1-30465967']], 'subnet_ipam': [{'subnet_cidr': '11.70.122.192/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '2dd1:c853:e49a:c0f8:ed46:49ac::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2025-11-03 09:02:08,159 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2025-11-03 09:02:08,449 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2025-11-03 09:02:08,477 - DEBUG - Requesting: http://10.0.0.50:8082/domain/7b9671e6-7842-4940-b3ba-80ad20f267fc 2025-11-03 09:02:08,488 - DEBUG - Requesting: http://10.0.0.50:8082/project/9703e10c-380d-493d-a8d7-db96b8488858 2025-11-03 09:02:08,558 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/c3e0312a-345f-495a-8a86-303aa0be7858 2025-11-03 09:02:08,569 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/c3e0312a-345f-495a-8a86-303aa0be7858 2025-11-03 09:02:08,578 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/a2d834cd-caa2-4adf-9df1-f71bf0c8a183 2025-11-03 09:02:08,585 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/a2d834cd-caa2-4adf-9df1-f71bf0c8a183 2025-11-03 09:02:08,592 - DEBUG - Requesting: http://10.0.0.50:8082/route-target/64309722-0df3-4fb0-9a24-071374bb8763 2025-11-03 09:02:08,598 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-11-03 09:02:08,598 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/c3e0312a-345f-495a-8a86-303aa0be7858 2025-11-03 09:02:08,606 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/a2d834cd-caa2-4adf-9df1-f71bf0c8a183 2025-11-03 09:02:08,620 - INFO - Verified VN network id 12 for VN c3e0312a-345f-495a-8a86-303aa0be7858 2025-11-03 09:02:08,620 - INFO - Verifications in API Server for VN ctest-vn4-52989669 passed 2025-11-03 09:02:08,620 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/c3e0312a-345f-495a-8a86-303aa0be7858 2025-11-03 09:02:08,630 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/a2d834cd-caa2-4adf-9df1-f71bf0c8a183 2025-11-03 09:02:08,636 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/a2d834cd-caa2-4adf-9df1-f71bf0c8a183 2025-11-03 09:02:08,642 - DEBUG - Requesting: http://10.0.0.50:8082/route-target/64309722-0df3-4fb0-9a24-071374bb8763 2025-11-03 09:02:08,651 - DEBUG - Control-node 10.0.0.50 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-68746801:ctest-vn4-52989669', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-68746801', 'owner-access': '7', 'group': 'reader', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '14114335289516181850', 'uuid-lslong': '9981718652476356696'}, 'enable': 'true', 'created': '2025-11-03T09:02:07', 'last-modified': '2025-11-03T09:02:07', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.679731'} 2025-11-03 09:02:08,657 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-11-03 09:02:08,658 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-52989669 passed 2025-11-03 09:02:08,659 - DEBUG - ====Verifying policy data for ctest-vn4-52989669 in API_Server ====== 2025-11-03 09:02:08,659 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2025-11-03 09:02:08,664 - DEBUG - Requesting: http://10.0.0.50:8082/domain/7b9671e6-7842-4940-b3ba-80ad20f267fc 2025-11-03 09:02:08,674 - DEBUG - Requesting: http://10.0.0.50:8082/project/9703e10c-380d-493d-a8d7-db96b8488858 2025-11-03 09:02:08,746 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/c3e0312a-345f-495a-8a86-303aa0be7858 2025-11-03 09:02:08,755 - DEBUG - ==>Verifying data for policy with id: 92ae7ded-b654-48cb-8d7a-46a74fce80b9, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-68746801', 'ctest-policy1-30465967'] 2025-11-03 09:02:08,755 - INFO - VN ctest-vn4-52989669 Policy verification: verify_vn_policy_in_api_server, status: True 2025-11-03 09:02:08,755 - DEBUG - Verifying the vn in opserver 2025-11-03 09:02:08,755 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-68746801:ctest-vn4-52989669 virtual network link through opserver 10.0.0.50 2025-11-03 09:02:08,755 - DEBUG - Requesting: http://10.0.0.50:8081/analytics/uves/virtual-networks 2025-11-03 09:02:09,044 - DEBUG - Requesting: http://10.0.0.50:8081/analytics/uves/virtual-networks 2025-11-03 09:02:09,100 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-68746801:ctest-vn4-52989669', 'href': 'http://10.0.0.50:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-68746801:ctest-vn4-52989669?flat'} 2025-11-03 09:02:09,100 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-68746801:ctest-vn4-52989669 is found in opserver 2025-11-03 09:02:09,109 - DEBUG - Do not have enough data to verify VN in agent 2025-11-03 09:02:09,113 - DEBUG - VRF ids for VN ctest-vn4-52989669: {} 2025-11-03 09:02:09,113 - DEBUG - ====Verifying data for ctest-policy1-30465967 in API_Server ====== 2025-11-03 09:02:09,113 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2025-11-03 09:02:09,118 - DEBUG - Requesting: http://10.0.0.50:8082/domain/7b9671e6-7842-4940-b3ba-80ad20f267fc 2025-11-03 09:02:09,126 - DEBUG - Requesting: http://10.0.0.50:8082/project/9703e10c-380d-493d-a8d7-db96b8488858 2025-11-03 09:02:09,194 - DEBUG - Requesting: http://10.0.0.50:8082/network-policy/92ae7ded-b654-48cb-8d7a-46a74fce80b9 2025-11-03 09:02:09,202 - INFO - Verified policy ctest-policy1-30465967 in API Server, Result: True 2025-11-03 09:02:09,202 - INFO - Done with setup and verification, moving onto test .. 2025-11-03 09:02:09,209 - INFO - Deleting VN ctest-vn4-52989669 2025-11-03 09:02:09,317 - DEBUG - Response for deleting network () 2025-11-03 09:02:09,318 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/a2d834cd-caa2-4adf-9df1-f71bf0c8a183 2025-11-03 09:02:09,322 - DEBUG - Response Code: 404 2025-11-03 09:02:09,322 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2025-11-03 09:02:09,326 - DEBUG - Requesting: http://10.0.0.50:8082/domain/7b9671e6-7842-4940-b3ba-80ad20f267fc 2025-11-03 09:02:09,379 - DEBUG - Requesting: http://10.0.0.50:8082/project/9703e10c-380d-493d-a8d7-db96b8488858 2025-11-03 09:02:09,447 - INFO - Validated that VN ctest-vn4-52989669 is not found in API Server 2025-11-03 09:02:09,455 - DEBUG - VN ctest-vn4-52989669 is not present in Agent 10.0.0.50 2025-11-03 09:02:09,455 - INFO - Validated that VN ctest-vn4-52989669 is not in any agent 2025-11-03 09:02:09,466 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-52989669 info 2025-11-03 09:02:09,491 - INFO - Deleted policy ctest-policy1-30465967 2025-11-03 09:02:09,654 - DEBUG - policy ctest-policy1-30465967 is not found in API Server 2025-11-03 09:02:09,907 - DEBUG - No XMPP flaps were noticed during the test 2025-11-03 09:02:09,907 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:03] 2025-11-03 09:02:09,907 - INFO - -------------------------------------------------------------------------------- 2025-11-03 09:02:10,195 - DEBUG - No XMPP flaps were noticed during the test 2025-11-03 09:02:10,195 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:05] 2025-11-03 09:02:10,195 - INFO - -------------------------------------------------------------------------------- 2025-11-03 09:02:10,836 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-68746801, ID : 9703e10c-380d-493d-a8d7-db96b8488858