- Revised the project description in `pyproject.toml` to better reflect the functionality of the `oxipy` client. - Improved the README.md by adding detailed explanations of the project structure, installation instructions, and usage examples. - Updated documentation files to enhance clarity and organization, including sections on extending models and writing TTP templates. - Adjusted various TTP templates to ensure consistency and accuracy in the parsing of device configurations.
38 lines
1008 B
Plaintext
38 lines
1008 B
Plaintext
<doc>
|
|
Base template for a new device parser. Copy this file, rename it to
|
|
<vendor>.ttp, and fill the groups for the target configuration format.
|
|
|
|
Required groups: system, interfaces.
|
|
Optional group: vlans. Add it only when VLAN parsing is implemented.
|
|
|
|
system must return one dictionary with: model, serial_number, version.
|
|
interfaces must return a list of dictionaries with: interface, ip_address,
|
|
mask, description. Use a prefix length for mask; convert dotted decimal masks
|
|
with `to_cidr` or in the device class.
|
|
vlans must return dictionaries with vlan_id and optional name/description.
|
|
|
|
Useful TTP modifiers: ORPHRASE, _start_, strip(), replace(), exclude(),
|
|
ignore, ignore('.*'), to_cidr, unrange(), split().
|
|
|
|
See docs/templates.md for details.
|
|
</doc>
|
|
<vars>
|
|
default_system = {
|
|
"model": "",
|
|
"serial_number": "",
|
|
"version": ""
|
|
}
|
|
</vars>
|
|
|
|
<group name="system" default="default_system">
|
|
...
|
|
</group>
|
|
|
|
<group name="interfaces">
|
|
...
|
|
</group>
|
|
|
|
<group name="vlans">
|
|
...
|
|
</group>
|