def cluster_reset(self, cluster_key):
"""
Reset the status of a cluster. This means that all the temporary
information about which resource request is forgotten. This may
leave configured resources not properly configured, so handle with
care.
:param cluster_key:
:return: Key of the cluster being reset
"""
arguments = {
'method': 'cluster_reset',
'cluster': cluster_key
}
client = HTTPClient()
response = client.fetch('{}/cluster?{}'.format(
self.uri, parse.urlencode(arguments)),
headers={'Key': self.uk}
)
if response.code == 200:
return response.body.decode('utf-8')
else:
raise ValueError(response.body.decode('utf-8'))
评论列表
文章目录