Assign role to username

    .. code-block:: bash

        salt '*' onyx.cmd set_role username=daniel role=vdc-admin

def set_role(username, role):
    '''
    Assign role to username

    .. code-block:: bash

        salt '*' onyx.cmd set_role username=daniel role=vdc-admin
    '''
    try:
        sendline('config terminal')
        role_line = 'username {0} role {1}'.format(username, role)
        ret = sendline(role_line)
        sendline('end')
        sendline('copy running-config startup-config')
        return '\n'.join([role_line, ret])
    except TerminalException as e:
        log.error(e)
        return 'Failed to set password'