diff --git a/alertaclient/api.py b/alertaclient/api.py index a6dda7c..715f35d 100644 --- a/alertaclient/api.py +++ b/alertaclient/api.py @@ -488,15 +488,9 @@ def delete_group(self, id): def mgmt_status(self): return self.http.get('/management/status') - def housekeeping(self, expired_delete_hours=None, info_delete_hours=None): - # This endpoint isn't currently JSON-encoded. + def housekeeping(self): url = self.http.endpoint + '/management/housekeeping' - params = dict() - if expired_delete_hours is not None: - params['expired'] = expired_delete_hours - if info_delete_hours is not None: - params['info'] = info_delete_hours - response = self.http.session.get(url, auth=self.http.auth, timeout=self.http.timeout, params=params) + response = self.http.session.get(url, auth=self.http.auth, timeout=self.http.timeout) if response.status_code != 200: raise UnknownError(response.text) diff --git a/alertaclient/commands/cmd_housekeeping.py b/alertaclient/commands/cmd_housekeeping.py index b6d7447..adfaf06 100644 --- a/alertaclient/commands/cmd_housekeeping.py +++ b/alertaclient/commands/cmd_housekeeping.py @@ -2,12 +2,8 @@ @click.command('housekeeping', short_help='Expired and clears old alerts.') -@click.option('--expired', metavar='EXPIRED_DELETE_HOURS', required=False, - help='Delete expired/closed alertas after this many hours.') -@click.option('--info', metavar='INFO_DELETE_HOURS', required=False, - help='Delete informational alerta after this many hours.') @click.pass_obj def cli(obj, expired=None, info=None): """Trigger the expiration and deletion of alerts.""" client = obj['client'] - client.housekeeping(expired_delete_hours=expired, info_delete_hours=info) + client.housekeeping()