2025-10-05 21:09:38,140 - INFO - Domain Default found not creating 2025-10-05 21:09:38,260 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-36566913 not found, creating it 2025-10-05 21:09:38,675 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-36566913, ID : b49a1f24-7855-4a32-b9bd-2139c900add8 2025-10-05 21:09:39,997 - INFO - ================================================================================ 2025-10-05 21:09:39,997 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-10-05 21:09:40,251 - DEBUG - Nothing to compare xmpp stats {'10.0.0.38': {'10.20.0.17': '0'}} with 2025-10-05 21:09:40,251 - INFO - Initial checks done. Running the testcase now 2025-10-05 21:09:40,251 - INFO - 2025-10-05 21:09:40,251 - INFO - ================================================================================ 2025-10-05 21:09:40,251 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-10-05 21:09:40,251 - 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-10-05 21:09:40,534 - DEBUG - Nothing to compare xmpp stats {'10.0.0.38': {'10.20.0.17': '0'}} with 2025-10-05 21:09:40,534 - INFO - Initial checks done. Running the testcase now 2025-10-05 21:09:40,534 - INFO - 2025-10-05 21:09:40,866 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-36566913:ctest-vn4-36028025, 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-36566913:ctest-vn4-36028025, 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-36566913:ctest-vn4-36028025, 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-36566913:ctest-vn4-36028025, 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-10-05 21:09:41,347 - DEBUG - Response for create_network : {'network': {'id': 'c504174b-182f-432d-b233-d3267da5bc66', 'name': 'ctest-vn4-36028025', 'tenant_id': 'b49a1f2478554a32b9bd2139c900add8', 'project_id': 'b49a1f2478554a32b9bd2139c900add8', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-36566913', 'ctest-vn4-36028025'], 'port_security_enabled': True, 'description': ''}} 2025-10-05 21:09:41,513 - DEBUG - Response for create_subnet : {'subnet': {'id': 'c16ec7ba-c0f3-4a0e-a501-afffba1f8951', 'name': '', 'tenant_id': 'b49a1f2478554a32b9bd2139c900add8', 'network_id': 'c504174b-182f-432d-b233-d3267da5bc66', 'ip_version': 4, 'cidr': '135.86.166.0/26', 'allocation_pools': [{'start': '135.86.166.2', 'end': '135.86.166.62'}], 'gateway_ip': '135.86.166.1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '135.86.166.2', 'tags': [], 'project_id': 'b49a1f2478554a32b9bd2139c900add8'}} 2025-10-05 21:09:41,645 - DEBUG - Response for create_subnet : {'subnet': {'id': '263443b6-23c4-4cf2-bb05-e73607429168', 'name': '', 'tenant_id': 'b49a1f2478554a32b9bd2139c900add8', 'network_id': 'c504174b-182f-432d-b233-d3267da5bc66', 'ip_version': 6, 'cidr': '284b:d0ae:f47e:a1df:4a18:914a::/96', 'allocation_pools': [{'start': '284b:d0ae:f47e:a1df:4a18:914a:0:2', 'end': '284b:d0ae:f47e:a1df:4a18:914a:ffff:fffe'}], 'gateway_ip': '284b:d0ae:f47e:a1df:4a18:914a:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '284b:d0ae:f47e:a1df:4a18:914a:0:2', 'tags': [], 'project_id': 'b49a1f2478554a32b9bd2139c900add8'}} 2025-10-05 21:09:41,662 - INFO - Created VN ctest-vn4-36028025 2025-10-05 21:09:41,714 - DEBUG - VN ctest-vn4-36028025 UUID is c504174b-182f-432d-b233-d3267da5bc66 2025-10-05 21:09:41,894 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': 'c504174b-182f-432d-b233-d3267da5bc66', 'name': 'ctest-vn4-36028025', 'tenant_id': 'b49a1f2478554a32b9bd2139c900add8', 'project_id': 'b49a1f2478554a32b9bd2139c900add8', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['c16ec7ba-c0f3-4a0e-a501-afffba1f8951', '263443b6-23c4-4cf2-bb05-e73607429168'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-36566913', 'ctest-vn4-36028025'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-36566913', 'ctest-policy1-20964868']], 'subnet_ipam': [{'subnet_cidr': '135.86.166.0/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '284b:d0ae:f47e:a1df:4a18:914a::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2025-10-05 21:09:42,054 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2025-10-05 21:09:42,341 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2025-10-05 21:09:42,369 - DEBUG - Requesting: http://10.0.0.38:8082/domain/c9125a86-92c8-4326-9e90-e120c6635b3f 2025-10-05 21:09:42,383 - DEBUG - Requesting: http://10.0.0.38:8082/project/b49a1f24-7855-4a32-b9bd-2139c900add8 2025-10-05 21:09:42,459 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/c504174b-182f-432d-b233-d3267da5bc66 2025-10-05 21:09:42,469 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/c504174b-182f-432d-b233-d3267da5bc66 2025-10-05 21:09:42,477 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/f51b65c8-83f1-4a5f-83a9-96facc976349 2025-10-05 21:09:42,482 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/f51b65c8-83f1-4a5f-83a9-96facc976349 2025-10-05 21:09:42,487 - DEBUG - Requesting: http://10.0.0.38:8082/route-target/93d164ae-b516-45eb-bbc8-9aca608a5861 2025-10-05 21:09:42,492 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-10-05 21:09:42,492 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/c504174b-182f-432d-b233-d3267da5bc66 2025-10-05 21:09:42,499 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/f51b65c8-83f1-4a5f-83a9-96facc976349 2025-10-05 21:09:42,510 - INFO - Verified VN network id 12 for VN c504174b-182f-432d-b233-d3267da5bc66 2025-10-05 21:09:42,510 - INFO - Verifications in API Server for VN ctest-vn4-36028025 passed 2025-10-05 21:09:42,510 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/c504174b-182f-432d-b233-d3267da5bc66 2025-10-05 21:09:42,518 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/f51b65c8-83f1-4a5f-83a9-96facc976349 2025-10-05 21:09:42,522 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/f51b65c8-83f1-4a5f-83a9-96facc976349 2025-10-05 21:09:42,527 - DEBUG - Requesting: http://10.0.0.38:8082/route-target/93d164ae-b516-45eb-bbc8-9aca608a5861 2025-10-05 21:09:42,538 - DEBUG - Control-node 10.0.0.38 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-36566913:ctest-vn4-36028025', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-36566913', 'owner-access': '7', 'group': 'reader', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '14196497536674382637', 'uuid-lslong': '12840839124833647718'}, 'enable': 'true', 'created': '2025-10-05T21:09:41', 'last-modified': '2025-10-05T21:09:41', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.666931'} 2025-10-05 21:09:42,543 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-10-05 21:09:42,543 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-36028025 passed 2025-10-05 21:09:42,543 - DEBUG - ====Verifying policy data for ctest-vn4-36028025 in API_Server ====== 2025-10-05 21:09:42,543 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2025-10-05 21:09:42,547 - DEBUG - Requesting: http://10.0.0.38:8082/domain/c9125a86-92c8-4326-9e90-e120c6635b3f 2025-10-05 21:09:42,558 - DEBUG - Requesting: http://10.0.0.38:8082/project/b49a1f24-7855-4a32-b9bd-2139c900add8 2025-10-05 21:09:42,628 - DEBUG - Requesting: http://10.0.0.38:8082/virtual-network/c504174b-182f-432d-b233-d3267da5bc66 2025-10-05 21:09:42,636 - DEBUG - ==>Verifying data for policy with id: 0a1fabe4-c8b5-4cae-a6ff-9b11eb490c62, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-36566913', 'ctest-policy1-20964868'] 2025-10-05 21:09:42,636 - INFO - VN ctest-vn4-36028025 Policy verification: verify_vn_policy_in_api_server, status: True 2025-10-05 21:09:42,636 - DEBUG - Verifying the vn in opserver 2025-10-05 21:09:42,636 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-36566913:ctest-vn4-36028025 virtual network link through opserver 10.0.0.38 2025-10-05 21:09:42,637 - DEBUG - Requesting: http://10.0.0.38:8081/analytics/uves/virtual-networks 2025-10-05 21:09:42,926 - DEBUG - Requesting: http://10.0.0.38:8081/analytics/uves/virtual-networks 2025-10-05 21:09:42,973 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-36566913:ctest-vn4-36028025', 'href': 'http://10.0.0.38:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-36566913:ctest-vn4-36028025?flat'} 2025-10-05 21:09:42,973 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-36566913:ctest-vn4-36028025 is found in opserver 2025-10-05 21:09:42,981 - DEBUG - Do not have enough data to verify VN in agent 2025-10-05 21:09:42,985 - DEBUG - VRF ids for VN ctest-vn4-36028025: {} 2025-10-05 21:09:42,985 - DEBUG - ====Verifying data for ctest-policy1-20964868 in API_Server ====== 2025-10-05 21:09:42,985 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2025-10-05 21:09:42,990 - DEBUG - Requesting: http://10.0.0.38:8082/domain/c9125a86-92c8-4326-9e90-e120c6635b3f 2025-10-05 21:09:42,999 - DEBUG - Requesting: http://10.0.0.38:8082/project/b49a1f24-7855-4a32-b9bd-2139c900add8 2025-10-05 21:09:43,066 - DEBUG - Requesting: http://10.0.0.38:8082/network-policy/0a1fabe4-c8b5-4cae-a6ff-9b11eb490c62 2025-10-05 21:09:43,074 - INFO - Verified policy ctest-policy1-20964868 in API Server, Result: True 2025-10-05 21:09:43,075 - INFO - Done with setup and verification, moving onto test .. 2025-10-05 21:09:43,081 - INFO - Deleting VN ctest-vn4-36028025 2025-10-05 21:09:43,185 - DEBUG - Response for deleting network () 2025-10-05 21:09:43,185 - DEBUG - Requesting: http://10.0.0.38:8082/routing-instance/f51b65c8-83f1-4a5f-83a9-96facc976349 2025-10-05 21:09:43,189 - DEBUG - Response Code: 404 2025-10-05 21:09:43,189 - DEBUG - Requesting: http://10.0.0.38:8082/domains 2025-10-05 21:09:43,194 - DEBUG - Requesting: http://10.0.0.38:8082/domain/c9125a86-92c8-4326-9e90-e120c6635b3f 2025-10-05 21:09:43,242 - DEBUG - Requesting: http://10.0.0.38:8082/project/b49a1f24-7855-4a32-b9bd-2139c900add8 2025-10-05 21:09:43,310 - INFO - Validated that VN ctest-vn4-36028025 is not found in API Server 2025-10-05 21:09:43,318 - DEBUG - VN ctest-vn4-36028025 is not present in Agent 10.0.0.38 2025-10-05 21:09:43,318 - INFO - Validated that VN ctest-vn4-36028025 is not in any agent 2025-10-05 21:09:43,329 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-36028025 info 2025-10-05 21:09:43,354 - INFO - Deleted policy ctest-policy1-20964868 2025-10-05 21:09:43,522 - DEBUG - policy ctest-policy1-20964868 is not found in API Server 2025-10-05 21:09:43,774 - DEBUG - No XMPP flaps were noticed during the test
2025-10-05 21:09:43,774 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:03]
2025-10-05 21:09:43,774 - INFO - -------------------------------------------------------------------------------- 2025-10-05 21:09:44,066 - DEBUG - No XMPP flaps were noticed during the test
2025-10-05 21:09:44,066 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:05]
2025-10-05 21:09:44,066 - INFO - -------------------------------------------------------------------------------- 2025-10-05 21:09:44,707 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-36566913, ID : b49a1f24-7855-4a32-b9bd-2139c900add8