def _associate_extension_to_line(exten, context, sip_username):
    extension = extension_helper.find_extension_by_exten_context(exten, context)
    line = line_sip_helper.get_by_username(sip_username)
    return action.associate_extension(line['id'], extension['id'])
Esempio n. 2
0
def given_device_with_mac_group1_is_provisionned_with_sip_line_group2(
        step, device_ip, sip_username):
    line = line_sip_helper.get_by_username(sip_username)
    device_helper.provision_device_using_webi(line['provisioning_extension'],
                                              device_ip)
Esempio n. 3
0
def given_device_with_mac_group1_is_provisionned_with_sip_line_group2(step, device_ip, sip_username):
    line = line_sip_helper.get_by_username(sip_username)
    device_helper.provision_device_using_webi(line['provisioning_extension'], device_ip)
def when_i_dissociate_a_fake_extension_from_sip_line_group1(step, sip_username):
    line = line_sip_helper.get_by_username(sip_username)
    world.response = action.dissociate_extension(line['id'], FAKE_ID)
def when_i_dissociate_extension_group1_from_sip_line_group2(step, exten, context, sip_username):
    extension = extension_helper.find_extension_by_exten_context(exten, context)
    line = line_sip_helper.get_by_username(sip_username)
    world.response = action.dissociate_extension(line['id'], extension.id)
def when_i_get_the_list_of_extensions_associated_to_sip_line_group1(step, sip_username):
    line_sip = line_sip_helper.get_by_username(sip_username)
    world.response = action.extensions_for_line(line_sip['id'])
def when_i_dissociate_extension_group1_from_sip_line_group2(step, exten, context, sip_username):
    extension = extension_helper.find_extension_by_exten_context(exten, context)
    line = line_sip_helper.get_by_username(sip_username)
    world.response = action.dissociate_extension(line['id'], extension.id)
def when_i_dissociate_a_fake_extension_from_sip_line_group1(step, sip_username):
    line = line_sip_helper.get_by_username(sip_username)
    world.response = action.dissociate_extension(line['id'], FAKE_ID)
def when_i_get_the_list_of_extensions_associated_to_sip_line_group1(step, sip_username):
    line_sip = line_sip_helper.get_by_username(sip_username)
    world.response = action.extensions_for_line(line_sip['id'])
def _associate_extension_to_line(exten, context, sip_username):
    extension = extension_helper.find_extension_by_exten_context(exten, context)
    line = line_sip_helper.get_by_username(sip_username)
    return action.associate_extension(line['id'], extension.id)