#NEWLINE# @ classmethod #NEWLINE# def validate_admin_networks_update( cls , cluster , admin_ranges ) : #NEWLINE# #INDENT# 'Check new Admin IP ranges VS nodes outside clusters.\n\n        :param cluster:      cluster instance\n        :param admin_ranges: new IP ranges for Admin networks\n        :return:             None\n        :raises:             errors.InvalidData\n        ' #NEWLINE# admin_ranges_db = list ( db ( ) . query ( IPAddrRange . first , IPAddrRange . last ) . join ( NetworkGroup ) . filter ( ( NetworkGroup . name == consts . NETWORKS . fuelweb_admin ) , NetworkGroup . id . notin_ ( admin_ranges . keys ( ) ) ) . all ( ) ) #NEWLINE# for r in admin_ranges . values ( ) : #NEWLINE# #INDENT# admin_ranges_db . extend ( r ) #NEWLINE# #UNINDENT# nodes = db ( ) . query ( Node . ip ) . filter ( Node . cluster_id . is_ ( None ) ) #NEWLINE# node_ips = [ x [ 0 ] for x in nodes ] #NEWLINE# nm = objects . Cluster . get_network_manager ( cluster ) #NEWLINE# if ( not nm . check_ips_belong_to_ranges ( cls , admin_ranges_db ) ) : #NEWLINE# #INDENT# raise errors . InvalidData ( "New IP ranges for Admin networks conflict with bootstrap nodes' IPs." )