zalando-stups / fullstop-cli

Simple command line utility to view and resolve fullstop. violations
https://pypi.python.org/pypi/stups-fullstop/
Other
3 stars 5 forks source link

--severity flag not working #11

Open pfigue opened 8 years ago

pfigue commented 8 years ago

Expected behavior

fullstop list-violations --accounts 1234567890 -o tsv --severity LOW_IMPACT doesn't crash and shows only all the violations whose severity is LOW_IMPACT.

Steps needed to reproduce the bug

fullstop list-violations --accounts 1234567890 -o tsv works, but fullstop list-violations --accounts 1234567890 -o tsv --severity LOW_IMPACT throws:

File "[...]lib/python3.5/site-packages/fullstop/cli.py", line 226, in list_violations
  r.raise_for_status()
File [...]lib/python3.5/site-packages/requests/models.py", line 844, in raise_for_status
  raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://fullstop.stups.zalan.do/api/violations?from=2016-05-19T14%3A46%3A16.735707Z&size=20&severity=LOW_IMPACT&accounts=344293425312&sort=id%2CDESC

I didn't know what are the valid values for --severity, so I took them from https://github.com/zalando-stups/fullstop/blob/master/fullstop-api.yaml#L215. All of them fail the same for me.

Dependencies

None, AFAIK.

Notes