From 2bcfe06e3604eaaf83c91e00ba440920dc2dd13d Mon Sep 17 00:00:00 2001 From: Shinya Ohyanagi Date: Sun, 22 Sep 2019 23:30:59 +0900 Subject: [PATCH] Add status and customIdentifier to get_hosts --- mackerel/client.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mackerel/client.py b/mackerel/client.py index 4e59f66..da1e110 100644 --- a/mackerel/client.py +++ b/mackerel/client.py @@ -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']]