Skip to content
This repository was archived by the owner on Apr 15, 2024. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion consul/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1185,6 +1185,7 @@ def deregister(self,
assert not (service_id and check_id)
data = {'node': node}
dc = dc or self.agent.dc
params = []
if dc:
data['datacenter'] = dc
if service_id:
Expand All @@ -1194,8 +1195,12 @@ def deregister(self,
token = token or self.agent.token
if token:
data['WriteRequest'] = {'Token': token}
params.append(('token', token))
return self.agent.http.put(
CB.bool(), '/v1/catalog/deregister', data=json.dumps(data))
CB.bool(),
'/v1/catalog/deregister',
params=params,
data=json.dumps(data))

def datacenters(self):
"""
Expand Down