Skip to content

Add lantronix_itmgos show sysconfig - #2374

Merged
matt852 merged 6 commits into
networktocode:masterfrom
ryanhoggpm:lantronix-itmgos-show-sysconfig
Nov 17, 2026
Merged

matt852 merged 6 commits into
networktocode:masterfrom
ryanhoggpm:lantronix-itmgos-show-sysconfig

Conversation

@ryanhoggpm

Copy link
Copy Markdown
ISSUE TYPE
  • New Template Pull Request
COMPONENT

lantronix_itmgos_show_sysconfig.textfsm, os lantronix_itmgos, command show sysconfig

SUMMARY

Adds the first template for Lantronix IT Management Gateway OS, the flat CLI shared by the SLC 9000 and SLC 8000 console managers, the EMG 7500/8500 edge gateways and the SLB. The platform name matches the Netmiko driver (lantronix_itmgos, in Netmiko develop). This PR also adds lantronix_itmgos to OS_CHOICES in tests/test_index_order.py.

show sysconfig prints the whole system configuration. The template returns one record with the identity and hardware fields people inventory on (model, firmware version, serial, MAC, memory and flash, I/O modules, modem and switch presence, secure boot, TPM) plus hostname, domain and default gateway. It stops parsing after the hostname section; services, users and per-port settings are left for command-specific templates.

Design notes:

  • Fields are laid out in two fixed-width columns, and the same field lands in the left or right column depending on model and release (for example Bootloader Version is left on SLC 9000 and right on SLC 8000). Each field rule matches either position and uses Continue.
  • Hardware and network fields vary by model, so those states consume any other key: value line before the ^. -> Error rule.
  • CELLULAR_MODEM and INTERNAL_MODEM are separate because they are different hardware.

Tests: three real captures, scrubbed (documentation-range MACs and addresses, synthetic serials): SLC9016-16U-16E on 9.7.0.0R21, SLC8032 on 9.7.0.6R4, EMG7500 on 9.7.0.0R3. pytest tests passes locally and yamllint is clean.

Model:             SLC9016-16U-16E      Power Supply: AC, 2 power supplies
Number of USB Ports:             2      Cellular Modem:      Not Installed
Firmware Version:       9.7.0.0R21      Ethernet Switch: Installed/16 port
Firmware Updated:   06/29/26 16:04      Switch HW Addr:  00:00:5e:00:53:06
OS Vr: IT Management Gateway OS 7.      Eth1 HW Address: 00:00:5e:00:53:07
Bootloader Version:     2.0.0.0R13      Eth2 HW Address: 00:00:5e:00:53:08
S/N:                  0080A3000003      Eth4 HW Address: 00:00:5e:00:53:0a
Memory/Flash Size:     8 GB/128 GB      Secure Boot:              disabled
I/O Module Type(s):                                RJ45-16, USB-16, ETH-16

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@mjbear mjbear changed the title Add lantronix_itmgos show sysconfig template Add lantronix_itmgos show sysconfig Oct 31, 2026
@mjbear

mjbear commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator

@mjbear mjbear added the question label Nov 1, 2026
Replace the generic key: value rules in the Hardware and Network states with the labels seen in the SLC9000, SLC8000 and EMG samples, so an unrecognized line now reaches the Error rule.
@ryanhoggpm

Copy link
Copy Markdown
Author

Thanks for the separator fix. Agreed on the loose lines. Replaced both with explicit labels from the SLC9000, SLC8000 and EMG samples, so an unrecognized line now hits ^. -> Error. Rebased on your commit; tests pass.

@matt852

matt852 commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

@ryanhoggpm Thanks for your contribution, and adding in our first Lantronix template!

A few notes:

  • TPM is a captured value but all test data shows it as empty. Can you add in an example TPM value to test against? If not I suggest removing it until a valid test can be created for it.
  • The template drops Main Board Revision, EC Version, I/O Module Revision(s), Flash Info and the MAC addresses after Eth1, which are inventory data. Can these be added in as well?
  • With Lantronix devices, are there any situations where the left column is empty but the right column is populated?
  • What about splitting these 3 captured values?
    • ETHERNET_SWITCH - With "Installed/16 port", can these be split on the /? This is the only example data provided. Is this the standard format for all itmgos devices?
    • POWER_SUPPLY - With "AC, 2 power supplies", can these be split on the , (though I see not all values have a command)?
    • IO_MODULES - With "RJ45-16, USB-16, ETH-16", would this be better a a list of values instead of a string?

- Add EC_VERSION, FLASH_INFO, MAIN_BOARD_REVISION, TPM_FIRMWARE_VERSION,
  SWITCH_MAC_ADDRESS and CELL_MAC_ADDRESS.
- MAC_ADDRESS is now a List of every EthN HW Address.
- IO_MODULES and IO_MODULE_REVISIONS are Lists, one entry per installed
  slot; empty slots, N/A and unknown are skipped.
- Split ETHERNET_SWITCH into status and ETHERNET_SWITCH_PORTS, and
  POWER_SUPPLY into type and POWER_SUPPLY_COUNT.
- Add an SLC9000 9.8.0.0 sample with a TPM installed.
@ryanhoggpm

Copy link
Copy Markdown
Author

@matt852 Thanks for the review. Pushed 362824e, which covers each point:

  • TPM: added lantronix_itmgos_show_sysconfig_4.raw, an SLC9000 on 9.8.0.0 with a TPM installed. The TPM line first appears in 9.8.0.0, which is why the 9.7 samples had no value. That line also carries the TPM firmware version, so I added TPM_FIRMWARE_VERSION. TPM is now Installed or Not Installed.
  • Inventory fields: added MAIN_BOARD_REVISION, EC_VERSION, IO_MODULE_REVISIONS, FLASH_INFO, SWITCH_MAC_ADDRESS and CELL_MAC_ADDRESS. MAC_ADDRESS is now a List of every EthN HW Address, the same as cisco_ios_show_version. On 9.8.0.0 and later builds the main board line can be labelled Main Board Part Number/HW Version, and that label goes to MAIN_BOARD_REVISION as well.
  • Empty left column: no. Every line of this section starts with a left-column field, and right-column fields only follow one. Lines like Flash Info and I/O Module Type(s) are a single field padded to the right edge. Which field goes in which column changes by model and release, so each field is matched in either position.
  • ETHERNET_SWITCH: the firmware prints only Installed/<n> port or Not Installed, so it's now ETHERNET_SWITCH plus ETHERNET_SWITCH_PORTS.
  • POWER_SUPPLY: the fixed set is AC, 1 power supply, AC, 2 power supplies, DC, 2 power supplies, External and unknown. It's now POWER_SUPPLY (AC, DC, External) plus POWER_SUPPLY_COUNT, which is empty when there's no count.
  • IO_MODULES: it's a List now, and so is IO_MODULE_REVISIONS, with one entry per installed slot. There are up to three slots. Empty slots (RJ45-16, ETH-16, on 9.8.0.0), N/A and unknown are skipped, so the two lists stay aligned.

I also accepted the I/O Module Types(s) label spelling, which some builds print, and the EMG WiFi Module and I/O Board Revision(s) lines, so they don't hit Error. The new sample is cut off after the hostname section, because the template stops there. Tests and yamllint pass.

The line isn't anchored on EoL so the trailing \s gives
little if any benefit.
@ryanhoggpm

Copy link
Copy Markdown
Author

@matt852 Friendly ping on this one. 362824e covers each point from your Nov 3 review: TPM test data (new SLC9000 9.8.0.0 sample with a TPM installed), the added inventory fields, and the column and split questions. Happy to rework anything that still doesn't fit. Thanks again for taking the first Lantronix template.

@matt852 matt852 left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ryanhoggpm Looking great and like all feedback was addressed. Approved, with one suggested spacing fix for test file _3.raw

@matt852
matt852 merged commit e8644eb into networktocode:master Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants