Beispiel #1
0
def prepare_stack_launch_config(group_id, stack_config):
    """
    Prepare a stack config (the stack part of the Group's launch config)
    with any necessary dynamic data.

    :param str group_id: The group ID
    :param PMap stack_config: The stack part of the Group's launch config,
        as per :obj:`otter.json_schema.group_schemas.stack`.
    """
    # Set stack name and tag to the same thing
    stack_config = set_in(stack_config, ('stack_name',),
                          get_stack_tag_for_group(group_id))
    stack_config = set_in(stack_config, ('tags',),
                          get_stack_tag_for_group(group_id))
    return stack_config
Beispiel #2
0
 def get_stack_list(self):
     return (self.helper.treq.get(
                 '{}/stacks'.format(self.rcs.endpoints['heat']),
                 headers=headers(str(self.rcs.token)),
                 params={
                     'tags': get_stack_tag_for_group(self.group.group_id)},
                 pool=self.helper.pool)
             .addCallback(check_success, [200])
             .addCallback(self.helper.treq.json_content))
Beispiel #3
0
 def get_stack_list(self):
     return (self.helper.treq.get(
         '{}/stacks'.format(self.rcs.endpoints['heat']),
         headers=headers(str(self.rcs.token)),
         params={
             'tags': get_stack_tag_for_group(self.group.group_id)
         },
         pool=self.helper.pool).addCallback(
             check_success,
             [200]).addCallback(self.helper.treq.json_content))
Beispiel #4
0
def get_scaling_group_stacks(group_id, get_all_stacks=get_all_stacks):
    return get_all_stacks(stack_tag=get_stack_tag_for_group(group_id))
Beispiel #5
0
def get_scaling_group_stacks(group_id, get_all_stacks=get_all_stacks):
    return get_all_stacks(stack_tag=get_stack_tag_for_group(group_id))