2025-08-24 07:44:25,564 - INFO - Domain Default found not creating
2025-08-24 07:44:25,697 - INFO - Project ctest-TestBasicPolicyNegativeIpv4v6-24318677 not found, creating it
2025-08-24 07:44:26,154 - INFO - Created Project:ctest-TestBasicPolicyNegativeIpv4v6-24318677, ID : 46538034-afa6-426a-b1eb-2e02e6ac521f
2025-08-24 07:44:27,532 - INFO - ================================================================================
2025-08-24 07:44:27,533 - INFO - STARTING TEST : test_remove_policy_with_ref
2025-08-24 07:44:27,654 - DEBUG - Nothing to compare xmpp stats {'10.0.0.254': {'10.20.0.17': '0'}} with
2025-08-24 07:44:27,654 - INFO - Initial checks done. Running the testcase now
2025-08-24 07:44:27,654 - INFO -
2025-08-24 07:44:27,654 - INFO - ================================================================================
2025-08-24 07:44:27,655 - INFO - STARTING TEST : test_remove_policy_with_ref
2025-08-24 07:44:27,655 - 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-24 07:44:27,822 - DEBUG - Nothing to compare xmpp stats {'10.0.0.254': {'10.20.0.17': '0'}} with
2025-08-24 07:44:27,822 - INFO - Initial checks done. Running the testcase now
2025-08-24 07:44:27,822 - INFO -
2025-08-24 07:44:28,184 - DEBUG - Policy np_rules : [rule_sequence = None, rule_uuid = None, direction = <>, protocol = icmp, src_addresses = [subnet = None, virtual_network = default-domain:ctest-TestBasicPolicyNegativeIpv4v6-24318677:ctest-vn4-33766435, 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-24318677:ctest-vn4-33766435, 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-24318677:ctest-vn4-33766435, 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-24318677:ctest-vn4-33766435, 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-24 07:44:28,759 - DEBUG - Response for create_network : {'network': {'id': '94dcf19d-3d50-40c4-964e-12d75c1f7b05', 'name': 'ctest-vn4-33766435', 'tenant_id': '46538034afa6426ab1eb2e02e6ac521f', 'project_id': '46538034afa6426ab1eb2e02e6ac521f', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-24318677', 'ctest-vn4-33766435'], 'port_security_enabled': True, 'description': ''}}
2025-08-24 07:44:28,910 - ERROR - Neutron Exception while creating subnet for vn with id 94dcf19d-3d50-40c4-964e-12d75c1f7b05
Traceback (most recent call last):
File "/contrail-test/fixtures/quantum_test.py", line 128, in create_subnet
subnet_rsp = self.obj.create_subnet({'subnet': subnet_req})
File "/usr/local/lib/python3.6/site-packages/neutronclient/v2_0/client.py", line 848, in create_subnet
return self.post(self.subnets_path, body=body)
File "/usr/local/lib/python3.6/site-packages/neutronclient/v2_0/client.py", line 359, in post
headers=headers, params=params)
File "/usr/local/lib/python3.6/site-packages/neutronclient/v2_0/client.py", line 294, in do_request
self._handle_fault_response(status_code, replybody, resp)
File "/usr/local/lib/python3.6/site-packages/neutronclient/v2_0/client.py", line 269, in _handle_fault_response
exception_handler_v20(status_code, error_body)
File "/usr/local/lib/python3.6/site-packages/neutronclient/v2_0/client.py", line 93, in exception_handler_v20
request_ids=request_ids)
neutronclient.common.exceptions.InternalServerError: The server has either erred or is incapable of performing the requested operation.
Neutron server returns request_ids: ['req-3002d69d-ade2-4906-9667-ae84263072d4']
2025-08-24 07:44:29,041 - ERROR - Neutron Exception while creating subnet for vn with id 94dcf19d-3d50-40c4-964e-12d75c1f7b05
Traceback (most recent call last):
File "/contrail-test/fixtures/quantum_test.py", line 128, in create_subnet
subnet_rsp = self.obj.create_subnet({'subnet': subnet_req})
File "/usr/local/lib/python3.6/site-packages/neutronclient/v2_0/client.py", line 848, in create_subnet
return self.post(self.subnets_path, body=body)
File "/usr/local/lib/python3.6/site-packages/neutronclient/v2_0/client.py", line 359, in post
headers=headers, params=params)
File "/usr/local/lib/python3.6/site-packages/neutronclient/v2_0/client.py", line 294, in do_request
self._handle_fault_response(status_code, replybody, resp)
File "/usr/local/lib/python3.6/site-packages/neutronclient/v2_0/client.py", line 269, in _handle_fault_response
exception_handler_v20(status_code, error_body)
File "/usr/local/lib/python3.6/site-packages/neutronclient/v2_0/client.py", line 93, in exception_handler_v20
request_ids=request_ids)
neutronclient.common.exceptions.InternalServerError: The server has either erred or is incapable of performing the requested operation.
Neutron server returns request_ids: ['req-1c567dce-beff-4add-8e1f-7342b858e0e3']
2025-08-24 07:44:29,058 - INFO - Created VN ctest-vn4-33766435
2025-08-24 07:44:29,112 - DEBUG - VN ctest-vn4-33766435 UUID is 94dcf19d-3d50-40c4-964e-12d75c1f7b05
2025-08-24 07:44:29,257 - DEBUG - Response for mapping policy(s) with vn {'network': {'id': '94dcf19d-3d50-40c4-964e-12d75c1f7b05', 'name': 'ctest-vn4-33766435', 'tenant_id': '46538034afa6426ab1eb2e02e6ac521f', 'project_id': '46538034afa6426ab1eb2e02e6ac521f', 'admin_state_up': True, 'shared': False, 'status': 'ACTIVE', 'router:external': False, 'mtu': 0, 'subnets': [], 'fq_name': ['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-24318677', 'ctest-vn4-33766435'], 'policys': [['default-domain', 'ctest-TestBasicPolicyNegativeIpv4v6-24318677', 'ctest-policy1-29661384']], 'port_security_enabled': True, 'description': ''}}
2025-08-24 07:44:29,432 - DEBUG - Requesting: http://10.0.0.254:8082/domains
2025-08-24 07:44:29,719 - DEBUG - Requesting: http://10.0.0.254:8082/domains
2025-08-24 07:44:29,745 - DEBUG - Requesting: http://10.0.0.254:8082/domain/1310f3c6-22a8-49c4-8a87-a032ff68bb5b
2025-08-24 07:44:29,758 - DEBUG - Requesting: http://10.0.0.254:8082/project/46538034-afa6-426a-b1eb-2e02e6ac521f
2025-08-24 07:44:29,834 - DEBUG - Requesting: http://10.0.0.254:8082/virtual-network/94dcf19d-3d50-40c4-964e-12d75c1f7b05
2025-08-24 07:44:29,855 - INFO - Deleting VN ctest-vn4-33766435
2025-08-24 07:44:29,978 - DEBUG - Response for deleting network ()
2025-08-24 07:44:30,007 - INFO - Deleted policy ctest-policy1-29661384
2025-08-24 07:44:30,128 - ERROR - KeyError
Python 3.6.8: /usr/bin/python3
Sun Aug 24 07:44:29 2025
A problem occurred in a Python script. Here is the sequence of
function calls leading up to the error, in the order they occurred.
/contrail-test/tcutils/wrappers.py in wrapper(self=, *args=(), **kwargs={})
78 log.info('Initial checks done. Running the testcase now')
79 log.info('')
80 result = function(self, *args, **kwargs)
81 if self.inputs.upgrade:
82 pid = os.getpid()
result = None
function =
self =
args = ()
kwargs = {}
/contrail-test/scripts/policy/test_policy_basic.py in test_remove_policy_with_ref(self=)
224 vn1_fixture.bind_policies(
225 [policy_fixture.policy_fq_name], vn1_fixture.vn_id)
226 assert vn1_fixture.verify_on_setup()
227 ret = policy_fixture.verify_on_setup()
228 if ret['result'] == False:
vn1_fixture =
vn1_fixture.verify_on_setup = >
/contrail-test/fixtures/vn_test.py in verify_on_setup(self=)
574 def verify_on_setup(self):
575 result = True
576 if not self.verify_vn_in_api_server():
577 result = result and False
578 self.logger.error(
self =
self.verify_vn_in_api_server = .deco_retry..f_retry of >
/contrail-test/tcutils/util.py in f_retry(*args=(,), **kwargs={})
82 mtries, mdelay = tries, delay # make mutable
83
84 result = f(*args, **kwargs) # first attempt
85 rv = result
86 final = False
result undefined
f =
args = (,)
kwargs = {}
/contrail-test/fixtures/vn_test.py in verify_vn_in_api_server(self=)
638
639 subnets = list()
640 for ipam in self.api_s_vn_obj['virtual-network']['network_ipam_refs']:
641 subnets.extend(ipam['attr']['ipam_subnets'])
642 for vn_subnet in self.vn_subnets:
ipam undefined
self =
self.api_s_vn_obj = {'virtual-network': {'uuid': '94dcf19d-3d50-40c4...2/project/46538034-afa6-426a-b1eb-2e02e6ac521f'}}
KeyError: 'network_ipam_refs'
__cause__ = None
__class__ =
__context__ = None
__delattr__ =
__dict__ = {}
__dir__ =
__doc__ = 'Mapping key not found.'
__eq__ =
__format__ =
__ge__ =
__getattribute__ =
__gt__ =
__hash__ =
__init__ =
__init_subclass__ =
__le__ =
__lt__ =
__ne__ =
__new__ =
__reduce__ =
__reduce_ex__ =
__repr__ =
__setattr__ =
__setstate__ =
__sizeof__ =
__str__ =
__subclasshook__ =
__suppress_context__ = False
__traceback__ =
args = ('network_ipam_refs',)
with_traceback =
The above is a description of an error in a Python program. Here is
the original traceback:
Traceback (most recent call last):
File "/contrail-test/tcutils/wrappers.py", line 80, in wrapper
result = function(self, *args, **kwargs)
File "/contrail-test/scripts/policy/test_policy_basic.py", line 226, in test_remove_policy_with_ref
assert vn1_fixture.verify_on_setup()
File "/contrail-test/fixtures/vn_test.py", line 576, in verify_on_setup
if not self.verify_vn_in_api_server():
File "/contrail-test/tcutils/util.py", line 84, in f_retry
result = f(*args, **kwargs) # first attempt
File "/contrail-test/fixtures/vn_test.py", line 640, in verify_vn_in_api_server
for ipam in self.api_s_vn_obj['virtual-network']['network_ipam_refs']:
KeyError: 'network_ipam_refs'
2025-08-24 07:44:30,136 - DEBUG - No XMPP flaps were noticed during the test
2025-08-24 07:44:30,136 - INFO -
2025-08-24 07:44:30,136 - INFO - END TEST : test_remove_policy_with_ref : FAILED[0:00:03]
2025-08-24 07:44:30,136 - INFO - --------------------------------------------------------------------------------
2025-08-24 07:44:30,292 - ERROR - TestFailed
Python 3.6.8: /usr/bin/python3
Sun Aug 24 07:44:30 2025
A problem occurred in a Python script. Here is the sequence of
function calls leading up to the error, in the order they occurred.
/contrail-test/tcutils/wrappers.py in wrapper(self=, *args=(), **kwargs={})
78 log.info('Initial checks done. Running the testcase now')
79 log.info('')
80 result = function(self, *args, **kwargs)
81 if self.inputs.upgrade:
82 pid = os.getpid()
result = None
function =
self =
args = ()
kwargs = {}
/contrail-test/scripts/policy/test_policy.py in test_remove_policy_with_ref(self=)
623 @preposttest_wrapper
624 def test_remove_policy_with_ref(self):
625 super(TestBasicPolicyNegativeIpv4v6, self).test_remove_policy_with_ref()
626
627 class TestBasicPolicyModifyIpv4v6(test_policy_basic.TestBasicPolicyModify):
builtinsuper =
global TestBasicPolicyNegativeIpv4v6 =
self =
).test_remove_policy_with_ref = >
/contrail-test/tcutils/wrappers.py in wrapper(self=, *args=(), **kwargs={})
174 if 'ci_image' in list(os.environ.keys()):
175 os.environ['stop_execution_flag'] = 'set'
176 raise TestFailed("\n ".join(errmsg))
177 elif testskip:
178 log.info('')
global TestFailed =
"\n ".join undefined
errmsg = ["Test failed: KeyError\nPython 3.6.8: /usr/bin/pyt...ork_ipam_refs']:\nKeyError: 'network_ipam_refs'\n\n\n"]
TestFailed: Test failed: KeyError
Python 3.6.8: /usr/bin/python3
Sun Aug 24 07:44:29 2025
A problem occurred in a Python script. Here is the sequence of
function calls leading up to the error, in the order they occurred.
/contrail-test/tcutils/wrappers.py in wrapper(self=, *args=(), **kwargs={})
78 log.info('Initial checks done. Running the testcase now')
79 log.info('')
80 result = function(self, *args, **kwargs)
81 if self.inputs.upgrade:
82 pid = os.getpid()
result = None
function =
self =
args = ()
kwargs = {}
/contrail-test/scripts/policy/test_policy_basic.py in test_remove_policy_with_ref(self=)
224 vn1_fixture.bind_policies(
225 [policy_fixture.policy_fq_name], vn1_fixture.vn_id)
226 assert vn1_fixture.verify_on_setup()
227 ret = policy_fixture.verify_on_setup()
228 if ret['result'] == False:
vn1_fixture =
vn1_fixture.verify_on_setup = >
/contrail-test/fixtures/vn_test.py in verify_on_setup(self=)
574 def verify_on_setup(self):
575 result = True
576 if not self.verify_vn_in_api_server():
577 result = result and False
578 self.logger.error(
self =
self.verify_vn_in_api_server = .deco_retry..f_retry of >
/contrail-test/tcutils/util.py in f_retry(*args=(,), **kwargs={})
82 mtries, mdelay = tries, delay # make mutable
83
84 result = f(*args, **kwargs) # first attempt
85 rv = result
86 final = False
result undefined
f =
args = (,)
kwargs = {}
/contrail-test/fixtures/vn_test.py in verify_vn_in_api_server(self=)
638
639 subnets = list()
640 for ipam in self.api_s_vn_obj['virtual-network']['network_ipam_refs']:
641 subnets.extend(ipam['attr']['ipam_subnets'])
642 for vn_subnet in self.vn_subnets:
ipam undefined
self =
self.api_s_vn_obj = {'virtual-network': {'uuid': '94dcf19d-3d50-40c4...2/project/46538034-afa6-426a-b1eb-2e02e6ac521f'}}
KeyError: 'network_ipam_refs'
__cause__ = None
__class__ =
__context__ = None
__delattr__ =
__dict__ = {}
__dir__ =
__doc__ = 'Mapping key not found.'
__eq__ =
__format__ =
__ge__ =
__getattribute__ =
__gt__ =
__hash__ =
__init__ =
__init_subclass__ =
__le__ =
__lt__ =
__ne__ =
__new__ =
__reduce__ =
__reduce_ex__ =
__repr__ =
__setattr__ =
__setstate__ =
__sizeof__ =
__str__ =
__subclasshook__ =
__suppress_context__ = False
__traceback__ =
args = ('network_ipam_refs',)
with_traceback =
The above is a description of an error in a Python program. Here is
the original traceback:
Traceback (most recent call last):
File "/contrail-test/tcutils/wrappers.py", line 80, in wrapper
result = function(self, *args, **kwargs)
File "/contrail-test/scripts/policy/test_policy_basic.py", line 226, in test_remove_policy_with_ref
assert vn1_fixture.verify_on_setup()
File "/contrail-test/fixtures/vn_test.py", line 576, in verify_on_setup
if not self.verify_vn_in_api_server():
File "/contrail-test/tcutils/util.py", line 84, in f_retry
result = f(*args, **kwargs) # first attempt
File "/contrail-test/fixtures/vn_test.py", line 640, in verify_vn_in_api_server
for ipam in self.api_s_vn_obj['virtual-network']['network_ipam_refs']:
KeyError: 'network_ipam_refs'
__cause__ = None
__class__ =
__context__ = None
__delattr__ =
__dict__ = {}
__dir__ =
__doc__ = None
__eq__ =
__format__ =
__ge__ =
__getattribute__ =
__gt__ =
__hash__ =
__init__ =
__init_subclass__ =
__le__ =
__lt__ =
__module__ = 'tcutils.cores'
__ne__ =
__new__ =
__reduce__ =
__reduce_ex__ =
__repr__ =
__setattr__ =
__setstate__ =
__sizeof__ =
__str__ =
__subclasshook__ =
__suppress_context__ = False
__traceback__ =
__weakref__ = None
args = ("Test failed: KeyError\nPython 3.6.8: /usr/bin/pyt...ork_ipam_refs']:\nKeyError: 'network_ipam_refs'\n\n\n",)
with_traceback =
The above is a description of an error in a Python program. Here is
the original traceback:
Traceback (most recent call last):
File "/contrail-test/tcutils/wrappers.py", line 80, in wrapper
result = function(self, *args, **kwargs)
File "/contrail-test/scripts/policy/test_policy.py", line 625, in test_remove_policy_with_ref
super(TestBasicPolicyNegativeIpv4v6, self).test_remove_policy_with_ref()
File "/contrail-test/tcutils/wrappers.py", line 176, in wrapper
raise TestFailed("\n ".join(errmsg))
tcutils.cores.TestFailed: Test failed: KeyError
Python 3.6.8: /usr/bin/python3
Sun Aug 24 07:44:29 2025
A problem occurred in a Python script. Here is the sequence of
function calls leading up to the error, in the order they occurred.
/contrail-test/tcutils/wrappers.py in wrapper(self=, *args=(), **kwargs={})
78 log.info('Initial checks done. Running the testcase now')
79 log.info('')
80 result = function(self, *args, **kwargs)
81 if self.inputs.upgrade:
82 pid = os.getpid()
result = None
function =
self =
args = ()
kwargs = {}
/contrail-test/scripts/policy/test_policy_basic.py in test_remove_policy_with_ref(self=)
224 vn1_fixture.bind_policies(
225 [policy_fixture.policy_fq_name], vn1_fixture.vn_id)
226 assert vn1_fixture.verify_on_setup()
227 ret = policy_fixture.verify_on_setup()
228 if ret['result'] == False:
vn1_fixture =
vn1_fixture.verify_on_setup = >
/contrail-test/fixtures/vn_test.py in verify_on_setup(self=)
574 def verify_on_setup(self):
575 result = True
576 if not self.verify_vn_in_api_server():
577 result = result and False
578 self.logger.error(
self =
self.verify_vn_in_api_server = .deco_retry..f_retry of >
/contrail-test/tcutils/util.py in f_retry(*args=(,), **kwargs={})
82 mtries, mdelay = tries, delay # make mutable
83
84 result = f(*args, **kwargs) # first attempt
85 rv = result
86 final = False
result undefined
f =
args = (,)
kwargs = {}
/contrail-test/fixtures/vn_test.py in verify_vn_in_api_server(self=)
638
639 subnets = list()
640 for ipam in self.api_s_vn_obj['virtual-network']['network_ipam_refs']:
641 subnets.extend(ipam['attr']['ipam_subnets'])
642 for vn_subnet in self.vn_subnets:
ipam undefined
self =
self.api_s_vn_obj = {'virtual-network': {'uuid': '94dcf19d-3d50-40c4...2/project/46538034-afa6-426a-b1eb-2e02e6ac521f'}}
KeyError: 'network_ipam_refs'
__cause__ = None
__class__ =
__context__ = None
__delattr__ =
__dict__ = {}
__dir__ =
__doc__ = 'Mapping key not found.'
__eq__ =
__format__ =
__ge__ =
__getattribute__ =
__gt__ =
__hash__ =
__init__ =
__init_subclass__ =
__le__ =
__lt__ =
__ne__ =
__new__ =
__reduce__ =
__reduce_ex__ =
__repr__ =
__setattr__ =
__setstate__ =
__sizeof__ =
__str__ =
__subclasshook__ =
__suppress_context__ = False
__traceback__ =
args = ('network_ipam_refs',)
with_traceback =
The above is a description of an error in a Python program. Here is
the original traceback:
Traceback (most recent call last):
File "/contrail-test/tcutils/wrappers.py", line 80, in wrapper
result = function(self, *args, **kwargs)
File "/contrail-test/scripts/policy/test_policy_basic.py", line 226, in test_remove_policy_with_ref
assert vn1_fixture.verify_on_setup()
File "/contrail-test/fixtures/vn_test.py", line 576, in verify_on_setup
if not self.verify_vn_in_api_server():
File "/contrail-test/tcutils/util.py", line 84, in f_retry
result = f(*args, **kwargs) # first attempt
File "/contrail-test/fixtures/vn_test.py", line 640, in verify_vn_in_api_server
for ipam in self.api_s_vn_obj['virtual-network']['network_ipam_refs']:
KeyError: 'network_ipam_refs'
2025-08-24 07:44:30,299 - DEBUG - No XMPP flaps were noticed during the test
2025-08-24 07:44:30,299 - INFO -
2025-08-24 07:44:30,299 - INFO - END TEST : test_remove_policy_with_ref : FAILED[0:00:03]
2025-08-24 07:44:30,299 - INFO - --------------------------------------------------------------------------------
2025-08-24 07:44:30,968 - INFO - Deleted project: ctest-TestBasicPolicyNegativeIpv4v6-24318677, ID : 46538034-afa6-426a-b1eb-2e02e6ac521f