2025-09-19 16:31:29,492 - INFO - Domain Default found not creating 2025-09-19 16:31:29,624 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-82124120 not found, creating it 2025-09-19 16:31:30,053 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-82124120, ID : 71dfe0e6-17c7-4ae8-8120-6e76c97ee76d 2025-09-19 16:31:31,405 - INFO - ================================================================================ 2025-09-19 16:31:31,405 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-09-19 16:31:31,660 - DEBUG - Nothing to compare xmpp stats {'10.0.0.254': {'10.20.0.17': '0'}} with 2025-09-19 16:31:31,660 - INFO - Initial checks done. Running the testcase now 2025-09-19 16:31:31,660 - INFO - 2025-09-19 16:31:31,660 - INFO - ================================================================================ 2025-09-19 16:31:31,660 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-09-19 16:31:31,660 - 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-09-19 16:31:31,947 - DEBUG - Nothing to compare xmpp stats {'10.0.0.254': {'10.20.0.17': '0'}} with 2025-09-19 16:31:31,947 - INFO - Initial checks done. Running the testcase now 2025-09-19 16:31:31,947 - INFO - 2025-09-19 16:31:32,290 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-82124120:ctest-vn4-47312503, 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-82124120:ctest-vn4-47312503, 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-82124120:ctest-vn4-47312503, 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-82124120:ctest-vn4-47312503, 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-09-19 16:31:32,798 - DEBUG - Response for create_network : {'network': {'id': 'f33ccf0a-24ae-4e0d-aa5c-1f263b6c5b74', 'name': 'ctest-vn4-47312503', 'tenant_id': '71dfe0e617c74ae881206e76c97ee76d', 'project_id': '71dfe0e617c74ae881206e76c97ee76d', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-82124120', 'ctest-vn4-47312503'], 'port_security_enabled': True, 'description': ''}} 2025-09-19 16:31:32,945 - DEBUG - Response for create_subnet : {'subnet': {'id': 'a6a2867c-b141-46a0-a5ce-75f4356c42fe', 'name': '', 'tenant_id': '71dfe0e617c74ae881206e76c97ee76d', 'network_id': 'f33ccf0a-24ae-4e0d-aa5c-1f263b6c5b74', 'ip_version': 4, 'cidr': '31.29.251.128/26', 'allocation_pools': [{'start': '31.29.251.130', 'end': '31.29.251.190'}], 'gateway_ip': '31.29.251.129', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '31.29.251.130', 'tags': [], 'project_id': '71dfe0e617c74ae881206e76c97ee76d'}} 2025-09-19 16:31:33,126 - DEBUG - Response for create_subnet : {'subnet': {'id': 'a65ee589-5a15-4a5a-8c92-04fe2ae96ab3', 'name': '', 'tenant_id': '71dfe0e617c74ae881206e76c97ee76d', 'network_id': 'f33ccf0a-24ae-4e0d-aa5c-1f263b6c5b74', 'ip_version': 6, 'cidr': '2ca2:ccf1:21a0:73af:6df7:7bd1::/96', 'allocation_pools': [{'start': '2ca2:ccf1:21a0:73af:6df7:7bd1:0:2', 'end': '2ca2:ccf1:21a0:73af:6df7:7bd1:ffff:fffe'}], 'gateway_ip': '2ca2:ccf1:21a0:73af:6df7:7bd1:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '2ca2:ccf1:21a0:73af:6df7:7bd1:0:2', 'tags': [], 'project_id': '71dfe0e617c74ae881206e76c97ee76d'}} 2025-09-19 16:31:33,147 - INFO - Created VN ctest-vn4-47312503 2025-09-19 16:31:33,199 - DEBUG - VN ctest-vn4-47312503 UUID is f33ccf0a-24ae-4e0d-aa5c-1f263b6c5b74 2025-09-19 16:31:33,396 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': 'f33ccf0a-24ae-4e0d-aa5c-1f263b6c5b74', 'name': 'ctest-vn4-47312503', 'tenant_id': '71dfe0e617c74ae881206e76c97ee76d', 'project_id': '71dfe0e617c74ae881206e76c97ee76d', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['a6a2867c-b141-46a0-a5ce-75f4356c42fe', 'a65ee589-5a15-4a5a-8c92-04fe2ae96ab3'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-82124120', 'ctest-vn4-47312503'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-82124120', 'ctest-policy1-76308790']], 'subnet_ipam': [{'subnet_cidr': '31.29.251.128/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '2ca2:ccf1:21a0:73af:6df7:7bd1::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2025-09-19 16:31:33,559 - DEBUG - Requesting: http://10.0.0.254:8082/domains 2025-09-19 16:31:33,847 - DEBUG - Requesting: http://10.0.0.254:8082/domains 2025-09-19 16:31:33,873 - DEBUG - Requesting: http://10.0.0.254:8082/domain/8670d522-5f73-427f-aca5-158d7e87971a 2025-09-19 16:31:33,885 - DEBUG - Requesting: http://10.0.0.254:8082/project/71dfe0e6-17c7-4ae8-8120-6e76c97ee76d 2025-09-19 16:31:33,971 - DEBUG - Requesting: http://10.0.0.254:8082/virtual-network/f33ccf0a-24ae-4e0d-aa5c-1f263b6c5b74 2025-09-19 16:31:33,984 - DEBUG - Requesting: http://10.0.0.254:8082/virtual-network/f33ccf0a-24ae-4e0d-aa5c-1f263b6c5b74 2025-09-19 16:31:33,992 - DEBUG - Requesting: http://10.0.0.254:8082/routing-instance/5159a394-bfed-487a-89c2-e6838afd7fc9 2025-09-19 16:31:33,998 - DEBUG - Requesting: http://10.0.0.254:8082/routing-instance/5159a394-bfed-487a-89c2-e6838afd7fc9 2025-09-19 16:31:34,003 - DEBUG - Requesting: http://10.0.0.254:8082/route-target/762640bc-4704-4e6b-a1ab-439905868018 2025-09-19 16:31:34,008 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-09-19 16:31:34,008 - DEBUG - Requesting: http://10.0.0.254:8082/virtual-network/f33ccf0a-24ae-4e0d-aa5c-1f263b6c5b74 2025-09-19 16:31:34,015 - DEBUG - Requesting: http://10.0.0.254:8082/routing-instance/5159a394-bfed-487a-89c2-e6838afd7fc9 2025-09-19 16:31:34,026 - INFO - Verified VN network id 9 for VN f33ccf0a-24ae-4e0d-aa5c-1f263b6c5b74 2025-09-19 16:31:34,026 - INFO - Verifications in API Server for VN ctest-vn4-47312503 passed 2025-09-19 16:31:34,026 - DEBUG - Requesting: http://10.0.0.254:8082/virtual-network/f33ccf0a-24ae-4e0d-aa5c-1f263b6c5b74 2025-09-19 16:31:34,034 - DEBUG - Requesting: http://10.0.0.254:8082/routing-instance/5159a394-bfed-487a-89c2-e6838afd7fc9 2025-09-19 16:31:34,039 - DEBUG - Requesting: http://10.0.0.254:8082/routing-instance/5159a394-bfed-487a-89c2-e6838afd7fc9 2025-09-19 16:31:34,044 - DEBUG - Requesting: http://10.0.0.254:8082/route-target/762640bc-4704-4e6b-a1ab-439905868018 2025-09-19 16:31:34,053 - DEBUG - Control-node 10.0.0.254 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-82124120:ctest-vn4-47312503', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-82124120', 'owner-access': '7', 'group': 'reader', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '17527111492291153421', 'uuid-lslong': '12275720933371304820'}, 'enable': 'true', 'created': '2025-09-19T16:31:32', 'last-modified': '2025-09-19T16:31:33', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.673150'} 2025-09-19 16:31:34,059 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-09-19 16:31:34,060 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-47312503 passed 2025-09-19 16:31:34,060 - DEBUG - ====Verifying policy data for ctest-vn4-47312503 in API_Server ====== 2025-09-19 16:31:34,062 - DEBUG - Requesting: http://10.0.0.254:8082/domains 2025-09-19 16:31:34,067 - DEBUG - Requesting: http://10.0.0.254:8082/domain/8670d522-5f73-427f-aca5-158d7e87971a 2025-09-19 16:31:34,076 - DEBUG - Requesting: http://10.0.0.254:8082/project/71dfe0e6-17c7-4ae8-8120-6e76c97ee76d 2025-09-19 16:31:34,145 - DEBUG - Requesting: http://10.0.0.254:8082/virtual-network/f33ccf0a-24ae-4e0d-aa5c-1f263b6c5b74 2025-09-19 16:31:34,155 - DEBUG - ==>Verifying data for policy with id: 79b28f45-c797-4b26-a45a-6dfddd82cd53, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-82124120', 'ctest-policy1-76308790'] 2025-09-19 16:31:34,155 - INFO - VN ctest-vn4-47312503 Policy verification: verify_vn_policy_in_api_server, status: True 2025-09-19 16:31:34,155 - DEBUG - Verifying the vn in opserver 2025-09-19 16:31:34,155 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-82124120:ctest-vn4-47312503 virtual network link through opserver 10.0.0.254 2025-09-19 16:31:34,156 - DEBUG - Requesting: http://10.0.0.254:8081/analytics/uves/virtual-networks 2025-09-19 16:31:34,457 - DEBUG - Requesting: http://10.0.0.254:8081/analytics/uves/virtual-networks 2025-09-19 16:31:34,507 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-82124120:ctest-vn4-47312503', 'href': 'http://10.0.0.254:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-82124120:ctest-vn4-47312503?flat'} 2025-09-19 16:31:34,507 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-82124120:ctest-vn4-47312503 is found in opserver 2025-09-19 16:31:34,516 - DEBUG - Do not have enough data to verify VN in agent 2025-09-19 16:31:34,520 - DEBUG - VRF ids for VN ctest-vn4-47312503: {} 2025-09-19 16:31:34,521 - DEBUG - ====Verifying data for ctest-policy1-76308790 in API_Server ====== 2025-09-19 16:31:34,521 - DEBUG - Requesting: http://10.0.0.254:8082/domains 2025-09-19 16:31:34,526 - DEBUG - Requesting: http://10.0.0.254:8082/domain/8670d522-5f73-427f-aca5-158d7e87971a 2025-09-19 16:31:34,535 - DEBUG - Requesting: http://10.0.0.254:8082/project/71dfe0e6-17c7-4ae8-8120-6e76c97ee76d 2025-09-19 16:31:34,609 - DEBUG - Requesting: http://10.0.0.254:8082/network-policy/79b28f45-c797-4b26-a45a-6dfddd82cd53 2025-09-19 16:31:34,617 - INFO - Verified policy ctest-policy1-76308790 in API Server, Result: True 2025-09-19 16:31:34,617 - INFO - Done with setup and verification, moving onto test .. 2025-09-19 16:31:34,623 - INFO - Deleting VN ctest-vn4-47312503 2025-09-19 16:31:34,724 - DEBUG - Response for deleting network () 2025-09-19 16:31:34,724 - DEBUG - Requesting: http://10.0.0.254:8082/routing-instance/5159a394-bfed-487a-89c2-e6838afd7fc9 2025-09-19 16:31:34,728 - DEBUG - Response Code: 404 2025-09-19 16:31:34,729 - DEBUG - Requesting: http://10.0.0.254:8082/domains 2025-09-19 16:31:34,733 - DEBUG - Requesting: http://10.0.0.254:8082/domain/8670d522-5f73-427f-aca5-158d7e87971a 2025-09-19 16:31:34,787 - DEBUG - Requesting: http://10.0.0.254:8082/project/71dfe0e6-17c7-4ae8-8120-6e76c97ee76d 2025-09-19 16:31:34,857 - INFO - Validated that VN ctest-vn4-47312503 is not found in API Server 2025-09-19 16:31:34,865 - DEBUG - VN ctest-vn4-47312503 is not present in Agent 10.0.0.254 2025-09-19 16:31:34,865 - INFO - Validated that VN ctest-vn4-47312503 is not in any agent 2025-09-19 16:31:34,877 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-47312503 info 2025-09-19 16:31:34,898 - INFO - Deleted policy ctest-policy1-76308790 2025-09-19 16:31:35,059 - DEBUG - policy ctest-policy1-76308790 is not found in API Server 2025-09-19 16:31:35,324 - DEBUG - No XMPP flaps were noticed during the test
2025-09-19 16:31:35,324 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04]
2025-09-19 16:31:35,324 - INFO - -------------------------------------------------------------------------------- 2025-09-19 16:31:35,617 - DEBUG - No XMPP flaps were noticed during the test
2025-09-19 16:31:35,617 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04]
2025-09-19 16:31:35,617 - INFO - -------------------------------------------------------------------------------- 2025-09-19 16:31:36,282 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-82124120, ID : 71dfe0e6-17c7-4ae8-8120-6e76c97ee76d