2026-04-02 01:54:21,996 - INFO - Reading existing Domain with UUID 6b4d6e1f-9094-4f88-b6d3-8eafd30f73c5 2026-04-02 01:54:22,006 - INFO - Using existing domain ['admin_domain'](6b4d6e1f-9094-4f88-b6d3-8eafd30f73c5) 2026-04-02 01:54:22,190 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-55341777 not found, creating it 2026-04-02 01:54:22,686 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-55341777, ID : 8a41e35d-1b49-4f67-9db7-e1e15dc68516 2026-04-02 01:54:24,344 - INFO - ================================================================================ 2026-04-02 01:54:24,345 - INFO - STARTING TEST : test_remove_policy_with_ref 2026-04-02 01:54:24,731 - DEBUG - Nothing to compare xmpp stats {'10.0.0.41': {'10.0.0.41': '0'}} with 2026-04-02 01:54:24,731 - INFO - Initial checks done. Running the testcase now 2026-04-02 01:54:24,731 - INFO - 2026-04-02 01:54:24,731 - INFO - ================================================================================ 2026-04-02 01:54:24,731 - INFO - STARTING TEST : test_remove_policy_with_ref 2026-04-02 01:54:24,731 - 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. 2026-04-02 01:54:25,111 - DEBUG - Nothing to compare xmpp stats {'10.0.0.41': {'10.0.0.41': '0'}} with 2026-04-02 01:54:25,111 - INFO - Initial checks done. Running the testcase now 2026-04-02 01:54:25,111 - INFO - 2026-04-02 01:54:25,468 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = admin_domain:ctest-TestBasicPolicyNegativeIpv4v6-55341777:ctest-vn4-48422739, security_group = None, network_policy = None, subnet_list = []], src_ports = [start_port = -1, end_port = -1], application = [], dst_addresses = [subnet = None, virtual_network = admin_domain:ctest-TestBasicPolicyNegativeIpv4v6-55341777:ctest-vn4-48422739, 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 = admin_domain:ctest-TestBasicPolicyNegativeIpv4v6-55341777:ctest-vn4-48422739, security_group = None, network_policy = None, subnet_list = []], src_ports = [start_port = -1, end_port = -1], application = [], dst_addresses = [subnet = None, virtual_network = admin_domain:ctest-TestBasicPolicyNegativeIpv4v6-55341777:ctest-vn4-48422739, 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] 2026-04-02 01:54:26,158 - DEBUG - Response for create_network : {'network': {'id': 'abb34a58-a30b-49d7-8841-de4d7bd11191', 'name': 'ctest-vn4-48422739', 'tenant_id': '8a41e35d1b494f679db7e1e15dc68516', 'project_id': '8a41e35d1b494f679db7e1e15dc68516', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['admin_domain', 'ctest-TestBasicPolicyNegativeIpv4v6-55341777', 'ctest-vn4-48422739'], 'port_security_enabled': True, 'description': '', 'created_at': None, 'updated_at': None}} 2026-04-02 01:54:26,422 - DEBUG - Response for create_subnet : {'subnet': {'id': 'bcadc03e-8749-4c00-9540-817f383eebc6', 'name': '', 'tenant_id': '8a41e35d1b494f679db7e1e15dc68516', 'network_id': 'abb34a58-a30b-49d7-8841-de4d7bd11191', 'ip_version': 4, 'cidr': '48.236.79.192/26', 'allocation_pools': [{'start': '48.236.79.194', 'end': '48.236.79.254'}], 'gateway_ip': '48.236.79.193', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'created_at': '2026-04-02T01:54:26.315546', 'updated_at': '2026-04-02T01:54:26.315546', 'dns_server_address': '48.236.79.194', 'tags': [], 'project_id': '8a41e35d1b494f679db7e1e15dc68516'}} 2026-04-02 01:54:26,626 - DEBUG - Response for create_subnet : {'subnet': {'id': '5a890074-81d8-4b2d-a518-3b87d13aaee2', 'name': '', 'tenant_id': '8a41e35d1b494f679db7e1e15dc68516', 'network_id': 'abb34a58-a30b-49d7-8841-de4d7bd11191', 'ip_version': 6, 'cidr': '2b29:7fdd:824e:2f27:aae0:bd8e::/96', 'allocation_pools': [{'start': '2b29:7fdd:824e:2f27:aae0:bd8e:0:2', 'end': '2b29:7fdd:824e:2f27:aae0:bd8e:ffff:fffe'}], 'gateway_ip': '2b29:7fdd:824e:2f27:aae0:bd8e:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'created_at': '2026-04-02T01:54:26.513428', 'updated_at': '2026-04-02T01:54:26.513428', 'dns_server_address': '2b29:7fdd:824e:2f27:aae0:bd8e:0:2', 'tags': [], 'project_id': '8a41e35d1b494f679db7e1e15dc68516'}} 2026-04-02 01:54:26,696 - INFO - Created VN ctest-vn4-48422739 2026-04-02 01:54:26,750 - DEBUG - VN ctest-vn4-48422739 UUID is abb34a58-a30b-49d7-8841-de4d7bd11191 2026-04-02 01:54:27,221 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': 'abb34a58-a30b-49d7-8841-de4d7bd11191', 'name': 'ctest-vn4-48422739', 'tenant_id': '8a41e35d1b494f679db7e1e15dc68516', 'project_id': '8a41e35d1b494f679db7e1e15dc68516', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['bcadc03e-8749-4c00-9540-817f383eebc6', '5a890074-81d8-4b2d-a518-3b87d13aaee2'], 'fq_name': ['admin_domain', 'ctest-TestBasicPolicyNegativeIpv4v6-55341777', 'ctest-vn4-48422739'], 'policys': [['admin_domain', 'ctest-TestBasicPolicyNegativeIpv4v6-55341777', 'ctest-policy1-93099730']], 'subnet_ipam': [{'subnet_cidr': '48.236.79.192/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '2b29:7fdd:824e:2f27:aae0:bd8e::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': '', 'created_at': '2026-04-02T01:54:26.075920', 'updated_at': '2026-04-02T01:54:26.530282'}} 2026-04-02 01:54:27,398 - DEBUG - Requesting: https://10.0.0.41:8082/domains 2026-04-02 01:54:27,740 - DEBUG - Requesting: https://10.0.0.41:8082/domains 2026-04-02 01:54:27,814 - DEBUG - Requesting: https://10.0.0.41:8082/domain/6b4d6e1f-9094-4f88-b6d3-8eafd30f73c5 2026-04-02 01:54:27,871 - DEBUG - Requesting: https://10.0.0.41:8082/project/8a41e35d-1b49-4f67-9db7-e1e15dc68516 2026-04-02 01:54:27,955 - DEBUG - Requesting: https://10.0.0.41:8082/virtual-network/abb34a58-a30b-49d7-8841-de4d7bd11191 2026-04-02 01:54:28,012 - DEBUG - Requesting: https://10.0.0.41:8082/virtual-network/abb34a58-a30b-49d7-8841-de4d7bd11191 2026-04-02 01:54:28,072 - DEBUG - Requesting: https://10.0.0.41:8082/routing-instance/0996650b-d4fb-440f-aa99-c25ef89c8079 2026-04-02 01:54:28,123 - DEBUG - Requesting: https://10.0.0.41:8082/routing-instance/0996650b-d4fb-440f-aa99-c25ef89c8079 2026-04-02 01:54:28,175 - DEBUG - Requesting: https://10.0.0.41:8082/route-target/e06dcd37-a73c-499a-b527-b0a7361b8493 2026-04-02 01:54:28,226 - DEBUG - Route Targets: ['target:64512:8000004'] 2026-04-02 01:54:28,227 - DEBUG - Requesting: https://10.0.0.41:8082/virtual-network/abb34a58-a30b-49d7-8841-de4d7bd11191 2026-04-02 01:54:28,284 - DEBUG - Requesting: https://10.0.0.41:8082/routing-instance/0996650b-d4fb-440f-aa99-c25ef89c8079 2026-04-02 01:54:28,346 - INFO - Verified VN network id 12 for VN abb34a58-a30b-49d7-8841-de4d7bd11191 2026-04-02 01:54:28,346 - INFO - Verifications in API Server for VN ctest-vn4-48422739 passed 2026-04-02 01:54:28,346 - DEBUG - Requesting: https://10.0.0.41:8082/virtual-network/abb34a58-a30b-49d7-8841-de4d7bd11191 2026-04-02 01:54:28,400 - DEBUG - Requesting: https://10.0.0.41:8082/routing-instance/0996650b-d4fb-440f-aa99-c25ef89c8079 2026-04-02 01:54:28,450 - DEBUG - Requesting: https://10.0.0.41:8082/routing-instance/0996650b-d4fb-440f-aa99-c25ef89c8079 2026-04-02 01:54:28,503 - DEBUG - Requesting: https://10.0.0.41:8082/route-target/e06dcd37-a73c-499a-b527-b0a7361b8493 2026-04-02 01:54:28,603 - DEBUG - Control-node 10.0.0.41 : VN object is : {'node_name': 'virtual-network:admin_domain:ctest-TestBasicPolicyNegativeIpv4v6-55341777:ctest-vn4-48422739', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-55341777', 'owner-access': '7', 'group': 'member', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '12372314345869887959', 'uuid-lslong': '9818373087015539089'}, 'enable': 'true', 'created': '2026-04-02T01:54:26', 'last-modified': '2026-04-02T01:54:27', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:01.424165'} 2026-04-02 01:54:28,672 - DEBUG - Route Targets: ['target:64512:8000004'] 2026-04-02 01:54:28,672 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-48422739 passed 2026-04-02 01:54:28,672 - DEBUG - ====Verifying policy data for ctest-vn4-48422739 in API_Server ====== 2026-04-02 01:54:28,672 - DEBUG - Requesting: https://10.0.0.41:8082/domains 2026-04-02 01:54:28,722 - DEBUG - Requesting: https://10.0.0.41:8082/domain/6b4d6e1f-9094-4f88-b6d3-8eafd30f73c5 2026-04-02 01:54:28,779 - DEBUG - Requesting: https://10.0.0.41:8082/project/8a41e35d-1b49-4f67-9db7-e1e15dc68516 2026-04-02 01:54:28,855 - DEBUG - Requesting: https://10.0.0.41:8082/virtual-network/abb34a58-a30b-49d7-8841-de4d7bd11191 2026-04-02 01:54:28,908 - DEBUG - ==>Verifying data for policy with id: 3047c2f7-9dad-4f8c-8b27-6ffb5141c153, fqn: ['admin_domain', 'ctest-TestBasicPolicyNegativeIpv4v6-55341777', 'ctest-policy1-93099730'] 2026-04-02 01:54:28,908 - INFO - VN ctest-vn4-48422739 Policy verification: verify_vn_policy_in_api_server, status: True 2026-04-02 01:54:28,908 - DEBUG - Verifying the vn in opserver 2026-04-02 01:54:28,908 - DEBUG - Verifying the admin_domain:ctest-TestBasicPolicyNegativeIpv4v6-55341777:ctest-vn4-48422739 virtual network link through opserver 10.0.0.41 2026-04-02 01:54:28,908 - DEBUG - Requesting: https://10.0.0.41:8081/analytics/uves/virtual-networks 2026-04-02 01:54:29,251 - DEBUG - Requesting: https://10.0.0.41:8081/analytics/uves/virtual-networks 2026-04-02 01:54:29,354 - DEBUG - vn link and name as {'name': 'admin_domain:ctest-TestBasicPolicyNegativeIpv4v6-55341777:ctest-vn4-48422739', 'href': 'https://10.0.0.41:8081/analytics/uves/virtual-network/admin_domain:ctest-TestBasicPolicyNegativeIpv4v6-55341777:ctest-vn4-48422739?flat'} 2026-04-02 01:54:29,354 - INFO - Validated that VN admin_domain:ctest-TestBasicPolicyNegativeIpv4v6-55341777:ctest-vn4-48422739 is found in opserver 2026-04-02 01:54:29,450 - DEBUG - Do not have enough data to verify VN in agent 2026-04-02 01:54:29,498 - DEBUG - VRF ids for VN ctest-vn4-48422739: {} 2026-04-02 01:54:29,499 - DEBUG - ====Verifying data for ctest-policy1-93099730 in API_Server ====== 2026-04-02 01:54:29,499 - DEBUG - Requesting: https://10.0.0.41:8082/domains 2026-04-02 01:54:29,550 - DEBUG - Requesting: https://10.0.0.41:8082/domain/6b4d6e1f-9094-4f88-b6d3-8eafd30f73c5 2026-04-02 01:54:29,607 - DEBUG - Requesting: https://10.0.0.41:8082/project/8a41e35d-1b49-4f67-9db7-e1e15dc68516 2026-04-02 01:54:29,699 - DEBUG - Requesting: https://10.0.0.41:8082/network-policy/3047c2f7-9dad-4f8c-8b27-6ffb5141c153 2026-04-02 01:54:29,756 - INFO - Verified policy ctest-policy1-93099730 in API Server, Result: True 2026-04-02 01:54:29,756 - INFO - Done with setup and verification, moving onto test .. 2026-04-02 01:54:29,767 - INFO - Deleting VN ctest-vn4-48422739 2026-04-02 01:54:29,955 - DEBUG - Response for deleting network () 2026-04-02 01:54:29,955 - DEBUG - Requesting: https://10.0.0.41:8082/routing-instance/0996650b-d4fb-440f-aa99-c25ef89c8079 2026-04-02 01:54:30,006 - DEBUG - Response Code: 404 2026-04-02 01:54:30,006 - DEBUG - Requesting: https://10.0.0.41:8082/domains 2026-04-02 01:54:30,062 - DEBUG - Requesting: https://10.0.0.41:8082/domain/6b4d6e1f-9094-4f88-b6d3-8eafd30f73c5 2026-04-02 01:54:30,119 - DEBUG - Requesting: https://10.0.0.41:8082/project/8a41e35d-1b49-4f67-9db7-e1e15dc68516 2026-04-02 01:54:30,195 - INFO - Validated that VN ctest-vn4-48422739 is not found in API Server 2026-04-02 01:54:30,290 - DEBUG - VN ctest-vn4-48422739 is not present in Agent 10.0.0.41 2026-04-02 01:54:30,290 - INFO - Validated that VN ctest-vn4-48422739 is not in any agent 2026-04-02 01:54:30,439 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-48422739 info 2026-04-02 01:54:30,461 - INFO - Deleted policy ctest-policy1-93099730 2026-04-02 01:54:30,622 - DEBUG - policy ctest-policy1-93099730 is not found in API Server 2026-04-02 01:54:31,003 - DEBUG - No XMPP flaps were noticed during the test
2026-04-02 01:54:31,003 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:07]
2026-04-02 01:54:31,003 - INFO - -------------------------------------------------------------------------------- 2026-04-02 01:54:31,383 - DEBUG - No XMPP flaps were noticed during the test
2026-04-02 01:54:31,383 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:07]
2026-04-02 01:54:31,383 - INFO - -------------------------------------------------------------------------------- 2026-04-02 01:54:32,068 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-55341777, ID : 8a41e35d-1b49-4f67-9db7-e1e15dc68516