'Get a url to a RDP Console.'

@check_instance_cell
@reject_instance_state(task_state=[task_states.DELETING, task_states.MIGRATING])
def get_rdp_console(self, context, instance, console_type):

    if (not instance.host):
        raise exception.InstanceNotReady(instance_id=instance.uuid)
    connect_info = self._call_to_cells(context, instance, 'get_rdp_connect_info', console_type)
    self.consoleauth_rpcapi.authorize_console(context, connect_info['token'], console_type, connect_info['host'], connect_info['port'], connect_info['internal_access_path'], instance.uuid, access_url=connect_info['access_url'])
    return {'url': connect_info['access_url']}
