Commit 0ae9ffa6 authored by Romain Courteaud's avatar Romain Courteaud

slapos_cloud: test: allow to disable alarm when validation a allocation supply

parent 0faf0755
......@@ -814,7 +814,8 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
def addAllocationSupply(self, title, node, software_product,
software_release, software_type,
destination_value=None,
is_slave_on_same_instance_tree_allocable=False):
is_slave_on_same_instance_tree_allocable=False,
disable_alarm=False):
allocation_supply = self.portal.allocation_supply_module.newContent(
portal_type="Allocation Supply",
title=title,
......@@ -853,6 +854,11 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
predicate_category_list=cell_key,
variation_category_list=cell_key
)
if disable_alarm:
# disable generation of Upgrade Decision
with TemporaryAlarmScript(self.portal, 'Base_reindexAndSenseAlarm', "'disabled'"):
allocation_supply.validate()
else:
allocation_supply.validate()
return allocation_supply
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment