2025-11-06 02:07:42,805 - INFO - Domain Default found not creating 2025-11-06 02:07:42,979 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-12837922 not found, creating it 2025-11-06 02:07:43,446 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-12837922, ID : d6de7469-d386-4a50-ac85-adf8cffe0df6 2025-11-06 02:07:44,975 - INFO - ================================================================================ 2025-11-06 02:07:44,975 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-11-06 02:07:45,233 - DEBUG - Nothing to compare xmpp stats {'10.0.0.249': {'10.20.0.201': '0'}} with 2025-11-06 02:07:45,233 - INFO - Initial checks done. Running the testcase now 2025-11-06 02:07:45,233 - INFO - 2025-11-06 02:07:45,233 - INFO - ================================================================================ 2025-11-06 02:07:45,233 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-11-06 02:07:45,233 - 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-06 02:07:45,523 - DEBUG - Nothing to compare xmpp stats {'10.0.0.249': {'10.20.0.201': '0'}} with 2025-11-06 02:07:45,523 - INFO - Initial checks done. Running the testcase now 2025-11-06 02:07:45,523 - INFO - 2025-11-06 02:07:45,922 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-12837922:ctest-vn4-89743744, 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-12837922:ctest-vn4-89743744, 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-12837922:ctest-vn4-89743744, 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-12837922:ctest-vn4-89743744, 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-06 02:07:46,455 - DEBUG - Response for create_network : {'network': {'id': '4ba4eb79-c5c5-4083-8eb2-e8be8c9f5c20', 'name': 'ctest-vn4-89743744', 'tenant_id': 'd6de7469d3864a50ac85adf8cffe0df6', 'project_id': 'd6de7469d3864a50ac85adf8cffe0df6', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-12837922', 'ctest-vn4-89743744'], 'port_security_enabled': True, 'description': ''}} 2025-11-06 02:07:46,683 - DEBUG - Response for create_subnet : {'subnet': {'id': '907c10fc-338e-42fa-ab85-f45ff4d6a4fa', 'name': '', 'tenant_id': 'd6de7469d3864a50ac85adf8cffe0df6', 'network_id': '4ba4eb79-c5c5-4083-8eb2-e8be8c9f5c20', 'ip_version': 4, 'cidr': '94.161.176.0/26', 'allocation_pools': [{'start': '94.161.176.2', 'end': '94.161.176.62'}], 'gateway_ip': '94.161.176.1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '94.161.176.2', 'tags': [], 'project_id': 'd6de7469d3864a50ac85adf8cffe0df6'}} 2025-11-06 02:07:46,836 - DEBUG - Response for create_subnet : {'subnet': {'id': '4059f485-e06d-4056-a91f-e806f6d94f3c', 'name': '', 'tenant_id': 'd6de7469d3864a50ac85adf8cffe0df6', 'network_id': '4ba4eb79-c5c5-4083-8eb2-e8be8c9f5c20', 'ip_version': 6, 'cidr': '38c2:79ff:2ec0:8cda:8e30:d27d::/96', 'allocation_pools': [{'start': '38c2:79ff:2ec0:8cda:8e30:d27d:0:2', 'end': '38c2:79ff:2ec0:8cda:8e30:d27d:ffff:fffe'}], 'gateway_ip': '38c2:79ff:2ec0:8cda:8e30:d27d:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '38c2:79ff:2ec0:8cda:8e30:d27d:0:2', 'tags': [], 'project_id': 'd6de7469d3864a50ac85adf8cffe0df6'}} 2025-11-06 02:07:46,856 - INFO - Created VN ctest-vn4-89743744 2025-11-06 02:07:46,910 - DEBUG - VN ctest-vn4-89743744 UUID is 4ba4eb79-c5c5-4083-8eb2-e8be8c9f5c20 2025-11-06 02:07:47,132 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': '4ba4eb79-c5c5-4083-8eb2-e8be8c9f5c20', 'name': 'ctest-vn4-89743744', 'tenant_id': 'd6de7469d3864a50ac85adf8cffe0df6', 'project_id': 'd6de7469d3864a50ac85adf8cffe0df6', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['907c10fc-338e-42fa-ab85-f45ff4d6a4fa', '4059f485-e06d-4056-a91f-e806f6d94f3c'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-12837922', 'ctest-vn4-89743744'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-12837922', 'ctest-policy1-30709044']], 'subnet_ipam': [{'subnet_cidr': '94.161.176.0/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '38c2:79ff:2ec0:8cda:8e30:d27d::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2025-11-06 02:07:47,303 - DEBUG - Requesting: http://10.0.0.249:8082/domains 2025-11-06 02:07:47,597 - DEBUG - Requesting: http://10.0.0.249:8082/domains 2025-11-06 02:07:47,626 - DEBUG - Requesting: http://10.0.0.249:8082/domain/3988296a-87b2-4249-a107-eb83f2d2fe96 2025-11-06 02:07:47,639 - DEBUG - Requesting: http://10.0.0.249:8082/project/d6de7469-d386-4a50-ac85-adf8cffe0df6 2025-11-06 02:07:47,707 - DEBUG - Requesting: http://10.0.0.249:8082/virtual-network/4ba4eb79-c5c5-4083-8eb2-e8be8c9f5c20 2025-11-06 02:07:47,723 - DEBUG - Requesting: http://10.0.0.249:8082/virtual-network/4ba4eb79-c5c5-4083-8eb2-e8be8c9f5c20 2025-11-06 02:07:47,732 - DEBUG - Requesting: http://10.0.0.249:8082/routing-instance/7169a578-5b00-4b22-ac8e-ace7c614dad9 2025-11-06 02:07:47,740 - DEBUG - Requesting: http://10.0.0.249:8082/routing-instance/7169a578-5b00-4b22-ac8e-ace7c614dad9 2025-11-06 02:07:47,748 - DEBUG - Requesting: http://10.0.0.249:8082/route-target/a5028b66-b47b-45d2-9902-1a44dd2891e8 2025-11-06 02:07:47,754 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-11-06 02:07:47,754 - DEBUG - Requesting: http://10.0.0.249:8082/virtual-network/4ba4eb79-c5c5-4083-8eb2-e8be8c9f5c20 2025-11-06 02:07:47,763 - DEBUG - Requesting: http://10.0.0.249:8082/routing-instance/7169a578-5b00-4b22-ac8e-ace7c614dad9 2025-11-06 02:07:47,776 - INFO - Verified VN network id 11 for VN 4ba4eb79-c5c5-4083-8eb2-e8be8c9f5c20 2025-11-06 02:07:47,776 - INFO - Verifications in API Server for VN ctest-vn4-89743744 passed 2025-11-06 02:07:47,776 - DEBUG - Requesting: http://10.0.0.249:8082/virtual-network/4ba4eb79-c5c5-4083-8eb2-e8be8c9f5c20 2025-11-06 02:07:47,786 - DEBUG - Requesting: http://10.0.0.249:8082/routing-instance/7169a578-5b00-4b22-ac8e-ace7c614dad9 2025-11-06 02:07:47,792 - DEBUG - Requesting: http://10.0.0.249:8082/routing-instance/7169a578-5b00-4b22-ac8e-ace7c614dad9 2025-11-06 02:07:47,800 - DEBUG - Requesting: http://10.0.0.249:8082/route-target/a5028b66-b47b-45d2-9902-1a44dd2891e8 2025-11-06 02:07:47,811 - DEBUG - Control-node 10.0.0.249 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-12837922:ctest-vn4-89743744', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-12837922', 'owner-access': '7', 'group': 'reader', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '5450740357266751619', 'uuid-lslong': '10282536804340948000'}, 'enable': 'true', 'created': '2025-11-06T02:07:46', 'last-modified': '2025-11-06T02:07:47', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.704016'} 2025-11-06 02:07:47,818 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-11-06 02:07:47,818 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-89743744 passed 2025-11-06 02:07:47,818 - DEBUG - ====Verifying policy data for ctest-vn4-89743744 in API_Server ====== 2025-11-06 02:07:47,818 - DEBUG - Requesting: http://10.0.0.249:8082/domains 2025-11-06 02:07:47,824 - DEBUG - Requesting: http://10.0.0.249:8082/domain/3988296a-87b2-4249-a107-eb83f2d2fe96 2025-11-06 02:07:47,835 - DEBUG - Requesting: http://10.0.0.249:8082/project/d6de7469-d386-4a50-ac85-adf8cffe0df6 2025-11-06 02:07:47,904 - DEBUG - Requesting: http://10.0.0.249:8082/virtual-network/4ba4eb79-c5c5-4083-8eb2-e8be8c9f5c20 2025-11-06 02:07:47,913 - DEBUG - ==>Verifying data for policy with id: acc5c4ac-217e-481f-8069-6bf8eebee570, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-12837922', 'ctest-policy1-30709044'] 2025-11-06 02:07:47,914 - INFO - VN ctest-vn4-89743744 Policy verification: verify_vn_policy_in_api_server, status: True 2025-11-06 02:07:47,914 - DEBUG - Verifying the vn in opserver 2025-11-06 02:07:47,914 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-12837922:ctest-vn4-89743744 virtual network link through opserver 10.0.0.249 2025-11-06 02:07:47,914 - DEBUG - Requesting: http://10.0.0.249:8081/analytics/uves/virtual-networks 2025-11-06 02:07:48,206 - DEBUG - Requesting: http://10.0.0.249:8081/analytics/uves/virtual-networks 2025-11-06 02:07:48,272 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-12837922:ctest-vn4-89743744', 'href': 'http://10.0.0.249:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-12837922:ctest-vn4-89743744?flat'} 2025-11-06 02:07:48,272 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-12837922:ctest-vn4-89743744 is found in opserver 2025-11-06 02:07:48,282 - DEBUG - Do not have enough data to verify VN in agent 2025-11-06 02:07:48,286 - DEBUG - VRF ids for VN ctest-vn4-89743744: {} 2025-11-06 02:07:48,287 - DEBUG - ====Verifying data for ctest-policy1-30709044 in API_Server ====== 2025-11-06 02:07:48,287 - DEBUG - Requesting: http://10.0.0.249:8082/domains 2025-11-06 02:07:48,293 - DEBUG - Requesting: http://10.0.0.249:8082/domain/3988296a-87b2-4249-a107-eb83f2d2fe96 2025-11-06 02:07:48,303 - DEBUG - Requesting: http://10.0.0.249:8082/project/d6de7469-d386-4a50-ac85-adf8cffe0df6 2025-11-06 02:07:48,371 - DEBUG - Requesting: http://10.0.0.249:8082/network-policy/acc5c4ac-217e-481f-8069-6bf8eebee570 2025-11-06 02:07:48,384 - INFO - Verified policy ctest-policy1-30709044 in API Server, Result: True 2025-11-06 02:07:48,384 - INFO - Done with setup and verification, moving onto test .. 2025-11-06 02:07:48,392 - INFO - Deleting VN ctest-vn4-89743744 2025-11-06 02:07:48,511 - DEBUG - Response for deleting network () 2025-11-06 02:07:48,511 - DEBUG - Requesting: http://10.0.0.249:8082/routing-instance/7169a578-5b00-4b22-ac8e-ace7c614dad9 2025-11-06 02:07:48,516 - DEBUG - Response Code: 404 2025-11-06 02:07:48,517 - DEBUG - Requesting: http://10.0.0.249:8082/domains 2025-11-06 02:07:48,523 - DEBUG - Requesting: http://10.0.0.249:8082/domain/3988296a-87b2-4249-a107-eb83f2d2fe96 2025-11-06 02:07:48,575 - DEBUG - Requesting: http://10.0.0.249:8082/project/d6de7469-d386-4a50-ac85-adf8cffe0df6 2025-11-06 02:07:48,647 - INFO - Validated that VN ctest-vn4-89743744 is not found in API Server 2025-11-06 02:07:48,656 - DEBUG - VN ctest-vn4-89743744 is not present in Agent 10.0.0.249 2025-11-06 02:07:48,656 - INFO - Validated that VN ctest-vn4-89743744 is not in any agent 2025-11-06 02:07:48,669 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-89743744 info 2025-11-06 02:07:48,693 - INFO - Deleted policy ctest-policy1-30709044 2025-11-06 02:07:48,858 - DEBUG - policy ctest-policy1-30709044 is not found in API Server 2025-11-06 02:07:49,117 - DEBUG - No XMPP flaps were noticed during the test 2025-11-06 02:07:49,117 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04] 2025-11-06 02:07:49,117 - INFO - -------------------------------------------------------------------------------- 2025-11-06 02:07:49,408 - DEBUG - No XMPP flaps were noticed during the test 2025-11-06 02:07:49,408 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:05] 2025-11-06 02:07:49,409 - INFO - -------------------------------------------------------------------------------- 2025-11-06 02:07:50,105 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-12837922, ID : d6de7469-d386-4a50-ac85-adf8cffe0df6