#NEWLINE# @ classmethod #NEWLINE# def _check_segmentation_type_changing( cls , cluster_id , data ) : #NEWLINE# #INDENT# cluster = db ( ) . query ( Cluster ) . get ( data ) #NEWLINE# if ( cluster and cluster . network_config ) : #NEWLINE# #INDENT# for k in ( 'segmentation_type' , 'net_l23_provider' ) : #NEWLINE# #INDENT# if ( ( k in data ) and ( getattr ( cluster . network_config , k ) != data [ k ] ) ) : #NEWLINE# #INDENT# raise errors . InvalidData ( "Change of '{0}' is prohibited" . format ( k ) , log_message = True )