Skip to content

Commit

Permalink
Merge pull request #12 from heavenshell/fix/get_hosts
Browse files Browse the repository at this point in the history
Add status and customIdentifier to get_hosts
  • Loading branch information
heavenshell authored Sep 22, 2019
2 parents fecab18 + 2bcfe06 commit 69f64f6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mackerel/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,12 @@ def get_hosts(self, **kwargs):
if kwargs.get('name', None):
params['name'] = kwargs.get('name')

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

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

hosts = self._request(uri, params=params)
return [Host(**host) for host in hosts['hosts']]

Expand Down

0 comments on commit 69f64f6

Please sign in to comment.