code: def info(gandi, resource):
      
      output_keys = ['ip', 'state', 'dc', 'type', 'vm', 'reverse']
  
      datacenters = gandi.datacenter.list()
  
      ip = gandi.ip.info(resource)
      iface = gandi.iface.info(ip['iface_id'])
      vms = None
      if iface.get('vm_id'):
          vm = gandi.iaas.info(iface['vm_id'])
          vms = {vm['id']: vm}
  
      output_ip(gandi, ip, datacenters, vms, {iface['id']: iface},
                output_keys)
  
      return ip
docs: Display information about an ip.
  
      Resource can be an ip or id.