2025-11-17 22:50:31,453 - INFO - Domain Default found not creating 2025-11-17 22:50:31,577 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-80741684 not found, creating it 2025-11-17 22:50:32,044 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-80741684, ID : bacd7ae7-7213-4559-83d3-b17d5aff9512 2025-11-17 22:50:33,366 - INFO - ================================================================================ 2025-11-17 22:50:33,366 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-11-17 22:50:33,616 - DEBUG - Nothing to compare xmpp stats {'10.0.0.50': {'10.20.0.17': '0'}} with 2025-11-17 22:50:33,616 - INFO - Initial checks done. Running the testcase now 2025-11-17 22:50:33,616 - INFO - 2025-11-17 22:50:33,616 - INFO - ================================================================================ 2025-11-17 22:50:33,616 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-11-17 22:50:33,616 - 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 22:50:33,903 - DEBUG - Nothing to compare xmpp stats {'10.0.0.50': {'10.20.0.17': '0'}} with 2025-11-17 22:50:33,904 - INFO - Initial checks done. Running the testcase now 2025-11-17 22:50:33,904 - INFO - 2025-11-17 22:50:34,242 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-80741684:ctest-vn4-58801970, 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-80741684:ctest-vn4-58801970, 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-80741684:ctest-vn4-58801970, 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-80741684:ctest-vn4-58801970, 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 22:50:34,728 - DEBUG - Response for create_network : {'network': {'id': '38eb96de-10c6-4c42-994a-4c15a7e76447', 'name': 'ctest-vn4-58801970', 'tenant_id': 'bacd7ae77213455983d3b17d5aff9512', 'project_id': 'bacd7ae77213455983d3b17d5aff9512', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-80741684', 'ctest-vn4-58801970'], 'port_security_enabled': True, 'description': ''}} 2025-11-17 22:50:34,879 - DEBUG - Response for create_subnet : {'subnet': {'id': '1e786d8a-69f1-4e53-9829-0a620d2d7a95', 'name': '', 'tenant_id': 'bacd7ae77213455983d3b17d5aff9512', 'network_id': '38eb96de-10c6-4c42-994a-4c15a7e76447', 'ip_version': 4, 'cidr': '109.86.75.192/26', 'allocation_pools': [{'start': '109.86.75.194', 'end': '109.86.75.254'}], 'gateway_ip': '109.86.75.193', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '109.86.75.194', 'tags': [], 'project_id': 'bacd7ae77213455983d3b17d5aff9512'}} 2025-11-17 22:50:35,049 - DEBUG - Response for create_subnet : {'subnet': {'id': '1d12c326-e5a9-44f7-a051-61738096989a', 'name': '', 'tenant_id': 'bacd7ae77213455983d3b17d5aff9512', 'network_id': '38eb96de-10c6-4c42-994a-4c15a7e76447', 'ip_version': 6, 'cidr': '3ab7:d2e:6e50:7cf9:c581:760b::/96', 'allocation_pools': [{'start': '3ab7:d2e:6e50:7cf9:c581:760b:0:2', 'end': '3ab7:d2e:6e50:7cf9:c581:760b:ffff:fffe'}], 'gateway_ip': '3ab7:d2e:6e50:7cf9:c581:760b:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '3ab7:d2e:6e50:7cf9:c581:760b:0:2', 'tags': [], 'project_id': 'bacd7ae77213455983d3b17d5aff9512'}} 2025-11-17 22:50:35,064 - INFO - Created VN ctest-vn4-58801970 2025-11-17 22:50:35,115 - DEBUG - VN ctest-vn4-58801970 UUID is 38eb96de-10c6-4c42-994a-4c15a7e76447 2025-11-17 22:50:35,282 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': '38eb96de-10c6-4c42-994a-4c15a7e76447', 'name': 'ctest-vn4-58801970', 'tenant_id': 'bacd7ae77213455983d3b17d5aff9512', 'project_id': 'bacd7ae77213455983d3b17d5aff9512', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['1e786d8a-69f1-4e53-9829-0a620d2d7a95', '1d12c326-e5a9-44f7-a051-61738096989a'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-80741684', 'ctest-vn4-58801970'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-80741684', 'ctest-policy1-09969778']], 'subnet_ipam': [{'subnet_cidr': '109.86.75.192/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '3ab7:d2e:6e50:7cf9:c581:760b::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2025-11-17 22:50:35,447 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2025-11-17 22:50:35,737 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2025-11-17 22:50:35,764 - DEBUG - Requesting: http://10.0.0.50:8082/domain/a2565e28-b2d8-4e32-845a-d70bec41d8d3 2025-11-17 22:50:35,774 - DEBUG - Requesting: http://10.0.0.50:8082/project/bacd7ae7-7213-4559-83d3-b17d5aff9512 2025-11-17 22:50:35,843 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/38eb96de-10c6-4c42-994a-4c15a7e76447 2025-11-17 22:50:35,853 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/38eb96de-10c6-4c42-994a-4c15a7e76447 2025-11-17 22:50:35,860 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/386cd20a-5597-446b-abd3-2e1d8679e8c1 2025-11-17 22:50:35,864 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/386cd20a-5597-446b-abd3-2e1d8679e8c1 2025-11-17 22:50:35,869 - DEBUG - Requesting: http://10.0.0.50:8082/route-target/243d8a86-7f7d-497b-a957-2ec6f992d191 2025-11-17 22:50:35,873 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-11-17 22:50:35,873 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/38eb96de-10c6-4c42-994a-4c15a7e76447 2025-11-17 22:50:35,880 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/386cd20a-5597-446b-abd3-2e1d8679e8c1 2025-11-17 22:50:35,890 - INFO - Verified VN network id 11 for VN 38eb96de-10c6-4c42-994a-4c15a7e76447 2025-11-17 22:50:35,890 - INFO - Verifications in API Server for VN ctest-vn4-58801970 passed 2025-11-17 22:50:35,890 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/38eb96de-10c6-4c42-994a-4c15a7e76447 2025-11-17 22:50:35,897 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/386cd20a-5597-446b-abd3-2e1d8679e8c1 2025-11-17 22:50:35,901 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/386cd20a-5597-446b-abd3-2e1d8679e8c1 2025-11-17 22:50:35,906 - DEBUG - Requesting: http://10.0.0.50:8082/route-target/243d8a86-7f7d-497b-a957-2ec6f992d191 2025-11-17 22:50:35,914 - DEBUG - Control-node 10.0.0.50 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-80741684:ctest-vn4-58801970', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-80741684', 'owner-access': '7', 'group': 'admin', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '4101537766159305794', 'uuid-lslong': '11045724691974546503'}, 'enable': 'true', 'created': '2025-11-17T22:50:34', 'last-modified': '2025-11-17T22:50:35', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.656918'} 2025-11-17 22:50:35,919 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-11-17 22:50:35,919 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-58801970 passed 2025-11-17 22:50:35,919 - DEBUG - ====Verifying policy data for ctest-vn4-58801970 in API_Server ====== 2025-11-17 22:50:35,919 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2025-11-17 22:50:35,923 - DEBUG - Requesting: http://10.0.0.50:8082/domain/a2565e28-b2d8-4e32-845a-d70bec41d8d3 2025-11-17 22:50:35,931 - DEBUG - Requesting: http://10.0.0.50:8082/project/bacd7ae7-7213-4559-83d3-b17d5aff9512 2025-11-17 22:50:35,998 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/38eb96de-10c6-4c42-994a-4c15a7e76447 2025-11-17 22:50:36,005 - DEBUG - ==>Verifying data for policy with id: 74fd11d1-1848-4159-8c7e-80733cdb0ba0, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-80741684', 'ctest-policy1-09969778'] 2025-11-17 22:50:36,005 - INFO - VN ctest-vn4-58801970 Policy verification: verify_vn_policy_in_api_server, status: True 2025-11-17 22:50:36,006 - DEBUG - Verifying the vn in opserver 2025-11-17 22:50:36,006 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-80741684:ctest-vn4-58801970 virtual network link through opserver 10.0.0.50 2025-11-17 22:50:36,006 - DEBUG - Requesting: http://10.0.0.50:8081/analytics/uves/virtual-networks 2025-11-17 22:50:36,296 - DEBUG - Requesting: http://10.0.0.50:8081/analytics/uves/virtual-networks 2025-11-17 22:50:36,346 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-80741684:ctest-vn4-58801970', 'href': 'http://10.0.0.50:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-80741684:ctest-vn4-58801970?flat'} 2025-11-17 22:50:36,346 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-80741684:ctest-vn4-58801970 is found in opserver 2025-11-17 22:50:36,354 - DEBUG - Do not have enough data to verify VN in agent 2025-11-17 22:50:36,357 - DEBUG - VRF ids for VN ctest-vn4-58801970: {} 2025-11-17 22:50:36,358 - DEBUG - ====Verifying data for ctest-policy1-09969778 in API_Server ====== 2025-11-17 22:50:36,358 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2025-11-17 22:50:36,362 - DEBUG - Requesting: http://10.0.0.50:8082/domain/a2565e28-b2d8-4e32-845a-d70bec41d8d3 2025-11-17 22:50:36,370 - DEBUG - Requesting: http://10.0.0.50:8082/project/bacd7ae7-7213-4559-83d3-b17d5aff9512 2025-11-17 22:50:36,452 - DEBUG - Requesting: http://10.0.0.50:8082/network-policy/74fd11d1-1848-4159-8c7e-80733cdb0ba0 2025-11-17 22:50:36,459 - INFO - Verified policy ctest-policy1-09969778 in API Server, Result: True 2025-11-17 22:50:36,459 - INFO - Done with setup and verification, moving onto test .. 2025-11-17 22:50:36,465 - INFO - Deleting VN ctest-vn4-58801970 2025-11-17 22:50:36,556 - DEBUG - Response for deleting network () 2025-11-17 22:50:36,556 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/386cd20a-5597-446b-abd3-2e1d8679e8c1 2025-11-17 22:50:36,560 - DEBUG - Response Code: 404 2025-11-17 22:50:36,560 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2025-11-17 22:50:36,563 - DEBUG - Requesting: http://10.0.0.50:8082/domain/a2565e28-b2d8-4e32-845a-d70bec41d8d3 2025-11-17 22:50:36,615 - DEBUG - Requesting: http://10.0.0.50:8082/project/bacd7ae7-7213-4559-83d3-b17d5aff9512 2025-11-17 22:50:36,685 - INFO - Validated that VN ctest-vn4-58801970 is not found in API Server 2025-11-17 22:50:36,693 - DEBUG - VN ctest-vn4-58801970 is not present in Agent 10.0.0.50 2025-11-17 22:50:36,693 - INFO - Validated that VN ctest-vn4-58801970 is not in any agent 2025-11-17 22:50:36,705 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-58801970 info 2025-11-17 22:50:36,726 - INFO - Deleted policy ctest-policy1-09969778 2025-11-17 22:50:36,883 - DEBUG - policy ctest-policy1-09969778 is not found in API Server 2025-11-17 22:50:37,131 - DEBUG - No XMPP flaps were noticed during the test
2025-11-17 22:50:37,131 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04]
2025-11-17 22:50:37,131 - INFO - -------------------------------------------------------------------------------- 2025-11-17 22:50:37,415 - DEBUG - No XMPP flaps were noticed during the test
2025-11-17 22:50:37,415 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04]
2025-11-17 22:50:37,415 - INFO - -------------------------------------------------------------------------------- 2025-11-17 22:50:38,052 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-80741684, ID : bacd7ae7-7213-4559-83d3-b17d5aff9512