2025-11-13 15:29:30,534 - INFO - Domain Default found not creating 2025-11-13 15:29:30,659 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-38291011 not found, creating it 2025-11-13 15:29:31,070 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-38291011, ID : 9b10e3eb-8e5b-421c-8720-89f5734261dd 2025-11-13 15:29:33,144 - INFO - ================================================================================ 2025-11-13 15:29:33,144 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-11-13 15:29:33,404 - DEBUG - Nothing to compare xmpp stats {'10.0.0.38': {'10.20.0.17': '0'}} with 2025-11-13 15:29:33,404 - INFO - Initial checks done. Running the testcase now 2025-11-13 15:29:33,404 - INFO - 2025-11-13 15:29:33,404 - INFO - ================================================================================ 2025-11-13 15:29:33,404 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-11-13 15:29:33,404 - 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-13 15:29:33,690 - DEBUG - Nothing to compare xmpp stats {'10.0.0.38': {'10.20.0.17': '0'}} with 2025-11-13 15:29:33,690 - INFO - Initial checks done. Running the testcase now 2025-11-13 15:29:33,690 - INFO - 2025-11-13 15:29:34,050 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-38291011:ctest-vn4-25254510, 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-38291011:ctest-vn4-25254510, 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-38291011:ctest-vn4-25254510, 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-38291011:ctest-vn4-25254510, 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-13 15:29:34,553 - DEBUG - Response for create_network : {'network': {'id': 'a36a67c9-6db6-446f-95d4-525eb08f56ee', 'name': 'ctest-vn4-25254510', 'tenant_id': '9b10e3eb8e5b421c872089f5734261dd', 'project_id': '9b10e3eb8e5b421c872089f5734261dd', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-38291011', 'ctest-vn4-25254510'], 'port_security_enabled': True, 'description': ''}} 2025-11-13 15:29:34,697 - DEBUG - Response for create_subnet : {'subnet': {'id': 'd119fe16-8919-4d89-a572-8056e5002073', 'name': '', 'tenant_id': '9b10e3eb8e5b421c872089f5734261dd', 'network_id': 'a36a67c9-6db6-446f-95d4-525eb08f56ee', 'ip_version': 4, 'cidr': '53.234.156.64/26', 'allocation_pools': [{'start': '53.234.156.66', 'end': '53.234.156.126'}], 'gateway_ip': '53.234.156.65', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '53.234.156.66', 'tags': [], 'project_id': '9b10e3eb8e5b421c872089f5734261dd'}} 2025-11-13 15:29:34,879 - DEBUG - Response for create_subnet : {'subnet': {'id': '1c3eee65-be6c-440e-a5e3-51eab5f76518', 'name': '', 'tenant_id': '9b10e3eb8e5b421c872089f5734261dd', 'network_id': 'a36a67c9-6db6-446f-95d4-525eb08f56ee', 'ip_version': 6, 'cidr': '29c0:a475:1324:1b61:3ad:c0b8::/96', 'allocation_pools': [{'start': '29c0:a475:1324:1b61:3ad:c0b8:0:2', 'end': '29c0:a475:1324:1b61:3ad:c0b8:ffff:fffe'}], 'gateway_ip': '29c0:a475:1324:1b61:3ad:c0b8:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '29c0:a475:1324:1b61:3ad:c0b8:0:2', 'tags': [], 'project_id': '9b10e3eb8e5b421c872089f5734261dd'}} 2025-11-13 15:29:34,896 - INFO - Created VN ctest-vn4-25254510 2025-11-13 15:29:34,950 - DEBUG - VN ctest-vn4-25254510 UUID is a36a67c9-6db6-446f-95d4-525eb08f56ee 2025-11-13 15:29:35,122 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': 'a36a67c9-6db6-446f-95d4-525eb08f56ee', 'name': 'ctest-vn4-25254510', 'tenant_id': '9b10e3eb8e5b421c872089f5734261dd', 'project_id': '9b10e3eb8e5b421c872089f5734261dd', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['d119fe16-8919-4d89-a572-8056e5002073', '1c3eee65-be6c-440e-a5e3-51eab5f76518'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-38291011', 'ctest-vn4-25254510'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-38291011', 'ctest-policy1-24398297']], 'subnet_ipam': [{'subnet_cidr': '53.234.156.64/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '29c0:a475:1324:1b61:3ad:c0b8::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2025-11-13 15:29:35,286 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2025-11-13 15:29:35,600 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2025-11-13 15:29:35,626 - DEBUG - Requesting: http://10.0.0.38:8082/domain/aa8e3cec-159b-4377-ac93-5461501c0fa5 2025-11-13 15:29:35,636 - DEBUG - Requesting: http://10.0.0.38:8082/project/9b10e3eb-8e5b-421c-8720-89f5734261dd 2025-11-13 15:29:35,702 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/a36a67c9-6db6-446f-95d4-525eb08f56ee 2025-11-13 15:29:35,714 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/a36a67c9-6db6-446f-95d4-525eb08f56ee 2025-11-13 15:29:35,723 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/2cf7fdde-2350-430e-9291-c0adcc3ebacb 2025-11-13 15:29:35,730 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/2cf7fdde-2350-430e-9291-c0adcc3ebacb 2025-11-13 15:29:35,736 - DEBUG - Requesting: http://10.0.0.38:8082/route-target/1a6f0fce-d615-4a44-afed-7630950b831e 2025-11-13 15:29:35,742 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-11-13 15:29:35,742 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/a36a67c9-6db6-446f-95d4-525eb08f56ee 2025-11-13 15:29:35,750 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/2cf7fdde-2350-430e-9291-c0adcc3ebacb 2025-11-13 15:29:35,762 - INFO - Verified VN network id 11 for VN a36a67c9-6db6-446f-95d4-525eb08f56ee 2025-11-13 15:29:35,762 - INFO - Verifications in API Server for VN ctest-vn4-25254510 passed 2025-11-13 15:29:35,762 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/a36a67c9-6db6-446f-95d4-525eb08f56ee 2025-11-13 15:29:35,770 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/2cf7fdde-2350-430e-9291-c0adcc3ebacb 2025-11-13 15:29:35,776 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/2cf7fdde-2350-430e-9291-c0adcc3ebacb 2025-11-13 15:29:35,781 - DEBUG - Requesting: http://10.0.0.38:8082/route-target/1a6f0fce-d615-4a44-afed-7630950b831e 2025-11-13 15:29:35,790 - DEBUG - Control-node 10.0.0.38 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-38291011:ctest-vn4-25254510', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-38291011', 'owner-access': '7', 'group': 'reader', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '11775338290540332143', 'uuid-lslong': '10796344773356508910'}, 'enable': 'true', 'created': '2025-11-13T15:29:34', 'last-modified': '2025-11-13T15:29:35', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.686661'} 2025-11-13 15:29:35,795 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-11-13 15:29:35,795 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-25254510 passed 2025-11-13 15:29:35,796 - DEBUG - ====Verifying policy data for ctest-vn4-25254510 in API_Server ====== 2025-11-13 15:29:35,796 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2025-11-13 15:29:35,802 - DEBUG - Requesting: http://10.0.0.38:8082/domain/aa8e3cec-159b-4377-ac93-5461501c0fa5 2025-11-13 15:29:35,814 - DEBUG - Requesting: http://10.0.0.38:8082/project/9b10e3eb-8e5b-421c-8720-89f5734261dd 2025-11-13 15:29:35,882 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/a36a67c9-6db6-446f-95d4-525eb08f56ee 2025-11-13 15:29:35,891 - DEBUG - ==>Verifying data for policy with id: 3021d296-450c-40e1-bfcf-bd9247b18c8e, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-38291011', 'ctest-policy1-24398297'] 2025-11-13 15:29:35,891 - INFO - VN ctest-vn4-25254510 Policy verification: verify_vn_policy_in_api_server, status: True 2025-11-13 15:29:35,891 - DEBUG - Verifying the vn in opserver 2025-11-13 15:29:35,891 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-38291011:ctest-vn4-25254510 virtual network link through opserver 10.0.0.38 2025-11-13 15:29:35,891 - DEBUG - Requesting: http://10.0.0.38:8081/analytics/uves/virtual-networks 2025-11-13 15:29:36,204 - DEBUG - Requesting: http://10.0.0.38:8081/analytics/uves/virtual-networks 2025-11-13 15:29:36,255 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-38291011:ctest-vn4-25254510', 'href': 'http://10.0.0.38:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-38291011:ctest-vn4-25254510?flat'} 2025-11-13 15:29:36,255 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-38291011:ctest-vn4-25254510 is found in opserver 2025-11-13 15:29:36,265 - DEBUG - Do not have enough data to verify VN in agent 2025-11-13 15:29:36,270 - DEBUG - VRF ids for VN ctest-vn4-25254510: {} 2025-11-13 15:29:36,270 - DEBUG - ====Verifying data for ctest-policy1-24398297 in API_Server ====== 2025-11-13 15:29:36,271 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2025-11-13 15:29:36,276 - DEBUG - Requesting: http://10.0.0.38:8082/domain/aa8e3cec-159b-4377-ac93-5461501c0fa5 2025-11-13 15:29:36,286 - DEBUG - Requesting: http://10.0.0.38:8082/project/9b10e3eb-8e5b-421c-8720-89f5734261dd 2025-11-13 15:29:36,353 - DEBUG - Requesting: http://10.0.0.38:8082/network-policy/3021d296-450c-40e1-bfcf-bd9247b18c8e 2025-11-13 15:29:36,362 - INFO - Verified policy ctest-policy1-24398297 in API Server, Result: True 2025-11-13 15:29:36,362 - INFO - Done with setup and verification, moving onto test .. 2025-11-13 15:29:36,369 - INFO - Deleting VN ctest-vn4-25254510 2025-11-13 15:29:36,478 - DEBUG - Response for deleting network () 2025-11-13 15:29:36,478 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/2cf7fdde-2350-430e-9291-c0adcc3ebacb 2025-11-13 15:29:36,482 - DEBUG - Response Code: 404 2025-11-13 15:29:36,482 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2025-11-13 15:29:36,486 - DEBUG - Requesting: http://10.0.0.38:8082/domain/aa8e3cec-159b-4377-ac93-5461501c0fa5 2025-11-13 15:29:36,538 - DEBUG - Requesting: http://10.0.0.38:8082/project/9b10e3eb-8e5b-421c-8720-89f5734261dd 2025-11-13 15:29:36,607 - INFO - Validated that VN ctest-vn4-25254510 is not found in API Server 2025-11-13 15:29:36,616 - DEBUG - VN ctest-vn4-25254510 is not present in Agent 10.0.0.38 2025-11-13 15:29:36,616 - INFO - Validated that VN ctest-vn4-25254510 is not in any agent 2025-11-13 15:29:36,627 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-25254510 info 2025-11-13 15:29:36,646 - INFO - Deleted policy ctest-policy1-24398297 2025-11-13 15:29:36,806 - DEBUG - policy ctest-policy1-24398297 is not found in API Server 2025-11-13 15:29:37,067 - DEBUG - No XMPP flaps were noticed during the test
2025-11-13 15:29:37,067 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04]
2025-11-13 15:29:37,067 - INFO - -------------------------------------------------------------------------------- 2025-11-13 15:29:37,358 - DEBUG - No XMPP flaps were noticed during the test
2025-11-13 15:29:37,358 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04]
2025-11-13 15:29:37,358 - INFO - -------------------------------------------------------------------------------- 2025-11-13 15:29:38,016 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-38291011, ID : 9b10e3eb-8e5b-421c-8720-89f5734261dd