I should also say that even if I go in and click "Delete" manually, the object does not delete itself.

Sadly, I can find no logs, either.

Kris

On November 10, 2016 at 7:06 PM Kris Germann <[email protected]> wrote:

Thanks all,

I was able to export as CSV and manually compile the entries for deletion with some creative formula use, the issue I face now is that some devices have odd characters in the device name (% instead of -) and it's causing issues deleting. If I run:

curl -i 'http://localhost:7557/devices/00236a-96318REF-SR360NA015%2D0020209' -X DELETE

I see:

HTTP/1.1 200 OK

Date: Thu, 10 Nov 2016 21:52:20 GMT

Connection: keep-alive

Transfer-Encoding: chunked

Yet the device is still there...

Kris

On November 10, 2016 at 5:28 AM Oliver Kraitschy <[email protected]> wrote:

Hi Kris,

If you delete the CPE on the ACS then it is deleted from the database. If the
device connects to the ACS again then the device is added to the database too.

If the device doesn't show up again then have a look at the device and ACS
cwmp log to make sure that the device tries to connect and to see if there's
a problem when trying to connect.

Greetings,
Oliver

On Tue, Nov 08, 2016 at 03:54:22PM -0500, Kris Germann wrote:

Thanks Dan - I should have been more clear, I wanted to be sure that deleting
from the ACS simply deleted the device until the next time the inform interval
came around on the CPE side.

I have tested with an SPA-122 here, and after deleting it it's not shown up
again...

Kris

On November 7, 2016 at 11:55 PM Dan Morphis <[email protected]> wrote:

Check in is controlled by the InformInterval on the cpe.

-dan

On Nov 7, 2016, at 3:35 PM, Kris Germann <[email protected]> wrote:

Thank you very much!

Is there a process that happens once a device is deleted from GenieACS

  • ie. is there a delay period in which a connection is re-established
    between the CPE and the server or is it simply when the connection is
    repolled again.

    Though there are 3000+ test devices on here I wish to clear, I have a
    few ‘production’ ones.

    Kris

On Nov 7, 2016, at 6:47 PM, Dan Morphis <[email protected]> wrote:

With a little bit of scripting, this would be trivial to do. You
could use perl, php, python, or bash with awk, or even jq.

Here is something I whipped together that can easily be modified to
delete all tasks/devices/presets/files. It requires jq. If you want
to change the script to perform the work instead of echoing the
command to the console, delete the echo on line 28

#!/usr/bin/env bash

SERVER=192.168.7.80
COLLECTION=devices
DATA="" http://${SERVER}:7557/${COLLECTION}?projection=_id | jq -r &#39;.[]._id&#39;

urlencode() {

# urlencode <string>
old_lc_collate=$LC_COLLATE
LC_COLLATE=C

local length="${#1}"
for (( i = 0; i < length; i++ )); do
local c="${1:i:1}"
case $c in
[a-zA-Z0-9.~_-]) printf "$c" ;;
*) printf '%%%02X' "'$c" ;;
esac
done

LC_COLLATE=$old_lc_collate
}

#echo $DATA

for id in $DATA; do
i=$( urlencode $id )
echo curl "http://${SERVER}:7557/${COLLECTION}/${i}&quot; -X DELETE
done

On Sat, Nov 5, 2016 at 12:37 PM, Kris Germann <
[email protected]> wrote:

Thank you,

To be clear, this means I need to run:

root@config:/opt/genieacs# curl -i 'http://localhost:7557/
devices/XXXX' -X DELETE

Where XXXX is the unique device_id for each of the devices in
my ACS - is there any way I can make this a little easier, I
have a few instances with 80 - 5000 devices in each.

Kris

On Nov 1, 2016, at 3:49 PM, Oliver Kraitschy <
[email protected]> wrote:

Hello Kris,

you have to iterate over all devices and send a delete
request for each one
of them.

You can use the API for that:

https://github.com/zaidka/genieacs/wiki/API-Reference

Or you can do it more easily with the python API:

https://github.com/TDT-GmbH/python-genieacs

Greetings,
Oliver

On Tue, Nov 01, 2016 at 12:24:41PM -0400, Kris Germann
wrote:

I find myself in the unique position of having tested
too many devices, so I
have about 110 devices I need to delete...

Is there a 'destroy all' function I could incorporate?

_______________________________________________
Users mailing list
[email protected]
http://lists.genieacs.com/mailman/listinfo/users

_______________________________________________
Users mailing list
[email protected]
http://lists.genieacs.com/mailman/listinfo/users

_______________________________________________
Users mailing list
[email protected]
http://lists.genieacs.com/mailman/listinfo/users

_______________________________________________
Users mailing list
[email protected]
http://lists.genieacs.com/mailman/listinfo/users

_______________________________________________
Users mailing list
[email protected]
http://lists.genieacs.com/mailman/listinfo/users

_______________________________________________
Users mailing list
[email protected]
http://lists.genieacs.com/mailman/listinfo/users

_______________________________________________
Users mailing list
[email protected]
http://lists.genieacs.com/mailman/listinfo/users

_______________________________________________
Users mailing list
[email protected]
http://lists.genieacs.com/mailman/listinfo/users


 

_______________________________________________ Users mailing list [email protected] http://lists.genieacs.com/mailman/listinfo/users
_______________________________________________
Users mailing list
[email protected]
http://lists.genieacs.com/mailman/listinfo/users

Reply via email to