2025-10-16 09:33:45,443 - INFO - Domain Default found not creating 2025-10-16 09:33:45,577 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-54295821 not found, creating it 2025-10-16 09:33:46,017 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-54295821, ID : b26df32e-374d-4303-a72d-c5c0d6fc0139 2025-10-16 09:33:47,399 - INFO - ================================================================================ 2025-10-16 09:33:47,399 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-10-16 09:33:47,653 - DEBUG - Nothing to compare xmpp stats {'10.0.0.242': {'10.20.0.18': '0'}} with 2025-10-16 09:33:47,653 - INFO - Initial checks done. Running the testcase now 2025-10-16 09:33:47,653 - INFO - 2025-10-16 09:33:47,653 - INFO - ================================================================================ 2025-10-16 09:33:47,653 - INFO - STARTING TEST : test_remove_policy_with_ref 2025-10-16 09:33:47,653 - 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-16 09:33:47,946 - DEBUG - Nothing to compare xmpp stats {'10.0.0.242': {'10.20.0.18': '0'}} with 2025-10-16 09:33:47,946 - INFO - Initial checks done. Running the testcase now 2025-10-16 09:33:47,946 - INFO - 2025-10-16 09:33:48,309 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-54295821:ctest-vn4-68543047, 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-54295821:ctest-vn4-68543047, 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-54295821:ctest-vn4-68543047, 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-54295821:ctest-vn4-68543047, 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-16 09:33:48,827 - DEBUG - Response for create_network : {'network': {'id': '758d805d-fe3b-47bb-84dc-0aef5ab4e51c', 'name': 'ctest-vn4-68543047', 'tenant_id': 'b26df32e374d4303a72dc5c0d6fc0139', 'project_id': 'b26df32e374d4303a72dc5c0d6fc0139', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-54295821', 'ctest-vn4-68543047'], 'port_security_enabled': True, 'description': ''}} 2025-10-16 09:33:48,991 - DEBUG - Response for create_subnet : {'subnet': {'id': 'ed2b0ce2-0793-4751-bb22-c8d4d8edb957', 'name': '', 'tenant_id': 'b26df32e374d4303a72dc5c0d6fc0139', 'network_id': '758d805d-fe3b-47bb-84dc-0aef5ab4e51c', 'ip_version': 4, 'cidr': '27.7.131.192/26', 'allocation_pools': [{'start': '27.7.131.194', 'end': '27.7.131.254'}], 'gateway_ip': '27.7.131.193', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '27.7.131.194', 'tags': [], 'project_id': 'b26df32e374d4303a72dc5c0d6fc0139'}} 2025-10-16 09:33:49,180 - DEBUG - Response for create_subnet : {'subnet': {'id': '9a282577-ad07-497f-a631-f95573497f26', 'name': '', 'tenant_id': 'b26df32e374d4303a72dc5c0d6fc0139', 'network_id': '758d805d-fe3b-47bb-84dc-0aef5ab4e51c', 'ip_version': 6, 'cidr': '2c22:f9aa:ce23:20d9:b07b:71a::/96', 'allocation_pools': [{'start': '2c22:f9aa:ce23:20d9:b07b:71a:0:2', 'end': '2c22:f9aa:ce23:20d9:b07b:71a:ffff:fffe'}], 'gateway_ip': '2c22:f9aa:ce23:20d9:b07b:71a:0:1', 'enable_dhcp': True, 'ipv6_ra_mode': None, 'ipv6_address_mode': None, 'dns_nameservers': [], 'host_routes': [], 'dns_server_address': '2c22:f9aa:ce23:20d9:b07b:71a:0:2', 'tags': [], 'project_id': 'b26df32e374d4303a72dc5c0d6fc0139'}} 2025-10-16 09:33:49,199 - INFO - Created VN ctest-vn4-68543047 2025-10-16 09:33:49,248 - DEBUG - VN ctest-vn4-68543047 UUID is 758d805d-fe3b-47bb-84dc-0aef5ab4e51c 2025-10-16 09:33:49,427 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': '758d805d-fe3b-47bb-84dc-0aef5ab4e51c', 'name': 'ctest-vn4-68543047', 'tenant_id': 'b26df32e374d4303a72dc5c0d6fc0139', 'project_id': 'b26df32e374d4303a72dc5c0d6fc0139', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': ['ed2b0ce2-0793-4751-bb22-c8d4d8edb957', '9a282577-ad07-497f-a631-f95573497f26'], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-54295821', 'ctest-vn4-68543047'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-54295821', 'ctest-policy1-49504356']], 'subnet_ipam': [{'subnet_cidr': '27.7.131.192/26', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}, {'subnet_cidr': '2c22:f9aa:ce23:20d9:b07b:71a::/96', 'ipam_fq_name': ['default-domain', 'default-project', 'default-network-ipam']}], 'port_security_enabled': True, 'description': ''}} 2025-10-16 09:33:49,580 - DEBUG - Requesting: http://10.0.0.242:8082/domains 2025-10-16 09:33:49,870 - DEBUG - Requesting: http://10.0.0.242:8082/domains 2025-10-16 09:33:49,897 - DEBUG - Requesting: http://10.0.0.242:8082/domain/b5f604ca-949a-4f9d-b947-4f065da907b0 2025-10-16 09:33:49,908 - DEBUG - Requesting: http://10.0.0.242:8082/project/b26df32e-374d-4303-a72d-c5c0d6fc0139 2025-10-16 09:33:49,980 - DEBUG - Requesting: http://10.0.0.242:8082/virtual-network/758d805d-fe3b-47bb-84dc-0aef5ab4e51c 2025-10-16 09:33:49,990 - DEBUG - Requesting: http://10.0.0.242:8082/virtual-network/758d805d-fe3b-47bb-84dc-0aef5ab4e51c 2025-10-16 09:33:49,999 - DEBUG - Requesting: http://10.0.0.242:8082/routing-instance/7c0613a4-7ed4-4808-a4af-3a3a068cf618 2025-10-16 09:33:50,006 - DEBUG - Requesting: http://10.0.0.242:8082/routing-instance/7c0613a4-7ed4-4808-a4af-3a3a068cf618 2025-10-16 09:33:50,014 - DEBUG - Requesting: http://10.0.0.242:8082/route-target/58fa8a89-8964-4239-a706-d781ef9dba7a 2025-10-16 09:33:50,020 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-10-16 09:33:50,020 - DEBUG - Requesting: http://10.0.0.242:8082/virtual-network/758d805d-fe3b-47bb-84dc-0aef5ab4e51c 2025-10-16 09:33:50,029 - DEBUG - Requesting: http://10.0.0.242:8082/routing-instance/7c0613a4-7ed4-4808-a4af-3a3a068cf618 2025-10-16 09:33:50,042 - INFO - Verified VN network id 12 for VN 758d805d-fe3b-47bb-84dc-0aef5ab4e51c 2025-10-16 09:33:50,043 - INFO - Verifications in API Server for VN ctest-vn4-68543047 passed 2025-10-16 09:33:50,043 - DEBUG - Requesting: http://10.0.0.242:8082/virtual-network/758d805d-fe3b-47bb-84dc-0aef5ab4e51c 2025-10-16 09:33:50,053 - DEBUG - Requesting: http://10.0.0.242:8082/routing-instance/7c0613a4-7ed4-4808-a4af-3a3a068cf618 2025-10-16 09:33:50,059 - DEBUG - Requesting: http://10.0.0.242:8082/routing-instance/7c0613a4-7ed4-4808-a4af-3a3a068cf618 2025-10-16 09:33:50,066 - DEBUG - Requesting: http://10.0.0.242:8082/route-target/58fa8a89-8964-4239-a706-d781ef9dba7a 2025-10-16 09:33:50,079 - DEBUG - Control-node 10.0.0.242 : VN object is : {'node_name': 'virtual-network:default-domain:ctest-TestBasicPolicyNegativeIpv4v6-54295821:ctest-vn4-68543047', 'interests': '-', 'advertised': '-', 'dbentryflags': None, 'obj_info': {'sequence_number': '0', 'origin': 'Cassandra', 'data': {'id-perms': {'permissions': {'owner': 'ctest-TestBasicPolicyNegativeIpv4v6-54295821', 'owner-access': '7', 'group': 'admin', 'group-access': '7', 'other-access': '7'}, 'uuid': {'uuid-mslong': '8470567615339382715', 'uuid-lslong': '9573538931018097948'}, 'enable': 'true', 'created': '2025-10-16T09:33:48', 'last-modified': '2025-10-16T09:33:49', 'description': None, 'user-visible': 'true', 'creator': None}}}, 'neighbors': None, 'last_modified': '00:00:00.673134'} 2025-10-16 09:33:50,084 - DEBUG - Route Targets: ['target:64512:8000004'] 2025-10-16 09:33:50,085 - INFO - On all control nodes, Config, RI and RT verification for VN ctest-vn4-68543047 passed 2025-10-16 09:33:50,085 - DEBUG - ====Verifying policy data for ctest-vn4-68543047 in API_Server ====== 2025-10-16 09:33:50,085 - DEBUG - Requesting: http://10.0.0.242:8082/domains 2025-10-16 09:33:50,090 - DEBUG - Requesting: http://10.0.0.242:8082/domain/b5f604ca-949a-4f9d-b947-4f065da907b0 2025-10-16 09:33:50,101 - DEBUG - Requesting: http://10.0.0.242:8082/project/b26df32e-374d-4303-a72d-c5c0d6fc0139 2025-10-16 09:33:50,168 - DEBUG - Requesting: http://10.0.0.242:8082/virtual-network/758d805d-fe3b-47bb-84dc-0aef5ab4e51c 2025-10-16 09:33:50,176 - DEBUG - ==>Verifying data for policy with id: 48f6cfc3-6757-46e8-8b95-112dba9b24d0, fqn: ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-54295821', 'ctest-policy1-49504356'] 2025-10-16 09:33:50,176 - INFO - VN ctest-vn4-68543047 Policy verification: verify_vn_policy_in_api_server, status: True 2025-10-16 09:33:50,176 - DEBUG - Verifying the vn in opserver 2025-10-16 09:33:50,176 - DEBUG - Verifying the default-domain:ctest-TestBasicPolicyNegativeIpv4v6-54295821:ctest-vn4-68543047 virtual network link through opserver 10.0.0.242 2025-10-16 09:33:50,176 - DEBUG - Requesting: http://10.0.0.242:8081/analytics/uves/virtual-networks 2025-10-16 09:33:50,463 - DEBUG - Requesting: http://10.0.0.242:8081/analytics/uves/virtual-networks 2025-10-16 09:33:50,521 - DEBUG - vn link and name as {'name': 'default-domain:ctest-TestBasicPolicyNegativeIpv4v6-54295821:ctest-vn4-68543047', 'href': 'http://10.0.0.242:8081/analytics/uves/virtual-network/default-domain:ctest-TestBasicPolicyNegativeIpv4v6-54295821:ctest-vn4-68543047?flat'} 2025-10-16 09:33:50,521 - INFO - Validated that VN default-domain:ctest-TestBasicPolicyNegativeIpv4v6-54295821:ctest-vn4-68543047 is found in opserver 2025-10-16 09:33:50,529 - DEBUG - Do not have enough data to verify VN in agent 2025-10-16 09:33:50,532 - DEBUG - VRF ids for VN ctest-vn4-68543047: {} 2025-10-16 09:33:50,533 - DEBUG - ====Verifying data for ctest-policy1-49504356 in API_Server ====== 2025-10-16 09:33:50,533 - DEBUG - Requesting: http://10.0.0.242:8082/domains 2025-10-16 09:33:50,538 - DEBUG - Requesting: http://10.0.0.242:8082/domain/b5f604ca-949a-4f9d-b947-4f065da907b0 2025-10-16 09:33:50,547 - DEBUG - Requesting: http://10.0.0.242:8082/project/b26df32e-374d-4303-a72d-c5c0d6fc0139 2025-10-16 09:33:50,617 - DEBUG - Requesting: http://10.0.0.242:8082/network-policy/48f6cfc3-6757-46e8-8b95-112dba9b24d0 2025-10-16 09:33:50,626 - INFO - Verified policy ctest-policy1-49504356 in API Server, Result: True 2025-10-16 09:33:50,626 - INFO - Done with setup and verification, moving onto test .. 2025-10-16 09:33:50,633 - INFO - Deleting VN ctest-vn4-68543047 2025-10-16 09:33:50,738 - DEBUG - Response for deleting network () 2025-10-16 09:33:50,739 - DEBUG - Requesting: http://10.0.0.242:8082/routing-instance/7c0613a4-7ed4-4808-a4af-3a3a068cf618 2025-10-16 09:33:50,743 - DEBUG - Response Code: 404 2025-10-16 09:33:50,743 - DEBUG - Requesting: http://10.0.0.242:8082/domains 2025-10-16 09:33:50,747 - DEBUG - Requesting: http://10.0.0.242:8082/domain/b5f604ca-949a-4f9d-b947-4f065da907b0 2025-10-16 09:33:50,803 - DEBUG - Requesting: http://10.0.0.242:8082/project/b26df32e-374d-4303-a72d-c5c0d6fc0139 2025-10-16 09:33:50,872 - INFO - Validated that VN ctest-vn4-68543047 is not found in API Server 2025-10-16 09:33:50,881 - DEBUG - VN ctest-vn4-68543047 is not present in Agent 10.0.0.242 2025-10-16 09:33:50,881 - INFO - Validated that VN ctest-vn4-68543047 is not in any agent 2025-10-16 09:33:50,893 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-vn4-68543047 info 2025-10-16 09:33:50,910 - INFO - Deleted policy ctest-policy1-49504356 2025-10-16 09:33:51,072 - DEBUG - policy ctest-policy1-49504356 is not found in API Server 2025-10-16 09:33:51,327 - DEBUG - No XMPP flaps were noticed during the test
2025-10-16 09:33:51,327 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04]
2025-10-16 09:33:51,327 - INFO - -------------------------------------------------------------------------------- 2025-10-16 09:33:51,613 - DEBUG - No XMPP flaps were noticed during the test
2025-10-16 09:33:51,613 - INFO - END TEST : test_remove_policy_with_ref : PASSED[0:00:04]
2025-10-16 09:33:51,613 - INFO - -------------------------------------------------------------------------------- 2025-10-16 09:33:52,272 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-54295821, ID : b26df32e-374d-4303-a72d-c5c0d6fc0139