Commit cf44291f authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_pdm: Use upgrade scope rather them allocation scope

  ... to decide which computers to select for check for upgrades
parent c602883e
portal = context.getPortalObject()
default_allocation_scope_uid = [category.getUid() \
for category in portal.portal_categories.allocation_scope.open.objectValues()]
default_upgrade_scope_uid = [
portal.portal_categories.upgrade_scope.auto.getUid(),
portal.portal_categories.upgrade_scope.confirmation.getUid()
]
if default_allocation_scope_uid:
if default_upgrade_scope_uid:
portal.portal_catalog.searchAndActivate(
portal_type='Compute Node',
validation_state = 'validated',
default_allocation_scope_uid=default_allocation_scope_uid,
default_upgrade_scope_uid=default_upgrade_scope_uid,
method_id = 'ComputeNode_checkAndCreateUpgradeDecision',
activate_kw = {'tag':tag}
)
......
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