Example #1
0
def execute_new_frame_command(command_name, arguments):
    """Executes command and creates a new Frame object from server response"""
    #support for non-plugin methods that may not supply the full name
    if not command_name.startswith('frame'):
        command_name = 'frame/' + command_name
    command_request = CommandRequest(command_name, arguments)
    command_info = executor.issue(command_request)
    frame_info = FrameInfo(command_info.result)
    return Frame(_info=frame_info)
Example #2
0
File: frame.py Project: acx2015/atk
def execute_new_frame_command(command_name, arguments):
    """Executes command and creates a new Frame object from server response"""
    #support for non-plugin methods that may not supply the full name
    if not command_name.startswith('frame'):
        command_name = 'frame/' + command_name
    command_request = CommandRequest(command_name, arguments)
    command_info = executor.issue(command_request)
    frame_info = FrameInfo(command_info.result)
    return Frame(_info=frame_info)
Example #3
0
File: frame.py Project: acx2015/atk
def execute_update_frame_command(command_name, arguments, frame):
    """Executes command and updates frame with server response"""
    #support for non-plugin methods that may not supply the full name
    if not command_name.startswith('frame'):
        command_name = 'frame/' + command_name
    command_request = CommandRequest(command_name, arguments)
    command_info = executor.issue(command_request)
    if command_info.result.has_key('schema'):
        initialize_frame(frame, FrameInfo(command_info.result))
        return None
    if (command_info.result.has_key('value') and len(command_info.result) == 1):
        return command_info.result.get('value')
    return command_info.result
Example #4
0
def execute_update_frame_command(command_name, arguments, frame):
    """Executes command and updates frame with server response"""
    #support for non-plugin methods that may not supply the full name
    if not command_name.startswith('frame'):
        command_name = 'frame/' + command_name
    command_request = CommandRequest(command_name, arguments)
    command_info = executor.issue(command_request)
    if command_info.result.has_key('schema'):
        initialize_frame(frame, FrameInfo(command_info.result))
        return None
    if (command_info.result.has_key('value') and len(command_info.result) == 1):
        return command_info.result.get('value')
    return command_info.result