Monitoring, Management & Location Tracking

How to change Campus name in Airwave - VisualRF using xml API?

This article will explain how we can update campus name in visualRF using xml API.

 

This method of Campus renaming is faster and reduces navigation to multiple campus from the GUI since it is done from the CLI.

 

Environment : 

We can adopt this method when we need to update huge list of Campuses on the VisualRF needs a name change and we do not need to edit the building name from the VisualRF GUI.

Airwave 8.x

 

 

To need to gather the campus ID inorder to change its name.

>    Please run the following command to gather the campuse ID.
    # dbc "select id, name from visualrf.campus;"
                      id                  | name
    --------------------------------------+------


>    Please draft the xml using the campuse id as shown below and save in /tmp directory as <filename>.xml

    xml=<?xml version='1.0' encoding='ISO-8859-1'?>
    <visualrf:campuses xmlns:visualrf='http://www.airwave.com' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' version='1'>
    <campus id='<Campus ID from db output>' name='<New Campus>'/>
    </visualrf:campuses>

Example:

# vi /tmp/rename.xml
xml=<?xml version='1.0' encoding='ISO-8859-1'?>
<visualrf:campuses xmlns:visualrf='http://www.airwave.com' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' version='1'>
<campus id='e5bbf5f0-5239-4ef9-ad80-14ce3b4e4b64' name='New Campus'/>
</visualrf:campuses>



>    Once the xml file is created with Campus ID and its respective new name, run the following command to apply the new name:

[ Note: Use the following URL to create X-BISCOTTI Header:
    https://arubanetworkskb.secure.force.com/pkb/articles/HowTo/Use-AirWave-XML-API-with-cURL-and-new-X-BISCOTTI-header]
    
    # curl -k --header "<X-BISCOTTI header>" -b /tmp/cjar -d @/tmp/<filename>.xml https://<hostname or IP address of Airwave>/visualrf/add_campuses
    
    <?xml version="1.0" encoding="UTF-8"?>
    <visualrf:results xmlns:visualrf="http://www.airwave.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><success><campus ap_placement_concern="0" created="2014-10-15T07:17:38-07:00" creator_role_id="5" desired-data-rate="" editable="true" id="e5bbf5f0-5239-4ef9-ad80-14ce3b4e4b64" name="New Campus" planned-client-xmit-mw="" view_skin="" view_x="" view_x_pct="" view_y="" view_y_pct=""/></success></visualrf:results>

Example:

Creaating X-BISCOTTI Header:

[root@localhost mercury]# curl -k -D /tmp/hjar -c /tmp/cjar -d "credential_0=admin" -d "credential_1=admin" -d "destination=/" -d "login=Log In" https://10.0.6.10/LOGIN

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1>
<p>The document has moved <a href="/">here</a>.</p>
<hr>
<address>Apache Server at localhost.localdomain Port 80</address>
</body></html>

[root@localhost mercury]# cat /tmp/cjar
# Netscape HTTP Cookie File
# http://curl.haxx.se/rfc/cookie_spec.html
# This file was generated by libcurl! Edit at your own risk.

10.0.6.10    FALSE    /    TRUE    1415035555    Mercury::Handler::AuthCookieHandler_AMPAuth    9372d76ffaca0879cec19d84225eab0d

[root@localhost mercury]# cat /tmp/hjar

HTTP/1.1 302 Found
Date: Mon, 06 Oct 2014 16:26:19 GMT
Server: Apache
X-Frame-Options: SAMEORIGIN
X-CONTENT-TYPE-OPTIONS: nosniff
Strict-Transport-Security: max-age=31536000; includeSubDomains
Set-Cookie: Mercury::Handler::AuthCookieHandler_AMPAuth=6153f42e8c05a1f9b3cc5e83660cd0aa; expires=Mon, 03 Nov 2014 17:26:19 GMT; path=/; secure
X-BISCOTTI: /UfiqpiCRcDRGRyl32SWDsw
Pragma: no-cache
Location: /
Content-Length: 256
Content-Type: text/html; charset=iso-8859-1
Expires: Mon, 06 Oct 2014 16:26:19 GMT

>    Command to update the Campus name:

# curl -k --header "X-BISCOTTI: /UfiqpiCRcDRGRyl32SWDsw" -b /tmp/cjar -d @/tmp/rename.xml https://10.0.6.10/visualrf/add_campuses
<?xml version="1.0" encoding="UTF-8"?>
<visualrf:results xmlns:visualrf="http://www.airwave.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><success><campus ap_placement_concern="0" created="2014-10-15T07:17:38-07:00" creator_role_id="5" desired-data-rate="" editable="true" id="e5bbf5f0-5239-4ef9-ad80-14ce3b4e4b64" name="New Campus" planned-client-xmit-mw="" view_skin="" view_x="" view_x_pct="" view_y="" view_y_pct=""/></success></visualrf:results>

 

Login to VisualRF to verify the new campus name.

Version History
Revision #:
1 of 1
Last update:
‎04-08-2015 06:41 AM
Updated by:
 
Labels (1)
Contributors
Search Airheads
Showing results for 
Search instead for 
Did you mean: 
Is this a frequent problem?

Request an official Aruba knowledge base article to be written by our experts.