#NEWLINE# def on_get( self , req , resp , tenant_id , keypair_name ) : #NEWLINE# #INDENT# client = req . env [ 'sl_client' ] #NEWLINE# mgr = SoftLayer . SshKeyManager ( client ) #NEWLINE# keys = mgr . list_keys ( label = keypair_name ) #NEWLINE# if ( len ( keys ) == 0 ) : #NEWLINE# #INDENT# return error_handling . not_found ( resp , 'KeyPair not found' ) #NEWLINE# #UNINDENT# keypair = mgr . get_key ( keys [ 0 ] [ 'id' ] ) #NEWLINE# resp . body = { #NEWLINE# #INDENT# 'keypair' : format_keypair ( keypair ) , #NEWLINE# #UNINDENT# }