'Gets information of a remote console for the given server.
Example POST:
http://localhost/api/nova/servers/abcd/console-info/'

@rest_utils.ajax()
def post(self, request, server_id):

    console_type = request.DATA.get('console_type', 'AUTO')
    CONSOLES = OrderedDict([('VNC', api.nova.server_vnc_console), ('SPICE', api.nova.server_spice_console), ('RDP', api.nova.server_rdp_console), ('SERIAL', api.nova.server_serial_console)])
    'Get    a    tuple    of    console    url    and    console    type.'
    if (console_type == 'AUTO'):
        check_consoles = CONSOLES
    else:
        try:
            check_consoles = {console_type: CONSOLES[console_type]}
        except KeyError:
            msg = (_('Console    type    "%s"    not    supported.') % console_type)
            raise hz_exceptions.NotAvailable(msg)
    try:
        httpnotimplemented = exceptions.HttpNotImplemented
    except AttributeError:
        httpnotimplemented = exceptions.HTTPNotImplemented
    for (con_type, api_call) in check_consoles.items():
        try:
            console = api_call(request, server_id)
        except httpnotimplemented:
            continue
        except Exception:
            continue
        if (con_type == 'SERIAL'):
            console_url = console.url
        else:
            console_url = ('%s&%s(%s)' % (console.url, utils_http.urlencode({'title': _('Console')}), server_id))
        return {'type': con_type, 'url': console_url}
    raise hz_exceptions.NotAvailable(_('No    available    console    found.'))
