#NEWLINE# def prepare( self ) : #NEWLINE# #INDENT# if self . settings . get ( 'dump-locations' , False ) : #NEWLINE# #INDENT# self . log . warning ( 'Dumping available locations instead of running the test' ) #NEWLINE# self . _configure_client ( ) #NEWLINE# info = self . client . get_user_info ( ) #NEWLINE# locations = self . client . get_available_locations ( ) #NEWLINE# for item in info [ 'locations' ] : #NEWLINE# #INDENT# if ( item [ 'id' ] in locations ) : #NEWLINE# #INDENT# self . log . info ( 'Location: %s\t%s' , item [ 'id' ] , item [ 'title' ] ) #NEWLINE# #UNINDENT# #UNINDENT# raise ManualShutdown ( 'Done listing locations' ) #NEWLINE# #UNINDENT# super ( CloudProvisioning , self ) . prepare ( ) #NEWLINE# self . browser_open = self . settings . get ( 'browser-open' , self . browser_open ) #NEWLINE# self . _configure_client ( ) #NEWLINE# self . __prepare_locations ( ) #NEWLINE# config = self . __get_config_for_cloud ( ) #NEWLINE# rfiles = self . __get_rfiles ( ) #NEWLINE# def file_replacer( value , key , container ) : #NEWLINE# #INDENT# if isinstance ( value , string_types ) : #NEWLINE# #INDENT# if ( value in rfiles ) : #NEWLINE# #INDENT# container [ key ] = os . path . basename ( value ) #NEWLINE# if ( container [ key ] != value ) : #NEWLINE# #INDENT# self . log . debug ( 'Replaced %s with %s' , value , container [ key ] ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# BetterDict . traverse ( config , file_replacer ) #NEWLINE# bza_plugin = self . __get_bza_test_config ( ) #NEWLINE# finder = ProjectFinder ( self . parameters , self . settings , self . client , self . engine ) #NEWLINE# finder . default_test_name = 'Taurus Cloud Test' #NEWLINE# self . test_id = finder . resolve_test_id ( bza_plugin , config , rfiles ) #NEWLINE# self . test_name = finder . test_name #NEWLINE# self . widget = CloudProvWidget ( self ) #NEWLINE# if isinstance ( self . engine . aggregator , ConsolidatingAggregator ) : #NEWLINE# #INDENT# self . results_reader = ResultsFromBZA ( self . client ) #NEWLINE# self . results_reader . log = self . log #NEWLINE# self . engine . aggregator . add_underling ( self . results_reader )