Beispiel #1
0
def log_user_in_client(firstname, lastname):
    user = user_helper.get_by_firstname_lastname(firstname, lastname)
    conf_dict = {
        'main_server_address': common.get_host_address(),
        'main_server_port': 5003,
        'login': user.username,
        'password': user.password,
        'agent_option': 'no',
    }
    configure_client(conf_dict)
    return log_in_the_xivo_client()
def i_log_in_the_xivo_client_as_1_pass_2_logged_agent(step, login, password, login_status):
    conf_dict = {
        'main_server_address': common.get_host_address(),
        'login': login,
        'password': password,
        'agent_option': login_status,
    }
    cti_helper.configure_client(conf_dict)
    result = cti_helper.log_in_the_xivo_client()
    assert_that(result['test_result'], equal_to('passed'),
                'could not log in the CTI client as %s pass %s' % (login, password))
Beispiel #3
0
def log_user_in_client(firstname, lastname):
    user = user_helper.get_by_firstname_lastname(firstname, lastname)
    conf_dict = {
        'main_server_address': common.get_host_address(),
        'main_server_port': 5003,
        'login': user.username,
        'password': user.password,
        'agent_option': 'no',
    }
    configure_client(conf_dict)
    return log_in_the_xivo_client()
Beispiel #4
0
def configure_client(conf_dict):
    """This function send a message to cticlient to configure it.

    :param conf_dict: The dict to configure.
    :type conf_dict: dict
    :example:

    .. code-block:: javascript

        conf_dict = {
            'main_server_address': char,
            'main_server_port': int,
            'main_server_encrypted': boolean,
            'backup_server_address': char,
            'backup_server_port': int,
            'backup_server_encrypted': boolean,
            'login': char,
            'password': char,
            'keep_password': boolean,
            'display_profile': boolean,
            'autoconnect': boolean,
            'show_agent_option': boolean,
            'agent_option': enum [no, unlogged, logged],
            'hide_unlogged_agents_for_xlet_queue_members': boolean,
            'enable_screen_popup': boolean,
            'enable_presence_reporting': boolean,
            'enable_start_systrayed': boolean,
            'enable_auto_reconnect': boolean,
            'auto_reconnect_interval': int,
            'enable_multiple_instances': boolean
        }

    """
    if 'main_server_address' not in conf_dict:
        conf_dict['main_server_address'] = common.get_host_address()
    if 'main_server_port' not in conf_dict:
        conf_dict['main_server_port'] = 5003
    if 'enable_multiple_instances' not in conf_dict:
        conf_dict['enable_multiple_instances'] = True

    return xivoclient.exec_command('configure', conf_dict)
Beispiel #5
0
def configure_client(conf_dict):
    """This function send a message to cticlient to configure it.

    :param conf_dict: The dict to configure.
    :type conf_dict: dict
    :example:

    .. code-block:: javascript

        conf_dict = {
            'main_server_address': char,
            'main_server_port': int,
            'main_server_encrypted': boolean,
            'backup_server_address': char,
            'backup_server_port': int,
            'backup_server_encrypted': boolean,
            'login': char,
            'password': char,
            'keep_password': boolean,
            'display_profile': boolean,
            'autoconnect': boolean,
            'show_agent_option': boolean,
            'agent_option': enum [no, unlogged, logged],
            'hide_unlogged_agents_for_xlet_queue_members': boolean,
            'enable_screen_popup': boolean,
            'enable_presence_reporting': boolean,
            'enable_start_systrayed': boolean,
            'enable_auto_reconnect': boolean,
            'auto_reconnect_interval': int,
            'enable_multiple_instances': boolean
        }

    """
    if 'main_server_address' not in conf_dict:
        conf_dict['main_server_address'] = common.get_host_address()
    if 'main_server_port' not in conf_dict:
        conf_dict['main_server_port'] = 5003
    if 'enable_multiple_instances' not in conf_dict:
        conf_dict['enable_multiple_instances'] = True

    return xivoclient.exec_command('configure', conf_dict)