2025-10-09 18:48:35,767 - INFO - Domain Default found not creating 2025-10-09 18:48:35,920 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-65158359 not found, creating it 2025-10-09 18:48:36,359 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-65158359, ID : 6c8788b8-1c9e-467f-8203-147f0aaa5921 2025-10-09 18:48:37,743 - INFO - ================================================================================ 2025-10-09 18:48:37,744 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-10-09 18:48:38,006 - DEBUG - Nothing to compare xmpp stats {'10.0.0.50': {'10.20.0.17': '0'}} with 2025-10-09 18:48:38,006 - INFO - Initial checks done. Running the testcase now 2025-10-09 18:48:38,006 - INFO - 2025-10-09 18:48:38,006 - INFO - ================================================================================ 2025-10-09 18:48:38,006 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-10-09 18:48:38,007 - 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-10-09 18:48:38,298 - DEBUG - Nothing to compare xmpp stats {'10.0.0.50': {'10.20.0.17': '0'}} with 2025-10-09 18:48:38,298 - INFO - Initial checks done. Running the testcase now 2025-10-09 18:48:38,299 - INFO - 2025-10-09 18:48:38,639 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-65158359:ctest-vn4-87908743, 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-65158359:ctest-vn4-87908743, 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-65158359:ctest-vn4-87908743, 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-65158359:ctest-vn4-87908743, 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-10-09 18:48:39,129 - DEBUG - Response for create_network : {'network': {'id': 'a2227771-bd3a-49d6-bf4a-1a0dfbdc228a', 'name': 'ctest-vn4-87908743', 'tenant_id': '6c8788b81c9e467f8203147f0aaa5921', 'project_id': '6c8788b81c9e467f8203147f0aaa5921', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-65158359', 'ctest-vn4-87908743'], 'port_security_enabled': True, 'description': ''}} 2025-10-09 18:48:39,329 - DEBUG - Response for create_subnet : {'subnet': {'id': '0b0c4e3a-0a15-4471-a468-654b6b1be148', 'name': '', 'tenant_id': '6c8788b81c9e467f8203147f0aaa5921', 'network_id': 'a2227771-bd3a-49d6-bf4a-1a0dfbdc228a', 'ip_version': 4, 'cidr': '197.7.56.192/26', 'allocation_pools': [{'start': '197.7.56.194', 'end': '197.7.56.254'}], 'gateway_ip': '197.7.56.193', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '197.7.56.194', 'tags': [], 'project_id': '6c8788b81c9e467f8203147f0aaa5921'}} 2025-10-09 18:48:39,511 - DEBUG - Response for create_subnet : {'subnet': {'id': 'a1f99f67-f80f-4365-8505-bc4155a0d306', 'name': '', 'tenant_id': '6c8788b81c9e467f8203147f0aaa5921', 'network_id': 'a2227771-bd3a-49d6-bf4a-1a0dfbdc228a', 'ip_version': 6, 'cidr': '2f38:99f9:9070:8566:f9e5:af6f::/96', 'allocation_pools': [{'start': '2f38:99f9:9070:8566:f9e5:af6f:0:2', 'end': '2f38:99f9:9070:8566:f9e5:af6f:ffff:fffe'}], 'gateway_ip': '2f38:99f9:9070:8566:f9e5:af6f:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '2f38:99f9:9070:8566:f9e5:af6f:0:2', 'tags': [], 'project_id': '6c8788b81c9e467f8203147f0aaa5921'}} 2025-10-09 18:48:39,530 - INFO - Created VN ctest-vn4-87908743 2025-10-09 18:48:39,581 - DEBUG - VN ctest-vn4-87908743 UUID is a2227771-bd3a-49d6-bf4a-1a0dfbdc228a 2025-10-09 18:48:39,761 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': 'a2227771-bd3a-49d6-bf4a-1a0dfbdc228a', 'name': 'ctest-vn4-87908743', 'tenant_id': '6c8788b81c9e467f8203147f0aaa5921', 'project_id': '6c8788b81c9e467f8203147f0aaa5921', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['0b0c4e3a-0a15-4471-a468-654b6b1be148', 'a1f99f67-f80f-4365-8505-bc4155a0d306'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-65158359', 'ctest-vn4-87908743'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-65158359', 'ctest-policy1-22878886']], 'subnet_ipam': [{'subnet_cidr': '197.7.56.192/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '2f38:99f9:9070:8566:f9e5:af6f::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2025-10-09 18:48:39,921 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2025-10-09 18:48:40,209 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2025-10-09 18:48:40,236 - DEBUG - Requesting: http://10.0.0.50:8082/domain/c43b4afb-2c1e-414f-9274-57fbae5200c8 2025-10-09 18:48:40,247 - DEBUG - Requesting: http://10.0.0.50:8082/project/6c8788b8-1c9e-467f-8203-147f0aaa5921 2025-10-09 18:48:40,373 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/a2227771-bd3a-49d6-bf4a-1a0dfbdc228a 2025-10-09 18:48:40,385 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/a2227771-bd3a-49d6-bf4a-1a0dfbdc228a 2025-10-09 18:48:40,396 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/4749d488-73a6-4f38-81fc-987262ba266e 2025-10-09 18:48:40,402 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/4749d488-73a6-4f38-81fc-987262ba266e 2025-10-09 18:48:40,408 - DEBUG - Requesting: http://10.0.0.50:8082/route-target/f664276a-a6e9-48fb-b35e-1a4d9a21f8bf 2025-10-09 18:48:40,415 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-10-09 18:48:40,415 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/a2227771-bd3a-49d6-bf4a-1a0dfbdc228a 2025-10-09 18:48:40,423 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/4749d488-73a6-4f38-81fc-987262ba266e 2025-10-09 18:48:40,437 - INFO - Verified VN network id 12 for VN a2227771-bd3a-49d6-bf4a-1a0dfbdc228a 2025-10-09 18:48:40,437 - INFO - Verifications in API Server for VN ctest-vn4-87908743 passed 2025-10-09 18:48:40,437 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/a2227771-bd3a-49d6-bf4a-1a0dfbdc228a 2025-10-09 18:48:40,446 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/4749d488-73a6-4f38-81fc-987262ba266e 2025-10-09 18:48:40,453 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/4749d488-73a6-4f38-81fc-987262ba266e 2025-10-09 18:48:40,459 - DEBUG - Requesting: http://10.0.0.50:8082/route-target/f664276a-a6e9-48fb-b35e-1a4d9a21f8bf 2025-10-09 18:48:40,471 - DEBUG - Control-node 10.0.0.50 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-65158359:ctest-vn4-87908743', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-65158359', 'owner-access': '7', 'group': 'reader', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '11683031713742211542', 'uuid-lslong': '13783858256883229322'}, 'enable': 'true', 'created': '2025-10-09T18:48:39', 'last-modified': '2025-10-09T18:48:39', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.734328'} 2025-10-09 18:48:40,476 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-10-09 18:48:40,476 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-87908743 passed 2025-10-09 18:48:40,476 - DEBUG - ====Verifying policy data for ctest-vn4-87908743 in API_Server ====== 2025-10-09 18:48:40,476 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2025-10-09 18:48:40,481 - DEBUG - Requesting: http://10.0.0.50:8082/domain/c43b4afb-2c1e-414f-9274-57fbae5200c8 2025-10-09 18:48:40,490 - DEBUG - Requesting: http://10.0.0.50:8082/project/6c8788b8-1c9e-467f-8203-147f0aaa5921 2025-10-09 18:48:40,555 - DEBUG - Requesting: http://10.0.0.50:8082/virtual-network/a2227771-bd3a-49d6-bf4a-1a0dfbdc228a 2025-10-09 18:48:40,564 - DEBUG - ==>Verifying data for policy with id: 6941a10d-d05f-487c-92b5-4883fd8431fd, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-65158359', 'ctest-policy1-22878886'] 2025-10-09 18:48:40,564 - INFO - VN ctest-vn4-87908743 Policy verification: verify_vn_policy_in_api_server, status: True 2025-10-09 18:48:40,564 - DEBUG - Verifying the vn in opserver 2025-10-09 18:48:40,564 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-65158359:ctest-vn4-87908743 virtual network link through opserver 10.0.0.50 2025-10-09 18:48:40,564 - DEBUG - Requesting: http://10.0.0.50:8081/analytics/uves/virtual-networks 2025-10-09 18:48:40,852 - DEBUG - Requesting: http://10.0.0.50:8081/analytics/uves/virtual-networks 2025-10-09 18:48:40,903 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-65158359:ctest-vn4-87908743', 'href': 'http://10.0.0.50:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-65158359:ctest-vn4-87908743?flat'} 2025-10-09 18:48:40,903 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-65158359:ctest-vn4-87908743 is found in opserver 2025-10-09 18:48:40,913 - DEBUG - Do not have enough data to verify VN in agent 2025-10-09 18:48:40,918 - DEBUG - VRF ids for VN ctest-vn4-87908743: {} 2025-10-09 18:48:40,918 - DEBUG - ====Verifying data for ctest-policy1-22878886 in API_Server ====== 2025-10-09 18:48:40,918 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2025-10-09 18:48:40,924 - DEBUG - Requesting: http://10.0.0.50:8082/domain/c43b4afb-2c1e-414f-9274-57fbae5200c8 2025-10-09 18:48:40,935 - DEBUG - Requesting: http://10.0.0.50:8082/project/6c8788b8-1c9e-467f-8203-147f0aaa5921 2025-10-09 18:48:41,005 - DEBUG - Requesting: http://10.0.0.50:8082/network-policy/6941a10d-d05f-487c-92b5-4883fd8431fd 2025-10-09 18:48:41,013 - INFO - Verified policy ctest-policy1-22878886 in API Server, Result: True 2025-10-09 18:48:41,013 - INFO - Done with setup and verification, moving onto test .. 2025-10-09 18:48:41,022 - INFO - Deleting VN ctest-vn4-87908743 2025-10-09 18:48:41,127 - DEBUG - Response for deleting network () 2025-10-09 18:48:41,127 - DEBUG - Requesting: http://10.0.0.50:8082/routing-instance/4749d488-73a6-4f38-81fc-987262ba266e 2025-10-09 18:48:41,132 - DEBUG - Response Code: 404 2025-10-09 18:48:41,133 - DEBUG - Requesting: http://10.0.0.50:8082/domains 2025-10-09 18:48:41,138 - DEBUG - Requesting: http://10.0.0.50:8082/domain/c43b4afb-2c1e-414f-9274-57fbae5200c8 2025-10-09 18:48:41,195 - DEBUG - Requesting: http://10.0.0.50:8082/project/6c8788b8-1c9e-467f-8203-147f0aaa5921 2025-10-09 18:48:41,263 - INFO - Validated that VN ctest-vn4-87908743 is not found in API Server 2025-10-09 18:48:41,272 - DEBUG - VN ctest-vn4-87908743 is not present in Agent 10.0.0.50 2025-10-09 18:48:41,272 - INFO - Validated that VN ctest-vn4-87908743 is not in any agent 2025-10-09 18:48:41,284 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-87908743 info 2025-10-09 18:48:41,305 - INFO - Deleted policy ctest-policy1-22878886 2025-10-09 18:48:41,465 - DEBUG - policy ctest-policy1-22878886 is not found in API Server 2025-10-09 18:48:41,717 - DEBUG - No XMPP flaps were noticed during the test
2025-10-09 18:48:41,717 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:03]
2025-10-09 18:48:41,717 - INFO - -------------------------------------------------------------------------------- 2025-10-09 18:48:42,006 - DEBUG - No XMPP flaps were noticed during the test
2025-10-09 18:48:42,006 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:05]
2025-10-09 18:48:42,006 - INFO - -------------------------------------------------------------------------------- 2025-10-09 18:48:42,653 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-65158359, ID : 6c8788b8-1c9e-467f-8203-147f0aaa5921