From d5677fafd2f7bb245a5b9d05d76f67c23482c6e9 Mon Sep 17 00:00:00 2001 From: Adham Date: Wed, 25 Oct 2017 12:48:45 +0200 Subject: [PATCH] Fix Agent.service.deregister According to Consul API https://www.consul.io/api/agent/service.html#deregister-service the deregister should be a PUT not GET method. --- consul/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/consul/base.py b/consul/base.py index 09203b6d..143a4953 100755 --- a/consul/base.py +++ b/consul/base.py @@ -886,7 +886,7 @@ def deregister(self, service_id): take care of deregistering the service with the Catalog. If there is an associated check, that is also deregistered. """ - return self.agent.http.get( + return self.agent.http.put( CB.bool(), '/v1/agent/service/deregister/%s' % service_id) def maintenance(self, service_id, enable, reason=None):