2025-08-07 19:58:45,117 - INFO - Domain Default found not creating 2025-08-07 19:58:45,252 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-82725623 not found, creating it 2025-08-07 19:58:45,848 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-82725623, ID : 3938f808-f418-4e42-8345-6ea99858cc90 2025-08-07 19:58:47,378 - INFO - ================================================================================ 2025-08-07 19:58:47,379 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-08-07 19:58:47,633 - DEBUG - Nothing to compare xmpp stats {'10.0.0.38': {'10.20.0.254': '0'}} with 2025-08-07 19:58:47,633 - INFO - Initial checks done. Running the testcase now 2025-08-07 19:58:47,634 - INFO - 2025-08-07 19:58:47,634 - INFO - ================================================================================ 2025-08-07 19:58:47,634 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-08-07 19:58:47,634 - 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-08-07 19:58:47,925 - DEBUG - Nothing to compare xmpp stats {'10.0.0.38': {'10.20.0.254': '0'}} with 2025-08-07 19:58:47,926 - INFO - Initial checks done. Running the testcase now 2025-08-07 19:58:47,926 - INFO - 2025-08-07 19:58:48,312 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-82725623:ctest-vn4-41330784, 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-82725623:ctest-vn4-41330784, 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-82725623:ctest-vn4-41330784, 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-82725623:ctest-vn4-41330784, 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-08-07 19:58:48,826 - DEBUG - Response for create_network : {'network': {'id': 'e5a437fa-1360-4c7c-84fb-13ac144f1f73', 'name': 'ctest-vn4-41330784', 'tenant_id': '3938f808f4184e4283456ea99858cc90', 'project_id': '3938f808f4184e4283456ea99858cc90', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-82725623', 'ctest-vn4-41330784'], 'port_security_enabled': True, 'description': ''}} 2025-08-07 19:58:48,987 - DEBUG - Response for create_subnet : {'subnet': {'id': 'b98871d1-4a50-429f-9115-e1d2f7a256b6', 'name': '', 'tenant_id': '3938f808f4184e4283456ea99858cc90', 'network_id': 'e5a437fa-1360-4c7c-84fb-13ac144f1f73', 'ip_version': 4, 'cidr': '41.148.139.0/26', 'allocation_pools': [{'start': '41.148.139.2', 'end': '41.148.139.62'}], 'gateway_ip': '41.148.139.1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '41.148.139.2', 'tags': [], 'project_id': '3938f808f4184e4283456ea99858cc90'}} 2025-08-07 19:58:49,206 - DEBUG - Response for create_subnet : {'subnet': {'id': '1ed52c1a-581d-4021-a443-b2d6d08714b6', 'name': '', 'tenant_id': '3938f808f4184e4283456ea99858cc90', 'network_id': 'e5a437fa-1360-4c7c-84fb-13ac144f1f73', 'ip_version': 6, 'cidr': '25b6:8bc8:36df:3e5a:e459:36bd::/96', 'allocation_pools': [{'start': '25b6:8bc8:36df:3e5a:e459:36bd:0:2', 'end': '25b6:8bc8:36df:3e5a:e459:36bd:ffff:fffe'}], 'gateway_ip': '25b6:8bc8:36df:3e5a:e459:36bd:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '25b6:8bc8:36df:3e5a:e459:36bd:0:2', 'tags': [], 'project_id': '3938f808f4184e4283456ea99858cc90'}} 2025-08-07 19:58:49,227 - INFO - Created VN ctest-vn4-41330784 2025-08-07 19:58:49,280 - DEBUG - VN ctest-vn4-41330784 UUID is e5a437fa-1360-4c7c-84fb-13ac144f1f73 2025-08-07 19:58:49,496 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': 'e5a437fa-1360-4c7c-84fb-13ac144f1f73', 'name': 'ctest-vn4-41330784', 'tenant_id': '3938f808f4184e4283456ea99858cc90', 'project_id': '3938f808f4184e4283456ea99858cc90', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['b98871d1-4a50-429f-9115-e1d2f7a256b6', '1ed52c1a-581d-4021-a443-b2d6d08714b6'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-82725623', 'ctest-vn4-41330784'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-82725623', 'ctest-policy1-11317011']], 'subnet_ipam': [{'subnet_cidr': '41.148.139.0/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '25b6:8bc8:36df:3e5a:e459:36bd::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2025-08-07 19:58:49,664 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2025-08-07 19:58:49,998 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2025-08-07 19:58:50,027 - DEBUG - Requesting: http://10.0.0.38:8082/domain/30f13e49-abae-4263-a3be-edece9f49f35 2025-08-07 19:58:50,042 - DEBUG - Requesting: http://10.0.0.38:8082/project/3938f808-f418-4e42-8345-6ea99858cc90 2025-08-07 19:58:50,121 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/e5a437fa-1360-4c7c-84fb-13ac144f1f73 2025-08-07 19:58:50,136 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/e5a437fa-1360-4c7c-84fb-13ac144f1f73 2025-08-07 19:58:50,148 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/f7e56700-d223-4e71-9df0-add9e49b870f 2025-08-07 19:58:50,156 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/f7e56700-d223-4e71-9df0-add9e49b870f 2025-08-07 19:58:50,163 - DEBUG - Requesting: http://10.0.0.38:8082/route-target/3b3146ca-239f-418d-96ce-d03ef08e6b4e 2025-08-07 19:58:50,170 - DEBUG - Route Targets: ['target:64512:8000005'] 2025-08-07 19:58:50,170 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/e5a437fa-1360-4c7c-84fb-13ac144f1f73 2025-08-07 19:58:50,180 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/f7e56700-d223-4e71-9df0-add9e49b870f 2025-08-07 19:58:50,194 - INFO - Verified VN network id 12 for VN e5a437fa-1360-4c7c-84fb-13ac144f1f73 2025-08-07 19:58:50,194 - INFO - Verifications in API Server for VN ctest-vn4-41330784 passed 2025-08-07 19:58:50,194 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/e5a437fa-1360-4c7c-84fb-13ac144f1f73 2025-08-07 19:58:50,205 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/f7e56700-d223-4e71-9df0-add9e49b870f 2025-08-07 19:58:50,212 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/f7e56700-d223-4e71-9df0-add9e49b870f 2025-08-07 19:58:50,218 - DEBUG - Requesting: http://10.0.0.38:8082/route-target/3b3146ca-239f-418d-96ce-d03ef08e6b4e 2025-08-07 19:58:50,231 - DEBUG - Control-node 10.0.0.38 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-82725623:ctest-vn4-41330784', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-82725623', 'owner-access': '7', 'group': 'member', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '16547412478072474748', 'uuid-lslong': '9582274261956894579'}, 'enable': 'true', 'created': '2025-08-07T19:58:48', 'last-modified': '2025-08-07T19:58:49', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.770507'} 2025-08-07 19:58:50,238 - DEBUG - Route Targets: ['target:64512:8000005'] 2025-08-07 19:58:50,239 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-41330784 passed 2025-08-07 19:58:50,239 - DEBUG - ====Verifying policy data for ctest-vn4-41330784 in API_Server ====== 2025-08-07 19:58:50,239 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2025-08-07 19:58:50,244 - DEBUG - Requesting: http://10.0.0.38:8082/domain/30f13e49-abae-4263-a3be-edece9f49f35 2025-08-07 19:58:50,256 - DEBUG - Requesting: http://10.0.0.38:8082/project/3938f808-f418-4e42-8345-6ea99858cc90 2025-08-07 19:58:50,330 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/e5a437fa-1360-4c7c-84fb-13ac144f1f73 2025-08-07 19:58:50,342 - DEBUG - ==>Verifying data for policy with id: b614901e-4b65-4aa2-8032-1a7ef471bc21, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-82725623', 'ctest-policy1-11317011'] 2025-08-07 19:58:50,342 - INFO - VN ctest-vn4-41330784 Policy verification: verify_vn_policy_in_api_server, status: True 2025-08-07 19:58:50,342 - DEBUG - Verifying the vn in opserver 2025-08-07 19:58:50,342 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-82725623:ctest-vn4-41330784 virtual network link through opserver 10.0.0.38 2025-08-07 19:58:50,342 - DEBUG - Requesting: http://10.0.0.38:8081/analytics/uves/virtual-networks 2025-08-07 19:58:50,674 - DEBUG - Requesting: http://10.0.0.38:8081/analytics/uves/virtual-networks 2025-08-07 19:58:50,733 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-82725623:ctest-vn4-41330784', 'href': 'http://10.0.0.38:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-82725623:ctest-vn4-41330784?flat'} 2025-08-07 19:58:50,733 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-82725623:ctest-vn4-41330784 is found in opserver 2025-08-07 19:58:50,745 - DEBUG - Do not have enough data to verify VN in agent 2025-08-07 19:58:50,751 - DEBUG - VRF ids for VN ctest-vn4-41330784: {} 2025-08-07 19:58:50,751 - DEBUG - ====Verifying data for ctest-policy1-11317011 in API_Server ====== 2025-08-07 19:58:50,751 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2025-08-07 19:58:50,757 - DEBUG - Requesting: http://10.0.0.38:8082/domain/30f13e49-abae-4263-a3be-edece9f49f35 2025-08-07 19:58:50,772 - DEBUG - Requesting: http://10.0.0.38:8082/project/3938f808-f418-4e42-8345-6ea99858cc90 2025-08-07 19:58:50,842 - DEBUG - Requesting: http://10.0.0.38:8082/network-policy/b614901e-4b65-4aa2-8032-1a7ef471bc21 2025-08-07 19:58:50,856 - INFO - Verified policy ctest-policy1-11317011 in API Server, Result: True 2025-08-07 19:58:50,856 - INFO - Done with setup and verification, moving onto test .. 2025-08-07 19:58:50,866 - INFO - Deleting VN ctest-vn4-41330784 2025-08-07 19:58:50,995 - DEBUG - Response for deleting network () 2025-08-07 19:58:50,996 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/f7e56700-d223-4e71-9df0-add9e49b870f 2025-08-07 19:58:51,001 - DEBUG - Response Code: 404 2025-08-07 19:58:51,001 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2025-08-07 19:58:51,006 - DEBUG - Requesting: http://10.0.0.38:8082/domain/30f13e49-abae-4263-a3be-edece9f49f35 2025-08-07 19:58:51,063 - DEBUG - Requesting: http://10.0.0.38:8082/project/3938f808-f418-4e42-8345-6ea99858cc90 2025-08-07 19:58:51,138 - INFO - Validated that VN ctest-vn4-41330784 is not found in API Server 2025-08-07 19:58:51,149 - DEBUG - VN ctest-vn4-41330784 is not present in Agent 10.0.0.38 2025-08-07 19:58:51,150 - INFO - Validated that VN ctest-vn4-41330784 is not in any agent 2025-08-07 19:58:51,166 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-41330784 info 2025-08-07 19:58:51,193 - INFO - Deleted policy ctest-policy1-11317011 2025-08-07 19:58:51,359 - DEBUG - policy ctest-policy1-11317011 is not found in API Server 2025-08-07 19:58:51,614 - DEBUG - No XMPP flaps were noticed during the test
2025-08-07 19:58:51,614 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04]
2025-08-07 19:58:51,614 - INFO - -------------------------------------------------------------------------------- 2025-08-07 19:58:51,902 - DEBUG - No XMPP flaps were noticed during the test
2025-08-07 19:58:51,902 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04]
2025-08-07 19:58:51,902 - INFO - -------------------------------------------------------------------------------- 2025-08-07 19:58:52,613 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-82725623, ID : 3938f808-f418-4e42-8345-6ea99858cc90