#NEWLINE# @ argh_named ( 'ip' ) #NEWLINE# @ arg_full_match #NEWLINE# @ argh . arg ( 'target' , type = str , help = 'target systems/nodes (regexp)' ) #NEWLINE# @ expects_obj #NEWLINE# def handle_cloud_ip( self , arg ) : #NEWLINE# #INDENT# 'assign ips to instances based on properties' #NEWLINE# confman = core . ConfigMan ( arg . root_dir ) #NEWLINE# props = [ node [ 'cloud' ] for node in confman . find ( arg . target , full_match = arg . full_match ) if node . get ( 'cloud' , None ) ] #NEWLINE# for ( provider , props ) in itertools . groupby ( props , self . sky . get_provider ) : #NEWLINE# #INDENT# provider . assign_ip ( props )