Jump to: navigation, search

Retrieve provisioned and unprovisioned devices

Feature Server enables you to retrieve a list of all devices that are created in Feature Server by running the getColumnFamilyContent.py script. This script is located in the <FS installation path>\python\util folder.

How to deploy the script?

To deploy the script to retrieve provisioned and unprovisioned devices, follow these steps:

  1. On the master Feature Server instance:
    • For 8.1.202.10 and later versions of Feature Server, copy the jython-standalone-2.7.1b2.jar file from <FS installation path>\work\jetty-x.x.x.x-pppp-fs.war-_fs-any-\webapp\WEB-INF\lib to <FS installation path>\python\.
    • For 8.1.202.09 and previous versions of Feature Server, copy the jython-2.7b1.jar file from <FS installation path>\work\jetty-x.x.x.x-pppp-fs.war-_fs-any-\webapp\WEB-INF\lib to <FS installation path>\python\.
  2. Open console and navigate to <FS installation path>\python\util, which contains the scripts.
  3. Copy both the above-mentioned python scripts to the path <FS installation path>\python\.
  4. Enter the command to set JYTHONPATH:
    Windows
    set JYTHONPATH=<FS installation path>\python
    Linux
    export JYTHONPATH=<FS installation path>/python

How to run the script?

Use this command line format to run the script for 8.1.202.09 and previous versions of Feature Server:

java -jar jython-2.7b1.jar getColumnFamilyContent.py -H <hostname> -p <port> -c dm_device -k vendor,model,dn_list -o devices.log -x devices.csv

Use this command line format to run the script for 8.1.202.10 and later versions of Feature Server:

java -jar jython-standalone-2.7.1b2.jar getColumnFamilyContent.py -H <hostname> -p <port> -c dm_device -k vendor,model,dn_list -o devices.log -x devices.csv

Note that the script accepts -k and -x only from Feature Server release version 8.1.201.94. The contents of the .csv file must be in the following format:

ID Vendor Model dn_list
abcdef0000001 Genesys 420HD 1001,1002
abcdef0000002 Genesys 420HD
abcdef0000003 Genesys 420HD 1001,1002

Key

  • ID represents the mac address of the phones.
  • Devices containing dn_list value are provisioned phones.
  • Devices that do not contain dn_list value are unprovisioned phones.

Sample command line

A sample to run the script for 8.1.202.09 and previous versions of Feature Server:

java -jar jython-2.7b1.jar getColumnFamilyContent.py -H localhost -p 9160 -c dm_device -k vendor,model,dn_list -o devices.log -x devices.csv

A sample command line to run the script for 8.1.202.10 and later versions of Feature Server:

java -jar jython-standalone-2.7.1b2.jar getColumnFamilyContent.py -H localhost -p 9160 -c dm_device -k vendor,model,dn_list -o devices.log -x devices.csv

Feedback

Comment on this article:

blog comments powered by Disqus
This page was last modified on September 23, 2018, at 22:54.