Skip to content

Commit 11e8453

Browse files
committed
Merge branch 'master' into fix-example-tutorial-server-data-error
2 parents 6bd549b + 1ee50d5 commit 11e8453

File tree

2 files changed

+0
-52
lines changed

2 files changed

+0
-52
lines changed

influxdb/client.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -588,25 +588,6 @@ def get_list_retention_policies(self, database=None):
588588
)
589589
return list(rsp.get_points())
590590

591-
def get_list_servers(self):
592-
"""Get the list of servers in InfluxDB cluster.
593-
594-
:returns: all nodes in InfluxDB cluster
595-
:rtype: list of dictionaries
596-
597-
:Example:
598-
599-
::
600-
601-
>> servers = client.get_list_servers()
602-
>> servers
603-
[{'cluster_addr': 'server01:8088',
604-
'id': 1,
605-
'raft': True,
606-
'raft-leader': True}]
607-
"""
608-
return list(self.query("SHOW SERVERS").get_points())
609-
610591
def get_list_users(self):
611592
"""Get the list of all users in InfluxDB.
612593

influxdb/tests/client_test.py

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -484,39 +484,6 @@ def test_get_list_database_fails(self):
484484
with _mocked_session(cli, 'get', 401):
485485
cli.get_list_database()
486486

487-
def test_get_list_servers(self):
488-
data = {'results': [
489-
{'series': [
490-
{'columns': ['id', 'cluster_addr', 'raft', 'raft-leader'],
491-
'values': [
492-
[1, 'server01:8088', True, True],
493-
[2, 'server02:8088', True, False],
494-
[3, 'server03:8088', True, False]]}]}
495-
]}
496-
497-
with _mocked_session(self.cli, 'get', 200, json.dumps(data)):
498-
self.assertListEqual(
499-
self.cli.get_list_servers(),
500-
[{'cluster_addr': 'server01:8088',
501-
'id': 1,
502-
'raft': True,
503-
'raft-leader': True},
504-
{'cluster_addr': 'server02:8088',
505-
'id': 2,
506-
'raft': True,
507-
'raft-leader': False},
508-
{'cluster_addr': 'server03:8088',
509-
'id': 3,
510-
'raft': True,
511-
'raft-leader': False}]
512-
)
513-
514-
@raises(Exception)
515-
def test_get_list_servers_fails(self):
516-
cli = InfluxDBClient('host', 8086, 'username', 'password')
517-
with _mocked_session(cli, 'get', 401):
518-
cli.get_list_servers()
519-
520487
def test_create_retention_policy_default(self):
521488
example_response = '{"results":[{}]}'
522489

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy