Network Management

Reply
Aruba Employee
Posts: 1
Registered: ‎11-12-2013

How to Delete a folder in AirWave

Thought this might be helpful to some. 

 deletefolderamp.png

Note: The folder you wish to delete MUST NOT have any devices or subfolders.

Moderator
Posts: 1,252
Registered: ‎10-16-2008

Re: How to Delete a folder in AirWave

It's also worth noting that an ignored device counts as being something in the folder, so you can always check that by doing:

# dbc 'select * from ap where ap_folder_id=(id that appears in folder view URL)

 

Example:

URL=demo.airwave.com/ap_list?ap_folder_id=1

# dbc 'select * from ap where ap_folder_id=1'

Can further be simplified to:

# dbc 'select id, name, state from ap where ap_folder_id=1'

This filters out the extra rows that don't matter if you're planning to delete the folder

 

Database AP States:

0 = pending

1 = approved

3 = ignored


Rob Gin
Senior QA Engineer - Network Services
Aruba Networks, a Hewlett Packard Enterprise Company
New Contributor
Posts: 2
Registered: ‎03-02-2015

Re: How to Delete a folder in AirWave

I can't delete a subfolder, even if it is empty (also check with dbc command):

 

[root@airwave mercury]# dbc 'select id, name, state from ap where ap_folder_id=17'
id | name | state
----+------+-------
(0 rows)

 

The GUI seems to accept the command "Delete this folder" but then the folder is still there.

 

Is there a way to force the deletion?

 

Moderator
Posts: 1,252
Registered: ‎10-16-2008

Re: How to Delete a folder in AirWave

it may be a database issue. please check /var/log/httpd/error.log and /var/log/pgsql at the time of an attempted delete. if theres no errors, then the delete should work, but usually a non delete means something else is crashing in the background. may be grounds to open a quick support case with TAC.

Rob Gin
Senior QA Engineer - Network Services
Aruba Networks, a Hewlett Packard Enterprise Company
New Contributor
Posts: 2
Registered: ‎03-02-2015

Re: How to Delete a folder in AirWave

You're right...

Here what the error log says:

 

delete_objects() - DBD::Pg::st execute failed: ERROR: update or delete on table "ap_folder" violates foreign key constraint "vpn_user_a"
DETAIL: Key (id)=(17) is still referenced from table "vpn_user". [for Statement "DELETE FROM ap_folder WHERE
id = ?" with ParamValues: 1='17'] at /usr/local/airwave/lib/perl/Mercury/DB/Q/st.pm line 20.
at /usr/local/airwave/lib/perl/Mercury/DB/Q/st.pm line 20
Mercury::DB::Q::st::execute('Mercury::DB::Q::st=HASH(0x7f2f29689148)', 17) [...]

 

 

Do I have to proceed with a support case?

Search Airheads
Showing results for 
Search instead for 
Did you mean: