| *** markinhsv has joined #ara | 17:06 | |
| markinhsv | I am running ara api server and ara-web and it's working well, however I don't seem to have the CLI client. What did I do wrong? | 17:06 |
|---|---|---|
| dmsimard | markinhsv: there is an "ara-manage" command in 1.x but there isn't a CLI to query the API a bit like in 0.x | 20:24 |
| markinhsv | That explains it. I thought I was going crazy. | 20:48 |
| markinhsv | A note in the docs would be very helpful, only if something short like "This is obsolete, please see this instead" | 20:49 |
| markinhsv | How does one go about deleting playbooks now? I was able to do it using postman but I found it hard to construct a mysql query that would do it. | 20:49 |
| markinhsv | I didn't see any way to do it in ara-web, maybe I missed it though, it's been known to happen :) | 20:51 |
| *** Glandos has quit IRC | 20:52 | |
| *** Glandos has joined #ara | 20:53 | |
| dmsimard | markinhsv: https://github.com/ansible-community/ara/issues/31 mentions tooling to make it easier to prune old records | 20:56 |
| dmsimard | Deletion isn't implemented in either web interfaces but it could be a good addition | 20:57 |
| markinhsv | Thanks, yeah, I think so, do you have already have a canned mysql query that can do it for a time range. If not, I think I will try to do something with a script with curl using cron. | 20:59 |
| dmsimard | The API interface has a delete button when querying a specific item (ex: /api/v1/playbooks/<id>) but it shouldn't be the only way | 20:59 |
| markinhsv | I saw that once but was never able to get it to reappear, I thought I was imagining it. | 21:00 |
| dmsimard | Only in detailed item views, not in list views | 21:00 |
| markinhsv | Oh, ok, I'll try to get to see if I can get it to come up again. It might be handy for one-offs. | 21:01 |
| dmsimard | I don't have a canned MySQL query right now | 21:01 |
| markinhsv | It's okay, I would have worked it out myself but it looks like it would be a complicated query to ensure that all the dependent rows were deleted first. | 21:02 |
| markinhsv | It's probably easier to do with the api anyway | 21:02 |
| dmsimard | If you can do a bit of python you can check the API clients https://ara.readthedocs.io/en/latest/api-usage.html | 21:03 |
| markinhsv | My python is ok, but not great. I'll look at it. It might be easier than cobbling together a shell script to do it. | 21:03 |
| dmsimard | Support for searching by dates isn't available on the API side yet but you can probably do that client side | 21:04 |
| dmsimard | https://github.com/ansible-community/ara/issues/30 is the issue for API search by date | 21:04 |
| markinhsv | If there is a date, I can manually match all the ones that match greater than n days ago into a collection and then loop over them. | 21:05 |
| markinhsv | okay, I'll try it. | 21:05 |
| dmsimard | Since there's no search by date (yet), you'd probably need to iterate over the playbooks, retrieve the "ended" field and compare that against local date | 21:06 |
| dmsimard | The client has a .delete method | 21:06 |
| markinhsv | I'm just being pushed by management to get this online but I know at some point they are going to ask me how to delete them, I need to be proactive and have a solution already in place. | 21:06 |
| markinhsv | That sounds doable. | 21:07 |
| dmsimard | Would be happy to help review :) | 21:08 |
| markinhsv | Ok, once I have some code I'll send it to you. | 21:08 |
| markinhsv | thanks | 21:08 |
| markinhsv | sorry to bother you on Saturday, go out and enjoy the rest of your day :) | 21:08 |
| dmsimard | np, have fun | 21:15 |
| *** markinhsv has quit IRC | 23:00 | |
| *** markinhsv has joined #ara | 23:18 | |
Generated by irclog2html.py 2.15.3 by Marius Gedminas - find it at mg.pov.lt!