def _get_vif_name(vif):
 if (vif.get('devname', None) is not None):
  return vif['devname']
 return ('nic' + vif['id'])[:model.NIC_NAME_LEN]

def _get_vif_name ( vif ) : if ( vif . get ( 'devname' , None ) is not None ) : return vif [ 'devname' ] return ( 'nic' + vif [ 'id' ] ) [ : model . NIC_NAME_LEN ]
get a vif device name .