'Get console output
:param      node: node
:type       node: :class:`Node`
:param      length: Optional number of lines to fetch from the
console log
:type       length: ``int``
:return: Dictionary with the output
:rtype: ``dict``'

def ex_get_console_output(self, node, length=None):

    data = {'os-getConsoleOutput': {'length': length}}
    resp = self.connection.request(('/servers/%s/action' % node.id), method='POST', data=data).object
    return resp
