Rename with_pending_restart to restart_pending.

This commit is contained in:
Oleksii Kliukin
2016-07-13 11:07:37 +02:00
parent 3181c4e59f
commit ffd27b5705
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -86,7 +86,7 @@ Scenario: check the scheduled restart
Then I receive a response code 202
And I sleep for 10 seconds
And Response on GET http://127.0.0.1:8008/patroni contains pending_restart after 10 seconds
Given I issue a scheduled restart at http://127.0.0.1:8008 in 1 seconds with {"with_pending_restart_flag": "True"}
Given I issue a scheduled restart at http://127.0.0.1:8008 in 1 seconds with {"restart_pending": "True"}
Then I receive a response code 202
And Response on GET http://127.0.0.1:8008/patroni does not contain pending_restart after 10 seconds
+1 -1
View File
@@ -216,7 +216,7 @@ class RestApiHandler(BaseHTTPRequestHandler):
status_code = 400
data = "PostgreSQL version should be in the first.major.minor format"
break
elif k != 'with_pending_restart_flag':
elif k != 'restart_pending':
status_code = 400
data = "Unknown filter for the scheduled restart: {0}".format(k)
break
+1 -1
View File
@@ -464,7 +464,7 @@ class Ha(object):
if (restart_data and isinstance(restart_data, dict) and
not self.restart_matches(restart_data.get('role'),
restart_data.get('postgres_version'),
('with_pending_restart_flag' in restart_data))):
('restart_pending' in restart_data))):
return (False, "restart conditions are not satisfied")
with self._async_executor: