Skip to content
This repository was archived by the owner on Apr 15, 2024. It is now read-only.

Commit 8076d7b

Browse files
committed
Added EnableTagOverride option to service registration method.
1 parent 7a6fbb4 commit 8076d7b

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

consul/base.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,8 @@ def register(
703703
interval=None,
704704
ttl=None,
705705
http=None,
706-
timeout=None):
706+
timeout=None,
707+
enable_tag_override=False):
707708
"""
708709
Add a new service to the local agent. There is more
709710
documentation on services
@@ -728,8 +729,18 @@ def register(
728729
729730
*script*, *interval*, *ttl*, *http*, and *timeout* arguments
730731
are deprecated. use *check* instead.
732+
733+
*enable_tag_override* is an optional bool that enable you
734+
to modify a service tags from servers(consul agent role server)
735+
Default is set to False.
736+
This option is only for >=v0.6.0 version on both agent and
737+
servers.
738+
for more information
739+
https://www.consul.io/docs/agent/services.html
731740
"""
732-
payload = {'name': name}
741+
payload = {}
742+
payload['name'] = name
743+
payload['enabletagoverride'] = enable_tag_override
733744
if service_id:
734745
payload['id'] = service_id
735746
if address:

0 commit comments

Comments
 (0)