Documentation of Thola / Adding a new device / Writing a device class

Writing a device class

A device class is a simple YAML file containing information that is needed to communicate with a network device from this class. Every network device Thola wants to communicate with is assigned to a device class. This class defines which request are sent to a device and under which conditions a device is assigned to this class. When adding a new device type to Thola, a new device class for this type has to be created.

Example of a device class file:

name: "edgeos"

logical_operator: "OR"
    - type: SysObjectID
      match_mode: startsWith
        - .

      - detection: constant
        value: "EdgeCore"
      - detection: SysDescription
      - detection: snmpget
        oid: .
      - detection: snmpget
        oid: .


It is best practise to create a device class for each operating system, as most devices using the same operating system behave in a similar way. When it is necessary to divide devices further than that, it is possible to create sub device classes which specify the device class of an operating system for special devices with different behaviour. Information on the device class hierarchy and inheritance can be found here.