#NEWLINE# def neutron_check_segmentation_ids( self ) : #NEWLINE# #INDENT# 'Check neutron segmentation ids\n\n        check networks VLAN IDs not in Neutron L2 private VLAN ID range\n        for VLAN segmentation only\n        (neutron)\n        ' #NEWLINE# tagged_nets = dict ( ( ( n [ 'name' ] , n [ 'vlan_start' ] ) for n in filter ( ( lambda n : ( n [ 'vlan_start' ] is not None ) ) , self . networks ) ) ) #NEWLINE# if tagged_nets : #NEWLINE# #INDENT# if ( self . task . cluster . network_config . segmentation_type == consts . NEUTRON_SEGMENT_TYPES . vlan ) : #NEWLINE# #INDENT# vrange = self . network_config [ 'vlan_range' ] #NEWLINE# net_intersect = [ name for ( name , vlan ) in six . iteritems ( tagged_nets ) if ( vrange [ 0 ] <= vlan <= n [ 1 ] ) ] #NEWLINE# if net_intersect : #NEWLINE# #INDENT# nets_with_errors = ', ' . join ( net_intersect ) #NEWLINE# err_msg = 'VLAN tags of {0} network(s) intersect with VLAN ID range defined for Neutron L2. Networks VLAN tags must not intersect with Neutron L2 VLAN ID range.' . format ( nets_with_errors ) #NEWLINE# raise errors . NetworkCheckError ( err_msg )