Search Results

Modules File

Modules File

CDRouter requires there be a file named modules at the top-level of every testpath. This file is known as a modules file. A modules file defines the test modules in a testpath using calls to buddy::module_define which take the following form:

  buddy::module_define mymodule.tcl {

The properties inside the module definition tell cdrouter-cli when a module should or should not be loaded.


Below are the properties that can be assigned to a module.


Module descriptions are declared in the modules file using the description property. This is the module description which is displayed when running cdrouter-cli -list or in CDRouter’s documentation section.

  buddy::module_define mymodule.tcl {
      description "The module description goes here"


This property indicates which CDRouter expansion the test module belongs to. This determines where a test module shows up in CDRouter’s package editor (/packages/new and /packages/:id/edit). The possible values for this property are:

Group Description
CDRouter Modules exclusive to CDRouter base
Multiport Modules exclusive to CDRouter Multiport product
TR-069 Modules exclusive to CDRouter TR-069 / TR-069 EDM expansion
BBF.069 Modules exclusive to CDRouter BBF.069 expansion
IKE Modules exclusive to CDRouter IKE expansion
IPv6 Modules exclusive to CDRouter IPv6 expansion
Storage Modules exclusive to CDRouter Storage expansion
SNMP Modules exclusive to CDRouter SNMP expansion
Nmap Modules exclusive to CDRouter Nmap expansion
Performance Modules exclusive to CDRouter Performance expansion
Custom Used only for user-created, custom test modules

For example, the following snippet would make the mymodule.tcl test module show up under the IPv6 group in CDRouter:

  buddy::module_define mymodule.tcl {
      group IPv6


This property tells cdrouter-cli which expansions must be enabled in the license file to allow the module to be loaded. The value of the property should be a Tcl list whose values are options that can be passed to the qacafe Tcl command and which return either yes or no. The current valid options are:

Expansion Description
bbf.069 Test module requires BBF.069 expansion
ics Test module requires ICS expansion
ike Test module requires IKE expansion
ipv6 Test module requires IPv6 expansion
multiport Test module requires Multiport expansion
nmap Test module requires Nmap expansion
performance Test module requires Performance expansion
snmp Test module requires SNMP expansion
storage Test module requires Storage expansion
tr69 Test module requires TR-069 expansion
tr69-edm Test module requires TR-069 EDM expansion

For example, to only load the test module mymodule.tcl if the both the Storage and IPv6 expansions are enabled, use the following snippet:

  buddy::module_define mymodule.tcl {
      required-addons { storage ipv6 }


When running CDRouter Demo, any module without a demo property of yes will not be loaded. The absence of a demo property implies a value of no. To allow a module to be loaded in CDRouter Demo, use the following snippet:

  buddy::module_define mymodule.tcl {
      demo yes