def getInstanceDetails(api, server):
 instance = {'id': server['LINODEID'], 'name': server['LABEL'], 'public': [], 'private': []}
 for ip in api.linode_ip_list(LinodeId=server['LINODEID']):
  if (ip['ISPUBLIC'] and ('ipv4' not in instance)):
   instance['ipv4'] = ip['IPADDRESS']
   instance['fqdn'] = ip['RDNS_NAME']
  if ip['ISPUBLIC']:
   instance['public'].append({'ipv4': ip['IPADDRESS'], 'fqdn': ip['RDNS_NAME'], 'ip_id': ip['IPADDRESSID']})
  else:
   instance['private'].append({'ipv4': ip['IPADDRESS'], 'fqdn': ip['RDNS_NAME'], 'ip_id': ip['IPADDRESSID']})
 return instance

def getInstanceDetails ( api , server ) : instance = { 'id' : server [ 'LINODEID' ] , 'name' : server [ 'LABEL' ] , 'public' : [ ] , 'private' : [ ] } for ip in api . linode_ip_list ( LinodeId = server [ 'LINODEID' ] ) : if ( ip [ 'ISPUBLIC' ] and ( 'ipv4' not in instance ) ) : instance [ 'ipv4' ] = ip [ 'IPADDRESS' ] instance [ 'fqdn' ] = ip [ 'RDNS_NAME' ] if ip [ 'ISPUBLIC' ] : instance [ 'public' ] . append ( { 'ipv4' : ip [ 'IPADDRESS' ] , 'fqdn' : ip [ 'RDNS_NAME' ] , 'ip_id' : ip [ 'IPADDRESSID' ] } ) else : instance [ 'private' ] . append ( { 'ipv4' : ip [ 'IPADDRESS' ] , 'fqdn' : ip [ 'RDNS_NAME' ] , 'ip_id' : ip [ 'IPADDRESSID' ] } ) return instance
return the details of an instance .