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" match: logical_operator: "OR" conditions: - type: SysObjectID match_mode: startsWith values: - .184.108.40.206.4.1.259. identify: properties: vendor: - detection: constant value: "EdgeCore" model: - detection: SysDescription serial_number: - detection: snmpget oid: .220.127.116.11.4.1.218.104.22.168.22.214.171.124.10.1 os_version: - detection: snmpget oid: .126.96.36.199.188.8.131.52.2.0 ...
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.