Пример #1
0
 def get_info(self):
     api_request = ApiRequest(self)
     api_request.url('info')
     api_request.action('server/info')
     api_request.response_key('info')
     info = api_request.execute('Info get failure.')
     return {
         'api_version': info['apiVersion'],
         'server_timestamp': info['serverTimestamp'],
         'rest_server_url': info.get('restServerUrl'),
         'websocket_server_url': info.get('webSocketServerUrl')
     }
Пример #2
0
 def get_cluster_info(self):
     api_request = ApiRequest(self)
     api_request.url('info/config/cluster')
     api_request.action('cluster/info')
     api_request.response_key('clusterInfo')
     return api_request.execute('Cluster info get failure.')