Skip to content

Commit

Permalink
Merge pull request #2 from i2tsuki/fix-get-hosts-param
Browse files Browse the repository at this point in the history
Fix roles with role parameter in 'get_hosts'
  • Loading branch information
freedomofkeima committed Aug 15, 2018
2 parents 9054aec + 1c5714b commit c1706dd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mackerel/clienthde.py
Expand Up @@ -66,16 +66,16 @@ def get_hosts(self, **kwargs):
"""Get hosts.
:param service: Service name
:param roles: Service role
:param role: Service role
:param name: Host name
"""
uri = '/api/v0/hosts.json'
params = {}
if kwargs.get('service', None):
params['service'] = kwargs.get('service')

if kwargs.get('roles', None):
params['roles'] = kwargs.get('roles')
if kwargs.get('role', None):
params['role'] = kwargs.get('role')

if kwargs.get('name', None):
params['name'] = kwargs.get('name')
Expand Down

0 comments on commit c1706dd

Please sign in to comment.