2025-11-17 20:38:12,615 - INFO - Domain Default found not creating 2025-11-17 20:38:12,773 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-49630976 not found, creating it 2025-11-17 20:38:13,247 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-49630976, ID : cf1f84c2-c541-4ab7-8ebb-bcbb77409851 2025-11-17 20:38:14,859 - INFO - ================================================================================ 2025-11-17 20:38:14,859 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-11-17 20:38:15,121 - DEBUG - Nothing to compare xmpp stats {'10.0.0.50': {'10.20.0.17': '0'}} with 2025-11-17 20:38:15,122 - INFO - Initial checks done. Running the testcase now 2025-11-17 20:38:15,122 - INFO - 2025-11-17 20:38:15,122 - INFO - ================================================================================ 2025-11-17 20:38:15,122 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-11-17 20:38:15,122 - 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:38:15,408 - DEBUG - Nothing to compare xmpp stats {'10.0.0.50': {'10.20.0.17': '0'}} with 2025-11-17 20:38:15,409 - INFO - Initial checks done. Running the testcase now 2025-11-17 20:38:15,409 - INFO - 2025-11-17 20:38:15,804 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-49630976:ctest-vn4-66386887, 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-49630976:ctest-vn4-66386887, 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-49630976:ctest-vn4-66386887, 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-49630976:ctest-vn4-66386887, 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:38:16,362 - DEBUG - Response for create_network : {'network': {'id': 'd0549acc-9f1d-4f18-8319-f2a25e2317a8', 'name': 'ctest-vn4-66386887', 'tenant_id': 'cf1f84c2c5414ab78ebbbcbb77409851', 'project_id': 'cf1f84c2c5414ab78ebbbcbb77409851', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-49630976', 'ctest-vn4-66386887'], 'port_security_enabled': True, 'description': ''}} 2025-11-17 20:38:16,518 - DEBUG - Response for create_subnet : {'subnet': {'id': '56fd5efd-48f2-4d28-bddd-dc5e779af62f', 'name': '', 'tenant_id': 'cf1f84c2c5414ab78ebbbcbb77409851', 'network_id': 'd0549acc-9f1d-4f18-8319-f2a25e2317a8', 'ip_version': 4, 'cidr': '175.11.28.192/26', 'allocation_pools': [{'start': '175.11.28.194', 'end': '175.11.28.254'}], 'gateway_ip': '175.11.28.193', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '175.11.28.194', 'tags': [], 'project_id': 'cf1f84c2c5414ab78ebbbcbb77409851'}} 2025-11-17 20:38:16,694 - DEBUG - Response for create_subnet : {'subnet': {'id': 'ef6f9994-201a-467f-b98f-1b3dad8ab756', 'name': '', 'tenant_id': 'cf1f84c2c5414ab78ebbbcbb77409851', 'network_id': 'd0549acc-9f1d-4f18-8319-f2a25e2317a8', 'ip_version': 6, 'cidr': '395f:f064:852f:8fbc:4938:48db::/96', 'allocation_pools': [{'start': '395f:f064:852f:8fbc:4938:48db:0:2', 'end': '395f:f064:852f:8fbc:4938:48db:ffff:fffe'}], 'gateway_ip': '395f:f064:852f:8fbc:4938:48db:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '395f:f064:852f:8fbc:4938:48db:0:2', 'tags': [], 'project_id': 'cf1f84c2c5414ab78ebbbcbb77409851'}} 2025-11-17 20:38:16,713 - INFO - Created VN ctest-vn4-66386887 2025-11-17 20:38:16,763 - DEBUG - VN ctest-vn4-66386887 UUID is d0549acc-9f1d-4f18-8319-f2a25e2317a8 2025-11-17 20:38:16,969 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': 'd0549acc-9f1d-4f18-8319-f2a25e2317a8', 'name': 'ctest-vn4-66386887', 'tenant_id': 'cf1f84c2c5414ab78ebbbcbb77409851', 'project_id': 'cf1f84c2c5414ab78ebbbcbb77409851', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['56fd5efd-48f2-4d28-bddd-dc5e779af62f', 'ef6f9994-201a-467f-b98f-1b3dad8ab756'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-49630976', 'ctest-vn4-66386887'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-49630976', 'ctest-policy1-59425047']], 'subnet_ipam': [{'subnet_cidr': '175.11.28.192/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '395f:f064:852f:8fbc:4938:48db::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2025-11-17 20:38:17,131 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2025-11-17 20:38:17,466 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2025-11-17 20:38:17,498 - DEBUG - Requesting: http://10.0.0.50:8082/domain/7df7e7c0-d394-4684-84be-be8cfbd1e283 2025-11-17 20:38:17,509 - DEBUG - Requesting: http://10.0.0.50:8082/project/cf1f84c2-c541-4ab7-8ebb-bcbb77409851 2025-11-17 20:38:17,579 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/d0549acc-9f1d-4f18-8319-f2a25e2317a8 2025-11-17 20:38:17,590 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/d0549acc-9f1d-4f18-8319-f2a25e2317a8 2025-11-17 20:38:17,599 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/9d009405-6841-4f9f-958b-7cae42080534 2025-11-17 20:38:17,606 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/9d009405-6841-4f9f-958b-7cae42080534 2025-11-17 20:38:17,612 - DEBUG - Requesting: http://10.0.0.50:8082/route-target/67419d32-a580-4627-97f4-5e710544bd79 2025-11-17 20:38:17,618 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-11-17 20:38:17,618 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/d0549acc-9f1d-4f18-8319-f2a25e2317a8 2025-11-17 20:38:17,627 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/9d009405-6841-4f9f-958b-7cae42080534 2025-11-17 20:38:17,640 - INFO - Verified VN network id 11 for VN d0549acc-9f1d-4f18-8319-f2a25e2317a8 2025-11-17 20:38:17,640 - INFO - Verifications in API Server for VN ctest-vn4-66386887 passed 2025-11-17 20:38:17,640 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/d0549acc-9f1d-4f18-8319-f2a25e2317a8 2025-11-17 20:38:17,649 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/9d009405-6841-4f9f-958b-7cae42080534 2025-11-17 20:38:17,655 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/9d009405-6841-4f9f-958b-7cae42080534 2025-11-17 20:38:17,660 - DEBUG - Requesting: http://10.0.0.50:8082/route-target/67419d32-a580-4627-97f4-5e710544bd79 2025-11-17 20:38:17,671 - DEBUG - Control-node 10.0.0.50 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-49630976:ctest-vn4-66386887', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-49630976', 'owner-access': '7', 'group': 'admin', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '15011793661566209816', 'uuid-lslong': '9446848472564307880'}, 'enable': 'true', 'created': '2025-11-17T20:38:16', 'last-modified': '2025-11-17T20:38:16', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.739452'} 2025-11-17 20:38:17,676 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-11-17 20:38:17,677 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-66386887 passed 2025-11-17 20:38:17,677 - DEBUG - ====Verifying policy data for ctest-vn4-66386887 in API_Server ====== 2025-11-17 20:38:17,677 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2025-11-17 20:38:17,681 - DEBUG - Requesting: http://10.0.0.50:8082/domain/7df7e7c0-d394-4684-84be-be8cfbd1e283 2025-11-17 20:38:17,692 - DEBUG - Requesting: http://10.0.0.50:8082/project/cf1f84c2-c541-4ab7-8ebb-bcbb77409851 2025-11-17 20:38:17,764 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/d0549acc-9f1d-4f18-8319-f2a25e2317a8 2025-11-17 20:38:17,774 - DEBUG - ==>Verifying data for policy with id: d38a0305-caf4-49cd-9258-4196cbe62fa4, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-49630976', 'ctest-policy1-59425047'] 2025-11-17 20:38:17,774 - INFO - VN ctest-vn4-66386887 Policy verification: verify_vn_policy_in_api_server, status: True 2025-11-17 20:38:17,774 - DEBUG - Verifying the vn in opserver 2025-11-17 20:38:17,774 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-49630976:ctest-vn4-66386887 virtual network link through opserver 10.0.0.50 2025-11-17 20:38:17,774 - DEBUG - Requesting: http://10.0.0.50:8081/analytics/uves/virtual-networks 2025-11-17 20:38:18,109 - DEBUG - Requesting: http://10.0.0.50:8081/analytics/uves/virtual-networks 2025-11-17 20:38:18,170 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-49630976:ctest-vn4-66386887', 'href': 'http://10.0.0.50:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-49630976:ctest-vn4-66386887?flat'} 2025-11-17 20:38:18,170 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-49630976:ctest-vn4-66386887 is found in opserver 2025-11-17 20:38:18,180 - DEBUG - Do not have enough data to verify VN in agent 2025-11-17 20:38:18,184 - DEBUG - VRF ids for VN ctest-vn4-66386887: {} 2025-11-17 20:38:18,184 - DEBUG - ====Verifying data for ctest-policy1-59425047 in API_Server ====== 2025-11-17 20:38:18,185 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2025-11-17 20:38:18,190 - DEBUG - Requesting: http://10.0.0.50:8082/domain/7df7e7c0-d394-4684-84be-be8cfbd1e283 2025-11-17 20:38:18,200 - DEBUG - Requesting: http://10.0.0.50:8082/project/cf1f84c2-c541-4ab7-8ebb-bcbb77409851 2025-11-17 20:38:18,273 - DEBUG - Requesting: http://10.0.0.50:8082/network-policy/d38a0305-caf4-49cd-9258-4196cbe62fa4 2025-11-17 20:38:18,282 - INFO - Verified policy ctest-policy1-59425047 in API Server, Result: True 2025-11-17 20:38:18,282 - INFO - Done with setup and verification, moving onto test .. 2025-11-17 20:38:18,289 - INFO - Deleting VN ctest-vn4-66386887 2025-11-17 20:38:18,408 - DEBUG - Response for deleting network () 2025-11-17 20:38:18,408 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/9d009405-6841-4f9f-958b-7cae42080534 2025-11-17 20:38:18,413 - DEBUG - Response Code: 404 2025-11-17 20:38:18,413 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2025-11-17 20:38:18,417 - DEBUG - Requesting: http://10.0.0.50:8082/domain/7df7e7c0-d394-4684-84be-be8cfbd1e283 2025-11-17 20:38:18,473 - DEBUG - Requesting: http://10.0.0.50:8082/project/cf1f84c2-c541-4ab7-8ebb-bcbb77409851 2025-11-17 20:38:18,542 - INFO - Validated that VN ctest-vn4-66386887 is not found in API Server 2025-11-17 20:38:18,553 - DEBUG - VN ctest-vn4-66386887 is not present in Agent 10.0.0.50 2025-11-17 20:38:18,553 - INFO - Validated that VN ctest-vn4-66386887 is not in any agent 2025-11-17 20:38:18,565 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-66386887 info 2025-11-17 20:38:18,592 - INFO - Deleted policy ctest-policy1-59425047 2025-11-17 20:38:18,755 - DEBUG - policy ctest-policy1-59425047 is not found in API Server 2025-11-17 20:38:19,008 - DEBUG - No XMPP flaps were noticed during the test
2025-11-17 20:38:19,009 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04]
2025-11-17 20:38:19,009 - INFO - -------------------------------------------------------------------------------- 2025-11-17 20:38:19,298 - DEBUG - No XMPP flaps were noticed during the test
2025-11-17 20:38:19,298 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:05]
2025-11-17 20:38:19,298 - INFO - -------------------------------------------------------------------------------- 2025-11-17 20:38:20,030 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-49630976, ID : cf1f84c2-c541-4ab7-8ebb-bcbb77409851