| Conditions | 2 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| 1 | import json |
||
| 9 | def run(self, node_ip, cluster_id=None, drain_first=True, |
||
| 10 | wait_for_thrift=True): |
||
| 11 | if not cluster_id: |
||
| 12 | cluster_id = self.cluster_id |
||
| 13 | |||
| 14 | url = self._get_full_url([cluster_id, 'ops', 'restart', node_ip]) |
||
| 15 | |||
| 16 | payload = { |
||
| 17 | 'wait_for_thrift': wait_for_thrift, |
||
| 18 | 'drain_first': drain_first |
||
| 19 | } |
||
| 20 | |||
| 21 | return requests.post(url, data=json.dumps(payload)).json() |
||
| 22 |