#NEWLINE# def capabilities( self , url = None , refresh_cache = False ) : #NEWLINE# #INDENT# '\n        List the cluster capabilities.\n\n        :param url: Proxy URL of the cluster to retrieve capabilities.\n\n        :returns: A dictionary containing the capabilities of the cluster.\n\n        :raises: ClientException\n        ' #NEWLINE# if ( ( not refresh_cache ) and ( url in self . capabilities_cache ) ) : #NEWLINE# #INDENT# return self . capabilities_cache [ url ] #NEWLINE# #UNINDENT# res = { #NEWLINE# #INDENT# 'action' : 'capabilities' , #NEWLINE# 'timestamp' : time ( ) , #NEWLINE# #UNINDENT# } #NEWLINE# cap = self . thread_manager . container_pool . submit ( self . _get_capabilities , url ) #NEWLINE# capabilities = get_future_result ( cap ) #NEWLINE# res . update ( { #NEWLINE# #INDENT# 'success' : True , #NEWLINE# 'capabilities' : capabilities , #NEWLINE# #UNINDENT# } ) #NEWLINE# if ( url is not None ) : #NEWLINE# #INDENT# res . update ( { #NEWLINE# #INDENT# 'url' : url , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# self . capabilities_cache [ url ] = res #NEWLINE# return res