2025-08-11 13:14:57,626 - INFO - Domain Default found not creating 2025-08-11 13:14:57,771 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-32461930 not found, creating it 2025-08-11 13:14:58,261 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-32461930, ID : f00c7ba7-45d4-43a1-9acc-4198b8063cef 2025-08-11 13:14:59,777 - INFO - ================================================================================ 2025-08-11 13:14:59,777 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-08-11 13:15:00,034 - DEBUG - Nothing to compare xmpp stats {'10.0.0.57': {'10.20.0.14': '0'}} with 2025-08-11 13:15:00,034 - INFO - Initial checks done. Running the testcase now 2025-08-11 13:15:00,035 - INFO - 2025-08-11 13:15:00,035 - INFO - ================================================================================ 2025-08-11 13:15:00,035 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-08-11 13:15:00,035 - 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-11 13:15:00,335 - DEBUG - Nothing to compare xmpp stats {'10.0.0.57': {'10.20.0.14': '0'}} with 2025-08-11 13:15:00,335 - INFO - Initial checks done. Running the testcase now 2025-08-11 13:15:00,336 - INFO - 2025-08-11 13:15:00,727 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-32461930:ctest-vn4-26223994, 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-32461930:ctest-vn4-26223994, 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-32461930:ctest-vn4-26223994, 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-32461930:ctest-vn4-26223994, 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-11 13:15:01,250 - DEBUG - Response for create_network : {'network': {'id': '2406d10d-0dbd-49dc-9049-bd901e81cf91', 'name': 'ctest-vn4-26223994', 'tenant_id': 'f00c7ba745d443a19acc4198b8063cef', 'project_id': 'f00c7ba745d443a19acc4198b8063cef', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-32461930', 'ctest-vn4-26223994'], 'port_security_enabled': True, 'description': ''}} 2025-08-11 13:15:01,471 - DEBUG - Response for create_subnet : {'subnet': {'id': 'b3f0ea61-b9a0-4b06-a17d-5e4b3c2d04d5', 'name': '', 'tenant_id': 'f00c7ba745d443a19acc4198b8063cef', 'network_id': '2406d10d-0dbd-49dc-9049-bd901e81cf91', 'ip_version': 4, 'cidr': '116.203.210.64/26', 'allocation_pools': [{'start': '116.203.210.66', 'end': '116.203.210.126'}], 'gateway_ip': '116.203.210.65', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '116.203.210.66', 'tags': [], 'project_id': 'f00c7ba745d443a19acc4198b8063cef'}} 2025-08-11 13:15:01,661 - DEBUG - Response for create_subnet : {'subnet': {'id': 'a4ef2273-b32a-4ddb-859e-0e5dc2f4e7ec', 'name': '', 'tenant_id': 'f00c7ba745d443a19acc4198b8063cef', 'network_id': '2406d10d-0dbd-49dc-9049-bd901e81cf91', 'ip_version': 6, 'cidr': '20bf:1bd8:84e9:43de:755a:3385::/96', 'allocation_pools': [{'start': '20bf:1bd8:84e9:43de:755a:3385:0:2', 'end': '20bf:1bd8:84e9:43de:755a:3385:ffff:fffe'}], 'gateway_ip': '20bf:1bd8:84e9:43de:755a:3385:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '20bf:1bd8:84e9:43de:755a:3385:0:2', 'tags': [], 'project_id': 'f00c7ba745d443a19acc4198b8063cef'}} 2025-08-11 13:15:01,681 - INFO - Created VN ctest-vn4-26223994 2025-08-11 13:15:01,732 - DEBUG - VN ctest-vn4-26223994 UUID is 2406d10d-0dbd-49dc-9049-bd901e81cf91 2025-08-11 13:15:01,923 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': '2406d10d-0dbd-49dc-9049-bd901e81cf91', 'name': 'ctest-vn4-26223994', 'tenant_id': 'f00c7ba745d443a19acc4198b8063cef', 'project_id': 'f00c7ba745d443a19acc4198b8063cef', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['b3f0ea61-b9a0-4b06-a17d-5e4b3c2d04d5', 'a4ef2273-b32a-4ddb-859e-0e5dc2f4e7ec'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-32461930', 'ctest-vn4-26223994'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-32461930', 'ctest-policy1-43122792']], 'subnet_ipam': [{'subnet_cidr': '116.203.210.64/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '20bf:1bd8:84e9:43de:755a:3385::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2025-08-11 13:15:02,096 - DEBUG - Requesting: http://10.0.0.57:8082/domains 2025-08-11 13:15:02,425 - DEBUG - Requesting: http://10.0.0.57:8082/domains 2025-08-11 13:15:02,454 - DEBUG - Requesting: http://10.0.0.57:8082/domain/9ee603c8-0d79-48cc-97e1-16c583c1be07 2025-08-11 13:15:02,467 - DEBUG - Requesting: http://10.0.0.57:8082/project/f00c7ba7-45d4-43a1-9acc-4198b8063cef 2025-08-11 13:15:02,542 - DEBUG - Requesting: http://10.0.0.57:8082/virtual-network/2406d10d-0dbd-49dc-9049-bd901e81cf91 2025-08-11 13:15:02,555 - DEBUG - Requesting: http://10.0.0.57:8082/virtual-network/2406d10d-0dbd-49dc-9049-bd901e81cf91 2025-08-11 13:15:02,565 - DEBUG - Requesting: http://10.0.0.57:8082/routing-instance/a039e9a8-16aa-4b67-864b-c05a19feed66 2025-08-11 13:15:02,572 - DEBUG - Requesting: http://10.0.0.57:8082/routing-instance/a039e9a8-16aa-4b67-864b-c05a19feed66 2025-08-11 13:15:02,579 - DEBUG - Requesting: http://10.0.0.57:8082/route-target/56ed429e-dc0f-4b57-8c6d-346f140e8269 2025-08-11 13:15:02,585 - DEBUG - Route Targets: ['target:64512:8000005'] 2025-08-11 13:15:02,585 - DEBUG - Requesting: http://10.0.0.57:8082/virtual-network/2406d10d-0dbd-49dc-9049-bd901e81cf91 2025-08-11 13:15:02,595 - DEBUG - Requesting: http://10.0.0.57:8082/routing-instance/a039e9a8-16aa-4b67-864b-c05a19feed66 2025-08-11 13:15:02,608 - INFO - Verified VN network id 12 for VN 2406d10d-0dbd-49dc-9049-bd901e81cf91 2025-08-11 13:15:02,608 - INFO - Verifications in API Server for VN ctest-vn4-26223994 passed 2025-08-11 13:15:02,608 - DEBUG - Requesting: http://10.0.0.57:8082/virtual-network/2406d10d-0dbd-49dc-9049-bd901e81cf91 2025-08-11 13:15:02,619 - DEBUG - Requesting: http://10.0.0.57:8082/routing-instance/a039e9a8-16aa-4b67-864b-c05a19feed66 2025-08-11 13:15:02,625 - DEBUG - Requesting: http://10.0.0.57:8082/routing-instance/a039e9a8-16aa-4b67-864b-c05a19feed66 2025-08-11 13:15:02,631 - DEBUG - Requesting: http://10.0.0.57:8082/route-target/56ed429e-dc0f-4b57-8c6d-346f140e8269 2025-08-11 13:15:02,644 - DEBUG - Control-node 10.0.0.57 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-32461930:ctest-vn4-26223994', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-32461930', 'owner-access': '7', 'group': 'admin', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '2595992089220958684', 'uuid-lslong': '10397049641446264721'}, 'enable': 'true', 'created': '2025-08-11T13:15:01', 'last-modified': '2025-08-11T13:15:01', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.748269'} 2025-08-11 13:15:02,651 - DEBUG - Route Targets: ['target:64512:8000005'] 2025-08-11 13:15:02,651 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-26223994 passed 2025-08-11 13:15:02,651 - DEBUG - ====Verifying policy data for ctest-vn4-26223994 in API_Server ====== 2025-08-11 13:15:02,651 - DEBUG - Requesting: http://10.0.0.57:8082/domains 2025-08-11 13:15:02,656 - DEBUG - Requesting: http://10.0.0.57:8082/domain/9ee603c8-0d79-48cc-97e1-16c583c1be07 2025-08-11 13:15:02,667 - DEBUG - Requesting: http://10.0.0.57:8082/project/f00c7ba7-45d4-43a1-9acc-4198b8063cef 2025-08-11 13:15:02,741 - DEBUG - Requesting: http://10.0.0.57:8082/virtual-network/2406d10d-0dbd-49dc-9049-bd901e81cf91 2025-08-11 13:15:02,752 - DEBUG - ==>Verifying data for policy with id: 657ace07-ea03-43d8-bb93-93a16b42b5e1, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-32461930', 'ctest-policy1-43122792'] 2025-08-11 13:15:02,752 - INFO - VN ctest-vn4-26223994 Policy verification: verify_vn_policy_in_api_server, status: True 2025-08-11 13:15:02,752 - DEBUG - Verifying the vn in opserver 2025-08-11 13:15:02,752 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-32461930:ctest-vn4-26223994 virtual network link through opserver 10.0.0.57 2025-08-11 13:15:02,753 - DEBUG - Requesting: http://10.0.0.57:8081/analytics/uves/virtual-networks 2025-08-11 13:15:03,082 - DEBUG - Requesting: http://10.0.0.57:8081/analytics/uves/virtual-networks 2025-08-11 13:15:03,134 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-32461930:ctest-vn4-26223994', 'href': 'http://10.0.0.57:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-32461930:ctest-vn4-26223994?flat'} 2025-08-11 13:15:03,134 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-32461930:ctest-vn4-26223994 is found in opserver 2025-08-11 13:15:03,146 - DEBUG - Do not have enough data to verify VN in agent 2025-08-11 13:15:03,151 - DEBUG - VRF ids for VN ctest-vn4-26223994: {} 2025-08-11 13:15:03,152 - DEBUG - ====Verifying data for ctest-policy1-43122792 in API_Server ====== 2025-08-11 13:15:03,152 - DEBUG - Requesting: http://10.0.0.57:8082/domains 2025-08-11 13:15:03,157 - DEBUG - Requesting: http://10.0.0.57:8082/domain/9ee603c8-0d79-48cc-97e1-16c583c1be07 2025-08-11 13:15:03,169 - DEBUG - Requesting: http://10.0.0.57:8082/project/f00c7ba7-45d4-43a1-9acc-4198b8063cef 2025-08-11 13:15:03,244 - DEBUG - Requesting: http://10.0.0.57:8082/network-policy/657ace07-ea03-43d8-bb93-93a16b42b5e1 2025-08-11 13:15:03,254 - INFO - Verified policy ctest-policy1-43122792 in API Server, Result: True 2025-08-11 13:15:03,254 - INFO - Done with setup and verification, moving onto test .. 2025-08-11 13:15:03,262 - INFO - Deleting VN ctest-vn4-26223994 2025-08-11 13:15:03,372 - DEBUG - Response for deleting network () 2025-08-11 13:15:03,372 - DEBUG - Requesting: http://10.0.0.57:8082/routing-instance/a039e9a8-16aa-4b67-864b-c05a19feed66 2025-08-11 13:15:03,377 - DEBUG - Response Code: 404 2025-08-11 13:15:03,377 - DEBUG - Requesting: http://10.0.0.57:8082/domains 2025-08-11 13:15:03,382 - DEBUG - Requesting: http://10.0.0.57:8082/domain/9ee603c8-0d79-48cc-97e1-16c583c1be07 2025-08-11 13:15:03,441 - DEBUG - Requesting: http://10.0.0.57:8082/project/f00c7ba7-45d4-43a1-9acc-4198b8063cef 2025-08-11 13:15:03,516 - INFO - Validated that VN ctest-vn4-26223994 is not found in API Server 2025-08-11 13:15:03,527 - DEBUG - VN ctest-vn4-26223994 is not present in Agent 10.0.0.57 2025-08-11 13:15:03,527 - INFO - Validated that VN ctest-vn4-26223994 is not in any agent 2025-08-11 13:15:03,543 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-26223994 info 2025-08-11 13:15:03,572 - INFO - Deleted policy ctest-policy1-43122792 2025-08-11 13:15:03,743 - DEBUG - policy ctest-policy1-43122792 is not found in API Server 2025-08-11 13:15:03,998 - DEBUG - No XMPP flaps were noticed during the test 2025-08-11 13:15:03,998 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:03] 2025-08-11 13:15:03,998 - INFO - -------------------------------------------------------------------------------- 2025-08-11 13:15:04,290 - DEBUG - No XMPP flaps were noticed during the test 2025-08-11 13:15:04,290 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:05] 2025-08-11 13:15:04,290 - INFO - -------------------------------------------------------------------------------- 2025-08-11 13:15:04,989 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-32461930, ID : f00c7ba7-45d4-43a1-9acc-4198b8063cef