docs: def console(cls, id):
          """Open a console to virtual machine."""
          vm_info = cls.info(id)
          if not vm_info['console']:
              # first activate console
              cls.update(id, memory=None, cores=None, console=True,
                         password=None, background=False, max_memory=None)
          # now we can connect
          # retrieve ip of vm
          vm_info = cls.info(id)
          version, ip_addr = cls.vm_ip(id)
  
          console_url = vm_info.get('console_url', 'console.gandi.net')
          access = 'ssh %s@%s' % (ip_addr, console_url)
          cls.execute(access)