Exemplo n.º 1
0
def when_i_create_a_notify_rule_with_group1_group2_and_group3(context, rule_name, body, email):

    action = Rule_Utils.create_rule_action_dict(action_name='notify-email', body=body, email=email)

    context.req = api_utils.create_rule(tenant_id=context.tenant_id, server_id=context.server_id, rule_name=rule_name,
                                        cpu=context.cpu, mem=context.mem, hdd=context.hdd, net=context.net,
                                        action=action, headers=context.headers)
Exemplo n.º 2
0
def when_i_create_a_notify_rule_with_group1_group2_and_group3(step, rule_name, body, email):

    action = Rule_Utils.create_rule_action_dict(action_name='notify-email', body=body, email=email)

    world.req = api_utils.create_rule(tenant_id=world.tenant_id, server_id=world.server_id, rule_name=rule_name,
                                      cpu=world.cpu, mem=world.mem, hdd=world.hdd, net=world.net, action=action,
                                      headers=world.headers)
Exemplo n.º 3
0
def when_i_create_a_scale_rule_with_group1_and_group2(step, rule_name, action):

    if rule_name == 'random':
        rule_name = Utils.id_generator()

    action = Rule_Utils.create_rule_action_dict(action_name='notify-scale', operation=action)

    world.req = api_utils.create_rule(tenant_id=world.tenant_id, server_id=world.server_id, rule_name=rule_name,
                                      cpu=world.cpu, mem=world.mem, action=action, headers=world.headers)
Exemplo n.º 4
0
def when_i_create_a_scale_rule_with_group1_and_group2(context, rule_name, action):

    if rule_name == 'random':
        rule_name = Utils.id_generator()

    action = Rule_Utils.create_rule_action_dict(action_name='notify-scale', operation=action)

    context.req = api_utils.create_rule(tenant_id=context.tenant_id, server_id=context.server_id, rule_name=rule_name,
                                        cpu=context.cpu, mem=context.mem, hdd=context.hdd, net=context.net,
                                        action=action, headers=context.headers)
Exemplo n.º 5
0
def when_i_update_the_notify_rule_with_group1_group2_and_group3(step, new_name, new_body, new_mail, server_id):

    if new_name == RANDOM:
        world.rule_name = Utils.id_generator()
    else:
        world.rule_name = new_name
    world.server_id = server_id

    world.rule_action = Rule_Utils.create_rule_action_dict(action_name='notify-email', body=new_body, email=new_mail)

    world.req = api_utils.update_rule(tenant_id=world.tenant_id, server_id=world.server_id, rule_name=world.rule_name,
                                      cpu=world.cpu, mem=world.mem, hdd=world.hdd, net=world.net,
                                      action=world.rule_action, headers=world.headers, rule_id=world.rule_id)
Exemplo n.º 6
0
def when_i_update_the_notify_rule_with_group1_group2_and_group3(step, new_name, new_body, new_mail, server_id):

    if new_name == RANDOM:
        world.rule_name = Utils.id_generator()
    else:
        world.rule_name = new_name
    world.server_id = server_id

    world.rule_action = Rule_Utils.create_rule_action_dict(action_name='notify-email', body=new_body, email=new_mail)

    world.req = api_utils.update_rule(tenant_id=world.tenant_id, server_id=world.server_id, rule_name=world.rule_name,
                                      cpu=world.cpu, mem=world.mem, action=world.rule_action, headers=world.headers,
                                      rule_id=world.rule_id)
Exemplo n.º 7
0
def when_i_update_the_rule_with_group1_and_group2(step, new_name, new_action, server_id):

    if new_name == 'random':
        world.rule_name = Utils.id_generator()
    else:
        world.rule_name = new_name

    world.server_id = server_id

    world.rule_action = Rule_Utils.create_rule_action_dict(action_name='notify-scale', operation=new_action)

    world.req = api_utils.update_rule(tenant_id=world.tenant_id, server_id=world.server_id, rule_name=world.rule_name,
                                      cpu=world.cpu, mem=world.mem, hdd=world.hdd, net=world.net,
                                      action=world.rule_action, headers=world.headers, rule_id=world.rule_id)
Exemplo n.º 8
0
def when_i_update_the_notify_rule_with_group1_group2_and_group3(context, new_name, new_body, new_mail, server_id):

    if new_name == RANDOM:
        context.rule_name = Utils.id_generator()
    else:
        context.rule_name = new_name
    context.server_id = server_id

    context.rule_action = Rule_Utils.create_rule_action_dict(action_name='notify-email', body=new_body, email=new_mail)

    context.req = api_utils.update_rule(tenant_id=context.tenant_id, server_id=context.server_id,
                                        rule_name=context.rule_name, cpu=context.cpu, mem=context.mem,
                                        hdd=context.hdd, net=context.net, action=context.rule_action,
                                        headers=context.headers, rule_id=context.rule_id)
Exemplo n.º 9
0
def when_i_update_the_rule_with_group1_and_group2(step, new_name, new_action, server_id):

    if new_name == 'random':
        world.rule_name = Utils.id_generator()
    else:
        world.rule_name = new_name

    world.server_id = server_id

    world.rule_action = Rule_Utils.create_rule_action_dict(action_name='notify-scale', operation=new_action)

    world.req = api_utils.update_rule(tenant_id=world.tenant_id, server_id=world.server_id, rule_name=world.rule_name,
                                      cpu=world.cpu, mem=world.mem, action=world.rule_action, headers=world.headers,
                                      rule_id=world.rule_id)
Exemplo n.º 10
0
def when_i_update_the_rule_with_group1_and_group2(context, new_name, new_action, server_id):

    if new_name == 'random':
        context.rule_name = Utils.id_generator()
    else:
        context.rule_name = new_name

    context.server_id = server_id

    context.rule_action = Rule_Utils.create_rule_action_dict(action_name='notify-scale', operation=new_action)

    context.req = api_utils.update_rule(tenant_id=context.tenant_id, server_id=context.server_id,
                                        rule_name=context.rule_name, cpu=context.cpu, mem=context.mem,
                                        hdd=context.hdd, net=context.net, action=context.rule_action,
                                        headers=context.headers, rule_id=context.rule_id)
Exemplo n.º 11
0
def when_i_create_a_notify_rule_with_group1_group2_and_group3(
        step, rule_name, body, email):

    action = Rule_Utils.create_rule_action_dict(action_name='notify-email',
                                                body=body,
                                                email=email)

    world.req = api_utils.create_rule(tenant_id=world.tenant_id,
                                      server_id=world.server_id,
                                      rule_name=rule_name,
                                      cpu=world.cpu,
                                      mem=world.mem,
                                      hdd=world.hdd,
                                      net=world.net,
                                      action=action,
                                      headers=world.headers)
Exemplo n.º 12
0
def when_i_create_a_notify_rule_with_group1_group2_and_group3(
        context, rule_name, body, email):

    action = Rule_Utils.create_rule_action_dict(action_name='notify-email',
                                                body=body,
                                                email=email)

    context.req = api_utils.create_rule(tenant_id=context.tenant_id,
                                        server_id=context.server_id,
                                        rule_name=rule_name,
                                        cpu=context.cpu,
                                        mem=context.mem,
                                        hdd=context.hdd,
                                        net=context.net,
                                        action=action,
                                        headers=context.headers)
Exemplo n.º 13
0
def when_i_create_a_scale_rule_with_group1_and_group2(context, rule_name,
                                                      action):

    if rule_name == 'random':
        rule_name = Utils.id_generator()

    action = Rule_Utils.create_rule_action_dict(action_name='notify-scale',
                                                operation=action)

    context.req = api_utils.create_rule(tenant_id=context.tenant_id,
                                        server_id=context.server_id,
                                        rule_name=rule_name,
                                        cpu=context.cpu,
                                        mem=context.mem,
                                        hdd=context.hdd,
                                        net=context.net,
                                        action=action,
                                        headers=context.headers)
Exemplo n.º 14
0
def when_i_update_the_notify_rule_with_group1_group2_and_group3(
        context, new_name, new_body, new_mail, server_id):

    if new_name == RANDOM:
        context.rule_name = Utils.id_generator()
    else:
        context.rule_name = new_name
    context.server_id = server_id

    context.rule_action = Rule_Utils.create_rule_action_dict(
        action_name='notify-email', body=new_body, email=new_mail)

    context.req = api_utils.update_rule(tenant_id=context.tenant_id,
                                        server_id=context.server_id,
                                        rule_name=context.rule_name,
                                        cpu=context.cpu,
                                        mem=context.mem,
                                        hdd=context.hdd,
                                        net=context.net,
                                        action=context.rule_action,
                                        headers=context.headers,
                                        rule_id=context.rule_id)
Exemplo n.º 15
0
def when_i_update_the_rule_with_group1_and_group2(context, new_name,
                                                  new_action, server_id):

    if new_name == 'random':
        context.rule_name = Utils.id_generator()
    else:
        context.rule_name = new_name

    context.server_id = server_id

    context.rule_action = Rule_Utils.create_rule_action_dict(
        action_name='notify-scale', operation=new_action)

    context.req = api_utils.update_rule(tenant_id=context.tenant_id,
                                        server_id=context.server_id,
                                        rule_name=context.rule_name,
                                        cpu=context.cpu,
                                        mem=context.mem,
                                        hdd=context.hdd,
                                        net=context.net,
                                        action=context.rule_action,
                                        headers=context.headers,
                                        rule_id=context.rule_id)