2025-11-05 16:14:12,796 - INFO - Domain Default found not creating 2025-11-05 16:14:12,926 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-81858113 not found, creating it 2025-11-05 16:14:13,350 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-81858113, ID : 99d3acde-0d16-4586-8d0b-c14a272ad591 2025-11-05 16:14:14,714 - INFO - ================================================================================ 2025-11-05 16:14:14,714 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-11-05 16:14:14,967 - DEBUG - Nothing to compare xmpp stats {'10.0.0.38': {'10.20.0.192': '0'}} with 2025-11-05 16:14:14,967 - INFO - Initial checks done. Running the testcase now 2025-11-05 16:14:14,967 - INFO - 2025-11-05 16:14:14,967 - INFO - ================================================================================ 2025-11-05 16:14:14,967 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-11-05 16:14:14,967 - 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-05 16:14:15,255 - DEBUG - Nothing to compare xmpp stats {'10.0.0.38': {'10.20.0.192': '0'}} with 2025-11-05 16:14:15,255 - INFO - Initial checks done. Running the testcase now 2025-11-05 16:14:15,255 - INFO - 2025-11-05 16:14:15,609 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-81858113:ctest-vn4-69307882, 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-81858113:ctest-vn4-69307882, 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-81858113:ctest-vn4-69307882, 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-81858113:ctest-vn4-69307882, 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-05 16:14:16,159 - DEBUG - Response for create_network : {'network': {'id': '8b317324-5d08-4020-a886-dc55b5f4b123', 'name': 'ctest-vn4-69307882', 'tenant_id': '99d3acde0d1645868d0bc14a272ad591', 'project_id': '99d3acde0d1645868d0bc14a272ad591', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-81858113', 'ctest-vn4-69307882'], 'port_security_enabled': True, 'description': ''}} 2025-11-05 16:14:16,376 - DEBUG - Response for create_subnet : {'subnet': {'id': '59cf7e94-4b12-45bd-a40e-c6674a533636', 'name': '', 'tenant_id': '99d3acde0d1645868d0bc14a272ad591', 'network_id': '8b317324-5d08-4020-a886-dc55b5f4b123', 'ip_version': 4, 'cidr': '5.120.246.64/26', 'allocation_pools': [{'start': '5.120.246.66', 'end': '5.120.246.126'}], 'gateway_ip': '5.120.246.65', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '5.120.246.66', 'tags': [], 'project_id': '99d3acde0d1645868d0bc14a272ad591'}} 2025-11-05 16:14:16,546 - DEBUG - Response for create_subnet : {'subnet': {'id': '8898afbf-d77a-4189-b11a-e64df8513fa8', 'name': '', 'tenant_id': '99d3acde0d1645868d0bc14a272ad591', 'network_id': '8b317324-5d08-4020-a886-dc55b5f4b123', 'ip_version': 6, 'cidr': '3cb1:7a54:741b:ea79:bb0d:865b::/96', 'allocation_pools': [{'start': '3cb1:7a54:741b:ea79:bb0d:865b:0:2', 'end': '3cb1:7a54:741b:ea79:bb0d:865b:ffff:fffe'}], 'gateway_ip': '3cb1:7a54:741b:ea79:bb0d:865b:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '3cb1:7a54:741b:ea79:bb0d:865b:0:2', 'tags': [], 'project_id': '99d3acde0d1645868d0bc14a272ad591'}} 2025-11-05 16:14:16,565 - INFO - Created VN ctest-vn4-69307882 2025-11-05 16:14:16,614 - DEBUG - VN ctest-vn4-69307882 UUID is 8b317324-5d08-4020-a886-dc55b5f4b123 2025-11-05 16:14:16,793 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': '8b317324-5d08-4020-a886-dc55b5f4b123', 'name': 'ctest-vn4-69307882', 'tenant_id': '99d3acde0d1645868d0bc14a272ad591', 'project_id': '99d3acde0d1645868d0bc14a272ad591', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['59cf7e94-4b12-45bd-a40e-c6674a533636', '8898afbf-d77a-4189-b11a-e64df8513fa8'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-81858113', 'ctest-vn4-69307882'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-81858113', 'ctest-policy1-85572220']], 'subnet_ipam': [{'subnet_cidr': '5.120.246.64/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '3cb1:7a54:741b:ea79:bb0d:865b::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2025-11-05 16:14:16,954 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2025-11-05 16:14:17,244 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2025-11-05 16:14:17,269 - DEBUG - Requesting: http://10.0.0.38:8082/domain/5427629e-064f-403f-98cd-ffee9138a9ec 2025-11-05 16:14:17,280 - DEBUG - Requesting: http://10.0.0.38:8082/project/99d3acde-0d16-4586-8d0b-c14a272ad591 2025-11-05 16:14:17,349 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/8b317324-5d08-4020-a886-dc55b5f4b123 2025-11-05 16:14:17,360 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/8b317324-5d08-4020-a886-dc55b5f4b123 2025-11-05 16:14:17,368 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/002e418a-bbb0-4b9c-ab2d-48d722e96e08 2025-11-05 16:14:17,375 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/002e418a-bbb0-4b9c-ab2d-48d722e96e08 2025-11-05 16:14:17,381 - DEBUG - Requesting: http://10.0.0.38:8082/route-target/3c2a2577-3e3e-4cf4-b211-a488f52df83d 2025-11-05 16:14:17,386 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-11-05 16:14:17,387 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/8b317324-5d08-4020-a886-dc55b5f4b123 2025-11-05 16:14:17,394 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/002e418a-bbb0-4b9c-ab2d-48d722e96e08 2025-11-05 16:14:17,406 - INFO - Verified VN network id 12 for VN 8b317324-5d08-4020-a886-dc55b5f4b123 2025-11-05 16:14:17,406 - INFO - Verifications in API Server for VN ctest-vn4-69307882 passed 2025-11-05 16:14:17,406 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/8b317324-5d08-4020-a886-dc55b5f4b123 2025-11-05 16:14:17,413 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/002e418a-bbb0-4b9c-ab2d-48d722e96e08 2025-11-05 16:14:17,419 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/002e418a-bbb0-4b9c-ab2d-48d722e96e08 2025-11-05 16:14:17,424 - DEBUG - Requesting: http://10.0.0.38:8082/route-target/3c2a2577-3e3e-4cf4-b211-a488f52df83d 2025-11-05 16:14:17,433 - DEBUG - Control-node 10.0.0.38 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-81858113:ctest-vn4-69307882', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-81858113', 'owner-access': '7', 'group': 'member', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '10029924445147643936', 'uuid-lslong': '12143635705934164259'}, 'enable': 'true', 'created': '2025-11-05T16:14:16', 'last-modified': '2025-11-05T16:14:16', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.660908'} 2025-11-05 16:14:17,438 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-11-05 16:14:17,438 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-69307882 passed 2025-11-05 16:14:17,439 - DEBUG - ====Verifying policy data for ctest-vn4-69307882 in API_Server ====== 2025-11-05 16:14:17,439 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2025-11-05 16:14:17,443 - DEBUG - Requesting: http://10.0.0.38:8082/domain/5427629e-064f-403f-98cd-ffee9138a9ec 2025-11-05 16:14:17,452 - DEBUG - Requesting: http://10.0.0.38:8082/project/99d3acde-0d16-4586-8d0b-c14a272ad591 2025-11-05 16:14:17,518 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/8b317324-5d08-4020-a886-dc55b5f4b123 2025-11-05 16:14:17,526 - DEBUG - ==>Verifying data for policy with id: fbccc90d-1509-42b6-a1e9-11fbb13b3b92, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-81858113', 'ctest-policy1-85572220'] 2025-11-05 16:14:17,526 - INFO - VN ctest-vn4-69307882 Policy verification: verify_vn_policy_in_api_server, status: True 2025-11-05 16:14:17,526 - DEBUG - Verifying the vn in opserver 2025-11-05 16:14:17,526 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-81858113:ctest-vn4-69307882 virtual network link through opserver 10.0.0.38 2025-11-05 16:14:17,526 - DEBUG - Requesting: http://10.0.0.38:8081/analytics/uves/virtual-networks 2025-11-05 16:14:17,815 - DEBUG - Requesting: http://10.0.0.38:8081/analytics/uves/virtual-networks 2025-11-05 16:14:17,863 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-81858113:ctest-vn4-69307882', 'href': 'http://10.0.0.38:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-81858113:ctest-vn4-69307882?flat'} 2025-11-05 16:14:17,863 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-81858113:ctest-vn4-69307882 is found in opserver 2025-11-05 16:14:17,871 - DEBUG - Do not have enough data to verify VN in agent 2025-11-05 16:14:17,875 - DEBUG - VRF ids for VN ctest-vn4-69307882: {} 2025-11-05 16:14:17,875 - DEBUG - ====Verifying data for ctest-policy1-85572220 in API_Server ====== 2025-11-05 16:14:17,875 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2025-11-05 16:14:17,880 - DEBUG - Requesting: http://10.0.0.38:8082/domain/5427629e-064f-403f-98cd-ffee9138a9ec 2025-11-05 16:14:17,889 - DEBUG - Requesting: http://10.0.0.38:8082/project/99d3acde-0d16-4586-8d0b-c14a272ad591 2025-11-05 16:14:17,957 - DEBUG - Requesting: http://10.0.0.38:8082/network-policy/fbccc90d-1509-42b6-a1e9-11fbb13b3b92 2025-11-05 16:14:17,965 - INFO - Verified policy ctest-policy1-85572220 in API Server, Result: True 2025-11-05 16:14:17,965 - INFO - Done with setup and verification, moving onto test .. 2025-11-05 16:14:17,971 - INFO - Deleting VN ctest-vn4-69307882 2025-11-05 16:14:18,071 - DEBUG - Response for deleting network () 2025-11-05 16:14:18,071 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/002e418a-bbb0-4b9c-ab2d-48d722e96e08 2025-11-05 16:14:18,076 - DEBUG - Response Code: 404 2025-11-05 16:14:18,076 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2025-11-05 16:14:18,081 - DEBUG - Requesting: http://10.0.0.38:8082/domain/5427629e-064f-403f-98cd-ffee9138a9ec 2025-11-05 16:14:18,130 - DEBUG - Requesting: http://10.0.0.38:8082/project/99d3acde-0d16-4586-8d0b-c14a272ad591 2025-11-05 16:14:18,200 - INFO - Validated that VN ctest-vn4-69307882 is not found in API Server 2025-11-05 16:14:18,208 - DEBUG - VN ctest-vn4-69307882 is not present in Agent 10.0.0.38 2025-11-05 16:14:18,208 - INFO - Validated that VN ctest-vn4-69307882 is not in any agent 2025-11-05 16:14:18,224 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-69307882 info 2025-11-05 16:14:18,248 - INFO - Deleted policy ctest-policy1-85572220 2025-11-05 16:14:18,409 - DEBUG - policy ctest-policy1-85572220 is not found in API Server 2025-11-05 16:14:18,662 - DEBUG - No XMPP flaps were noticed during the test
2025-11-05 16:14:18,662 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04]
2025-11-05 16:14:18,662 - INFO - -------------------------------------------------------------------------------- 2025-11-05 16:14:18,950 - DEBUG - No XMPP flaps were noticed during the test
2025-11-05 16:14:18,950 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04]
2025-11-05 16:14:18,950 - INFO - -------------------------------------------------------------------------------- 2025-11-05 16:14:19,597 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-81858113, ID : 99d3acde-0d16-4586-8d0b-c14a272ad591