Example #1
0
def get_user_lookup_table():
    users = {}
    for user in User.all():
        try:
            users[str(user.user_id)] = user.email
        except KeyError:
            pass
    return users
Example #2
0
def get_account_user_id(**kwargs):
    """ Returns account_user_id from arguments

    Keyword arguments:
    :param vm_login_id: user's VM login ID like p100
    :param email: user's E-Mail address
    :returns: account_user_id
    :rtype: int
    """
    if 'vm_login_id' in kwargs:
        users = User.all()
        selected_user = get_user(users, vm_login_id=kwargs['vm_login_id'])
    elif 'email' in kwargs:
        users = User.all()
        selected_user = get_user(users, email=kwargs['email'])

    return selected_user.account_user_id
Example #3
0
def get_account_user_id(**kwargs):
    """ Returns account_user_id from arguments

    Keyword arguments:
    :param vm_login_id: user's VM login ID like p100
    :param email: user's E-Mail address
    :returns: account_user_id
    :rtype: int
    """
    if 'vm_login_id' in kwargs:
        users = User.all()
        selected_user = get_user(users, vm_login_id=kwargs['vm_login_id'])
    elif 'email' in kwargs:
        users = User.all()
        selected_user = get_user(users, email=kwargs['email'])

    return selected_user.account_user_id
Example #4
0
def get_vm_login_id(**kwargs):
    """ Returns vm_login_id from arguments

    Keyword arguments:
    :param email: user's E-Mail address
    :returns: vm_login_id
    :rtype: str
    """
    if 'email' in kwargs:
        users = User.all()
        selected_user = get_user(users, email=kwargs['email'])

    return selected_user.vm_login_id
Example #5
0
def get_vm_login_id(**kwargs):
    """ Returns vm_login_id from arguments

    Keyword arguments:
    :param email: user's E-Mail address
    :returns: vm_login_id
    :rtype: str
    """
    if 'email' in kwargs:
        users = User.all()
        selected_user = get_user(users, email=kwargs['email'])

    return selected_user.vm_login_id