Cisco Cisco Prime Home 2.4 Guida Dello Sviluppatore
Cisco Prime Home – Integration Guide
OL-28558-01 v5.1
21
demonstrates a search for devices with a downstreamAttenuation between 1.0
and 1.5:
devices with downstreamAttenuation: from 1.0 to 1.5
Dates are expressed in the format "mm/dd/yyyy". The following query searches
for devices with a first inform date later than February 14th, 2010:
devices with firstInform: from 2/14/2010
IP addresses are expressed in the format "xxx.xxx.xxx.xxx". Each "xxx"
represents a single octet of the IP address. Each octet can be a number in the
range 0-255, or a "*" to match any value. The following query searches for
devices with a WAN IP of 1.2.3.0-255:
devices with wanip: 1.2.3.*
Any terms that do not match the syntax for numbers, dates, or IP addresses are
assumed to be text. If a text field contains a value that appears to be a non-text
type, then CAQL must be instructed to treat search terms as text.
For example, if a serial number has the value "12345" then the following search
will not work as expected:
device with serialNumber: 12345
CAQL will treat "12345" as a number and will not match the text value of the
device's serial number. To override this behavior the value must be enclosed in
quotes:
device with serialNumber: "12345"
Showing Fields
CAQL can include an optional "show" clause to request a specific list of fields to
include in the search output. Without a show clause, the query result will
contain a default set of fields. The following returns the serial number and last
inform date for every device with OUI AA1122:
devices with oui: AA1122 show serialNumber lastInform
The output fields can be aliased with using the "as" keyword, as in the following
example:
devices with oui: AA1122 show serialNumber as "Serial Number"
lastInform as "Last Inform Date"
lastInform as "Last Inform Date"
The "as" keyword is provided in order to generate more readable output from
the CAQL query.
Sorting
Search results can be sorted using the optional "sort" clause. The following
query finds devices with OUI AA1122, sorted by the last inform date:
devices with oui: AA1122 sort lastInform