XML schema documentation
Validator
A validator is composed of a list of Validation.
The min number odf validation is 1.
Example:
<validator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation='mibvalidation.xsd'>
<The validation list ...>
</validator>
Validation
This is the description of 1 validation. A validation is a set of attributes and actions that will be run in order to validate an SNMP agent implementation.
Validations are contained in a validator.
Validation attributes
- name : The validation name. (eg:"My MIB implementation test 1")
- type : The type of validation. (eg:only table, only simple oid leaf, both).The possible values are :
- UNARY means that only OID leaf are validated
- SCALARE means that only OID tables are validated
- ALL means that both are validated.
If you ommit this attribute, the default value is ALL.
- iteration : The number of time this validation will be run. Default value is 1.
- thread : The number of threads that will be started. Each thread runs a complete validation. Default valie is 1.
- description : A free text to define the validation
Example: All the default values are applied
<validator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation='mibvalidation.xsd'>
<validation name="MIB II validation" description="Walkuntil the complete MIB">
...
</validator>
Validation elements
A validation contains a set of elements.
- agent : The parameters of the SNMP agent to validate. An agent
is composed of a hostName, a port and an SNMP version. Default port is localhost, default port is 161. Versions are v1, v2 or v3. Default version is v2.
Example:
<agent host="host1" port="8085"/>
- meta: Some metadata can be provided to validation in order to add make it more strict. SnmpOidTable (generated from Java DMK MIBGEN tool) classes can be provided. The metadata contained in these classes will be used to validate SNMP MIB. Some MIB tree limits can also be provided. These limits are used to start and end the MIB run. The default value for start is 1.2. The default value for stop is 2.1. The SNMP request to do when running the MIB is also specified. The default value is getnext. walkuntil request can be used (The performance is gretaer using getnext).
Meta elements :
- oidtable list : For each oidtable you provide a class and an exclude list. This exclude list contains the set of nit accessible field (mainly entry indexes).
- treelimits : The start / stop oid of the run and the way to do it.N/li>
Example :
<meta>
<oidtable class="jdmk.jvmmib.JVM_MANAGEMENT_MIBOidTable">
<excludelist>
<exclude>jvmLowMemoryPoolType</exclude>
<exclude>jvmRTInputArgsIndex</exclude>
<exclude>jvmThreadInstIndex</exclude>
<exclude>jvmMemManagerIndex</exclude>
<exclude>jvmMemPoolIndex</exclude>
</excludelist>
</oidtable>
<treelimits startoid="1.1.4" stopoid="1.1.5" request="getnext"/>
</meta>
- tables : A list of tableinfo element. This element allows you to express assertions for specific SNMP tables (nb column, nb row, allow empty, expected indexes, ...).
tableinfo is composed of :
- oid : The table oid.
- description : Free text that describes the table.
- nbcolumns : The number of accessible columns (non accessible field are not counted).
- allowempty : If false, the table MUST contain rows. true, the table CAN be empty.
- nbentries : The number of rows.
- indexlist : The list of expected indexes.
- strict : True, no indexes can be found outside the provided index list. False, some indexes can be found
Example:
<tables>
<tableinfo>
<oid>jvmThreadInstanceTable</oid>
<nbcolumns>11</nbcolumns>
</tableinfo>
<tableinfo>
<oid>jvmRTInputArgsTable</oid>
<nbcolumns>1</nbcolumns>
<allowempty>true</allowempty>
</tableinfo>
</tables>
- specificrequests : This element allows you to express SNMP requests you want to execute during the run. You can activate a "get after getnext" request. For each next oid found, a direct get request is called. You can also ask for a getbulk to be executed. The default startoid for the getbulk is 1.2, the default value for nbrepeaters is 5
Example:
<specificrequests>
<getbulk startoid="1.1.4" nbrepeaters="2"/>
<get_after_getnext>true</get_after_getnext>
</specificrequests>
A complete validation description example
<validator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation='mibvalidation.xsd'>
<validation>
<agent host="host1" port="8085"/>
<meta>
<oidtable class="jdmk.jvmmib.JVM_MANAGEMENT_MIBOidTable">
<excludelist>
<exclude>jvmLowMemoryPoolType</exclude>
<exclude>jvmRTInputArgsIndex</exclude>
<exclude>jvmThreadInstIndex</exclude>
<exclude>jvmMemManagerIndex</exclude>
<exclude>jvmMemPoolIndex</exclude>
</excludelist>
</oidtable>
<treelimits startoid="1.1.4" stopoid="1.1.5" request="getnext"/>
</meta>
<tables>
<tableinfo>
<oid>jvmThreadInstanceTable</oid>
<nbcolumns>11</nbcolumns>
</tableinfo>
<tableinfo>
<oid>jvmRTInputArgsTable</oid>
<nbcolumns>1</nbcolumns>
<allowempty>true</allowempty>
</tableinfo>
</tables>
<specificrequests>
<getbulk startoid="1.1.4" nbrepeaters="2"/>
<get_after_getnext>true</get_after_getnext>
</specificrequests>
</validation>
</validator>