<s> from rally . deployment . serverprovider import provider <EOL> @ provider . configure ( name = "<STR_LIT>" ) <EOL> class ExistingServers ( provider . ProviderFactory ) : <EOL> """<STR_LIT>""" <EOL> CREDENTIALS_SCHEMA = { <EOL> "<STR_LIT:type>" : "<STR_LIT:object>" , <EOL> "<STR_LIT>" : { <EOL> "<STR_LIT:host>" : { "<STR_LIT:type>" : "<STR_LIT:string>" } , <EOL> "<STR_LIT:port>" : { "<STR_LIT:type>" : "<STR_LIT>" } , <EOL> "<STR_LIT:user>" : { "<STR_LIT:type>" : "<STR_LIT:string>" } , <EOL> "<STR_LIT:key>" : { "<STR_LIT:type>" : "<STR_LIT:string>" } , <EOL> "<STR_LIT:password>" : { "<STR_LIT:type>" : "<STR_LIT:string>" } <EOL> } , <EOL> "<STR_LIT>" : [ "<STR_LIT:host>" , "<STR_LIT:user>" ] <EOL> } <EOL> CONFIG_SCHEMA = { <EOL> "<STR_LIT:type>" : "<STR_LIT:object>" , <EOL> "<STR_LIT>" : { <EOL> "<STR_LIT:type>" : { "<STR_LIT:type>" : "<STR_LIT:string>" } , <EOL> "<STR_LIT>" : { <EOL> "<STR_LIT:type>" : "<STR_LIT>" , <EOL> "<STR_LIT>" : CREDENTIALS_SCHEMA <EOL> } , <EOL> } , <EOL> "<STR_LIT>" : [ "<STR_LIT>" ] <EOL> } <EOL> def __init__ ( self , deployment , config ) : <EOL> super ( ExistingServers , self ) . __init__ ( deployment , config ) <EOL> self . credentials = config [ "<STR_LIT>" ] <EOL> def create_servers ( self ) : <EOL> servers = [ ] <EOL> for credential in self . credentials : <EOL> servers . append ( provider . Server ( host = credential [ "<STR_LIT:host>" ] , <EOL> user = credential [ "<STR_LIT:user>" ] , <EOL> key = credential . get ( "<STR_LIT:key>" ) , <EOL> password = credential . get ( "<STR_LIT:password>" ) , <EOL> port = credential . get ( "<STR_LIT:port>" , <NUM_LIT> ) ) ) <EOL> return servers <EOL> def destroy_servers ( self ) : <EOL> pass </s>
