def _are_there_existing_servers(context):
if not 'ec2' in context:
# very old stack, canned response
return True
if isinstance(context['ec2'], bool):
# no ec2 instances or an instance whose buildvars haven't been updated.
# either way, the value here can be used as-is
return context['ec2']
num_suppressed = len(context['ec2'].get('suppressed', []))
cluster_size = context['ec2'].get('cluster-size', 1)
return context['ec2'] and num_suppressed < cluster_size
评论列表
文章目录