File tree Expand file tree Collapse file tree 2 files changed +16
-31
lines changed Expand file tree Collapse file tree 2 files changed +16
-31
lines changed Original file line number Diff line number Diff line change @@ -45,11 +45,24 @@ def main(host='localhost', port=8086):
45
45
print ("Write points: {0}" .format (json_body ))
46
46
client .write_points (json_body )
47
47
48
- print ("Queying data: " + query )
48
+ print ("Querying data: " + query )
49
49
result = client .query (query )
50
50
51
51
print ("Result: {0}" .format (result ))
52
52
53
+ #
54
+ print ("Remove admin privilege from user" )
55
+ client .unset_database_admin (dbuser )
56
+
57
+ dbusers = client .get_database_users ()
58
+ print ("Get list of database users again: {0}" .format (dbusers ))
59
+
60
+ print ("Switch user: " + dbuser )
61
+ client .switch_user (dbuser , dbuser_password )
62
+
63
+ print ("Write points: {0}" .format (json_body ))
64
+ client .write_points (json_body )
65
+
53
66
print ("Switch user: " + user )
54
67
client .switch_user (user , password )
55
68
Original file line number Diff line number Diff line change @@ -648,7 +648,7 @@ def send_packet(self, packet):
648
648
649
649
def ping (self , database ):
650
650
"""
651
- List interfaces
651
+ Healthcheck
652
652
"""
653
653
url = "ping"
654
654
@@ -662,7 +662,7 @@ def ping(self, database):
662
662
663
663
def force_compaction (self , database ):
664
664
"""
665
- List interfaces
665
+ Force raft compaction
666
666
"""
667
667
url = "raft/force_compaction"
668
668
@@ -674,20 +674,6 @@ def force_compaction(self, database):
674
674
675
675
return response .json ()
676
676
677
- def list_interfaces (self , database ):
678
- """
679
- List interfaces
680
- """
681
- url = "interfaces"
682
-
683
- response = self .request (
684
- url = url ,
685
- method = 'GET' ,
686
- status_code = 200
687
- )
688
-
689
- return response .json ()
690
-
691
677
# Cluster config endpoints
692
678
# get list of cluster servers
693
679
# curl http://localhost:8086/cluster_admins?u=root&p=root
@@ -777,17 +763,3 @@ def drop_shard(self, database):
777
763
)
778
764
779
765
return True
780
-
781
- def is_in_sync (self , database ):
782
- """
783
- Return whether cluster is in sync or not
784
- """
785
- url = "sync"
786
-
787
- response = self .request (
788
- url = url ,
789
- method = 'GET' ,
790
- status_code = 200
791
- )
792
-
793
- return json .loads (response .text )
You can’t perform that action at this time.
0 commit comments