def _get_eth_link(vif, ifc_num):
 link_id = vif.get('devname')
 if (not link_id):
  link_id = ('interface%d' % ifc_num)
 if (vif.get('type') == 'ethernet'):
  nic_type = 'phy'
 else:
  nic_type = vif.get('type')
 link = {'id': link_id, 'vif_id': vif['id'], 'type': nic_type, 'mtu': vif['network']['meta'].get('mtu'), 'ethernet_mac_address': vif.get('address')}
 return link

def _get_eth_link ( vif , ifc_num ) : link_id = vif . get ( 'devname' ) if ( not link_id ) : link_id = ( 'interface%d' % ifc_num ) if ( vif . get ( 'type' ) == 'ethernet' ) : nic_type = 'phy' else : nic_type = vif . get ( 'type' ) link = { 'id' : link_id , 'vif_id' : vif [ 'id' ] , 'type' : nic_type , 'mtu' : vif [ 'network' ] [ 'meta' ] . get ( 'mtu' ) , 'ethernet_mac_address' : vif . get ( 'address' ) } return link
get a vif or physical nic representation .