2025-09-18 12:43:13,930 - INFO - Domain Default found not creating 2025-09-18 12:43:14,080 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-51846578 not found, creating it 2025-09-18 12:43:14,512 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-51846578, ID : 76cbd00a-1d1d-4c0f-86c0-24b570be496d 2025-09-18 12:43:15,869 - INFO - ================================================================================ 2025-09-18 12:43:15,869 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-09-18 12:43:16,123 - DEBUG - Nothing to compare xmpp stats {'10.0.0.254': {'10.20.0.17': '0'}} with 2025-09-18 12:43:16,123 - INFO - Initial checks done. Running the testcase now 2025-09-18 12:43:16,123 - INFO - 2025-09-18 12:43:16,123 - INFO - ================================================================================ 2025-09-18 12:43:16,123 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-09-18 12:43:16,123 - 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-18 12:43:16,419 - DEBUG - Nothing to compare xmpp stats {'10.0.0.254': {'10.20.0.17': '0'}} with 2025-09-18 12:43:16,419 - INFO - Initial checks done. Running the testcase now 2025-09-18 12:43:16,419 - INFO - 2025-09-18 12:43:16,762 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-51846578:ctest-vn4-81482202, 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-51846578:ctest-vn4-81482202, 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-51846578:ctest-vn4-81482202, 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-51846578:ctest-vn4-81482202, 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-18 12:43:17,262 - DEBUG - Response for create_network : {'network': {'id': '0187491f-2ef0-4945-9aa2-320b45611045', 'name': 'ctest-vn4-81482202', 'tenant_id': '76cbd00a1d1d4c0f86c024b570be496d', 'project_id': '76cbd00a1d1d4c0f86c024b570be496d', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-51846578', 'ctest-vn4-81482202'], 'port_security_enabled': True, 'description': ''}} 2025-09-18 12:43:17,476 - DEBUG - Response for create_subnet : {'subnet': {'id': '0218039d-228f-4902-b26f-429407c8c772', 'name': '', 'tenant_id': '76cbd00a1d1d4c0f86c024b570be496d', 'network_id': '0187491f-2ef0-4945-9aa2-320b45611045', 'ip_version': 4, 'cidr': '167.122.67.64/26', 'allocation_pools': [{'start': '167.122.67.66', 'end': '167.122.67.126'}], 'gateway_ip': '167.122.67.65', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '167.122.67.66', 'tags': [], 'project_id': '76cbd00a1d1d4c0f86c024b570be496d'}} 2025-09-18 12:43:17,603 - DEBUG - Response for create_subnet : {'subnet': {'id': '221323e4-0e72-4d6f-bb06-f7e2bd600549', 'name': '', 'tenant_id': '76cbd00a1d1d4c0f86c024b570be496d', 'network_id': '0187491f-2ef0-4945-9aa2-320b45611045', 'ip_version': 6, 'cidr': '2a48:ed99:395b:b9fe:bacd:a5b2::/96', 'allocation_pools': [{'start': '2a48:ed99:395b:b9fe:bacd:a5b2:0:2', 'end': '2a48:ed99:395b:b9fe:bacd:a5b2:ffff:fffe'}], 'gateway_ip': '2a48:ed99:395b:b9fe:bacd:a5b2:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '2a48:ed99:395b:b9fe:bacd:a5b2:0:2', 'tags': [], 'project_id': '76cbd00a1d1d4c0f86c024b570be496d'}} 2025-09-18 12:43:17,622 - INFO - Created VN ctest-vn4-81482202 2025-09-18 12:43:17,674 - DEBUG - VN ctest-vn4-81482202 UUID is 0187491f-2ef0-4945-9aa2-320b45611045 2025-09-18 12:43:17,849 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': '0187491f-2ef0-4945-9aa2-320b45611045', 'name': 'ctest-vn4-81482202', 'tenant_id': '76cbd00a1d1d4c0f86c024b570be496d', 'project_id': '76cbd00a1d1d4c0f86c024b570be496d', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['0218039d-228f-4902-b26f-429407c8c772', '221323e4-0e72-4d6f-bb06-f7e2bd600549'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-51846578', 'ctest-vn4-81482202'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-51846578', 'ctest-policy1-06983734']], 'subnet_ipam': [{'subnet_cidr': '167.122.67.64/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '2a48:ed99:395b:b9fe:bacd:a5b2::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2025-09-18 12:43:18,010 - DEBUG - Requesting: http://10.0.0.254:8082/domains 2025-09-18 12:43:18,298 - DEBUG - Requesting: http://10.0.0.254:8082/domains 2025-09-18 12:43:18,323 - DEBUG - Requesting: http://10.0.0.254:8082/domain/152c17c4-b630-40d8-a714-8de71f26333d 2025-09-18 12:43:18,334 - DEBUG - Requesting: http://10.0.0.254:8082/project/76cbd00a-1d1d-4c0f-86c0-24b570be496d 2025-09-18 12:43:18,402 - DEBUG - Requesting: http://10.0.0.254:8082/virtual-network/0187491f-2ef0-4945-9aa2-320b45611045 2025-09-18 12:43:18,412 - DEBUG - Requesting: http://10.0.0.254:8082/virtual-network/0187491f-2ef0-4945-9aa2-320b45611045 2025-09-18 12:43:18,422 - DEBUG - Requesting: http://10.0.0.254:8082/routing-instance/e95f4820-216b-4411-815f-2721253dede9 2025-09-18 12:43:18,429 - DEBUG - Requesting: http://10.0.0.254:8082/routing-instance/e95f4820-216b-4411-815f-2721253dede9 2025-09-18 12:43:18,436 - DEBUG - Requesting: http://10.0.0.254:8082/route-target/91f1f6e4-a056-46a6-8116-4192977653d1 2025-09-18 12:43:18,441 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-09-18 12:43:18,441 - DEBUG - Requesting: http://10.0.0.254:8082/virtual-network/0187491f-2ef0-4945-9aa2-320b45611045 2025-09-18 12:43:18,449 - DEBUG - Requesting: http://10.0.0.254:8082/routing-instance/e95f4820-216b-4411-815f-2721253dede9 2025-09-18 12:43:18,460 - INFO - Verified VN network id 12 for VN 0187491f-2ef0-4945-9aa2-320b45611045 2025-09-18 12:43:18,460 - INFO - Verifications in API Server for VN ctest-vn4-81482202 passed 2025-09-18 12:43:18,460 - DEBUG - Requesting: http://10.0.0.254:8082/virtual-network/0187491f-2ef0-4945-9aa2-320b45611045 2025-09-18 12:43:18,468 - DEBUG - Requesting: http://10.0.0.254:8082/routing-instance/e95f4820-216b-4411-815f-2721253dede9 2025-09-18 12:43:18,473 - DEBUG - Requesting: http://10.0.0.254:8082/routing-instance/e95f4820-216b-4411-815f-2721253dede9 2025-09-18 12:43:18,478 - DEBUG - Requesting: http://10.0.0.254:8082/route-target/91f1f6e4-a056-46a6-8116-4192977653d1 2025-09-18 12:43:18,487 - DEBUG - Control-node 10.0.0.254 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-51846578:ctest-vn4-81482202', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-51846578', 'owner-access': '7', 'group': 'admin', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '110137114174179653', 'uuid-lslong': '11142523452058046533'}, 'enable': 'true', 'created': '2025-09-18T12:43:17', 'last-modified': '2025-09-18T12:43:17', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.655879'} 2025-09-18 12:43:18,492 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-09-18 12:43:18,493 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-81482202 passed 2025-09-18 12:43:18,493 - DEBUG - ====Verifying policy data for ctest-vn4-81482202 in API_Server ====== 2025-09-18 12:43:18,493 - DEBUG - Requesting: http://10.0.0.254:8082/domains 2025-09-18 12:43:18,497 - DEBUG - Requesting: http://10.0.0.254:8082/domain/152c17c4-b630-40d8-a714-8de71f26333d 2025-09-18 12:43:18,507 - DEBUG - Requesting: http://10.0.0.254:8082/project/76cbd00a-1d1d-4c0f-86c0-24b570be496d 2025-09-18 12:43:18,573 - DEBUG - Requesting: http://10.0.0.254:8082/virtual-network/0187491f-2ef0-4945-9aa2-320b45611045 2025-09-18 12:43:18,581 - DEBUG - ==>Verifying data for policy with id: 5bc6e7ce-bb09-4f7b-99c6-17e96874ad63, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-51846578', 'ctest-policy1-06983734'] 2025-09-18 12:43:18,581 - INFO - VN ctest-vn4-81482202 Policy verification: verify_vn_policy_in_api_server, status: True 2025-09-18 12:43:18,581 - DEBUG - Verifying the vn in opserver 2025-09-18 12:43:18,581 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-51846578:ctest-vn4-81482202 virtual network link through opserver 10.0.0.254 2025-09-18 12:43:18,582 - DEBUG - Requesting: http://10.0.0.254:8081/analytics/uves/virtual-networks 2025-09-18 12:43:18,879 - DEBUG - Requesting: http://10.0.0.254:8081/analytics/uves/virtual-networks 2025-09-18 12:43:18,936 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-51846578:ctest-vn4-81482202', 'href': 'http://10.0.0.254:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-51846578:ctest-vn4-81482202?flat'} 2025-09-18 12:43:18,936 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-51846578:ctest-vn4-81482202 is found in opserver 2025-09-18 12:43:18,945 - DEBUG - Do not have enough data to verify VN in agent 2025-09-18 12:43:18,952 - DEBUG - VRF ids for VN ctest-vn4-81482202: {} 2025-09-18 12:43:18,952 - DEBUG - ====Verifying data for ctest-policy1-06983734 in API_Server ====== 2025-09-18 12:43:18,952 - DEBUG - Requesting: http://10.0.0.254:8082/domains 2025-09-18 12:43:18,957 - DEBUG - Requesting: http://10.0.0.254:8082/domain/152c17c4-b630-40d8-a714-8de71f26333d 2025-09-18 12:43:18,966 - DEBUG - Requesting: http://10.0.0.254:8082/project/76cbd00a-1d1d-4c0f-86c0-24b570be496d 2025-09-18 12:43:19,036 - DEBUG - Requesting: http://10.0.0.254:8082/network-policy/5bc6e7ce-bb09-4f7b-99c6-17e96874ad63 2025-09-18 12:43:19,045 - INFO - Verified policy ctest-policy1-06983734 in API Server, Result: True 2025-09-18 12:43:19,045 - INFO - Done with setup and verification, moving onto test .. 2025-09-18 12:43:19,052 - INFO - Deleting VN ctest-vn4-81482202 2025-09-18 12:43:19,155 - DEBUG - Response for deleting network () 2025-09-18 12:43:19,155 - DEBUG - Requesting: http://10.0.0.254:8082/routing-instance/e95f4820-216b-4411-815f-2721253dede9 2025-09-18 12:43:19,159 - DEBUG - Response Code: 404 2025-09-18 12:43:19,159 - DEBUG - Requesting: http://10.0.0.254:8082/domains 2025-09-18 12:43:19,163 - DEBUG - Requesting: http://10.0.0.254:8082/domain/152c17c4-b630-40d8-a714-8de71f26333d 2025-09-18 12:43:19,214 - DEBUG - Requesting: http://10.0.0.254:8082/project/76cbd00a-1d1d-4c0f-86c0-24b570be496d 2025-09-18 12:43:19,283 - INFO - Validated that VN ctest-vn4-81482202 is not found in API Server 2025-09-18 12:43:19,292 - DEBUG - VN ctest-vn4-81482202 is not present in Agent 10.0.0.254 2025-09-18 12:43:19,292 - INFO - Validated that VN ctest-vn4-81482202 is not in any agent 2025-09-18 12:43:19,304 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-81482202 info 2025-09-18 12:43:19,324 - INFO - Deleted policy ctest-policy1-06983734 2025-09-18 12:43:19,481 - DEBUG - policy ctest-policy1-06983734 is not found in API Server 2025-09-18 12:43:19,734 - DEBUG - No XMPP flaps were noticed during the test 2025-09-18 12:43:19,734 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:03] 2025-09-18 12:43:19,734 - INFO - -------------------------------------------------------------------------------- 2025-09-18 12:43:20,022 - DEBUG - No XMPP flaps were noticed during the test 2025-09-18 12:43:20,022 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:05] 2025-09-18 12:43:20,022 - INFO - -------------------------------------------------------------------------------- 2025-09-18 12:43:20,653 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-51846578, ID : 76cbd00a-1d1d-4c0f-86c0-24b570be496d